fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0226]: only a single explicit lifetime bound is permitted 2 --> $DIR/not-on-struct.rs:25:25 3 | 4LL | fn e() -> 'static + A + 'static { 5 | ^^^^^^^ 6 7error[E0226]: only a single explicit lifetime bound is permitted 8 --> $DIR/not-on-struct.rs:29:53 9 | 10LL | fn f<'a,T,E>(iter: Iterator<Item='a + Result<T,E> + 'a>) { 11 | ^^ 12 13error[E0404]: expected trait, found struct `Foo` 14 --> $DIR/not-on-struct.rs:8:16 15 | 16LL | fn foo(_x: Box<Foo + Send>) { } 17 | ^^^ not a trait 18 | 19help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way 20 --> $DIR/not-on-struct.rs:8:22 21 | 22LL | fn foo(_x: Box<Foo + Send>) { } 23 | --- ^^^^ ...because of this bound 24 | | 25 | expected this type to be a trait... 26 27error[E0404]: expected trait, found struct `Vec` 28 --> $DIR/not-on-struct.rs:10:29 29 | 30LL | type TypeAlias<T> = Box<dyn Vec<T>>; 31 | ^^^^^^ not a trait 32 33error[E0404]: expected trait, found struct `A` 34 --> $DIR/not-on-struct.rs:13:11 35 | 36LL | fn a() -> A + 'static { 37 | ^ not a trait 38 | 39help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way 40 --> $DIR/not-on-struct.rs:13:15 41 | 42LL | fn a() -> A + 'static { 43 | - ^^^^^^^ ...because of this bound 44 | | 45 | expected this type to be a trait... 46help: if you meant to use a type and not a trait here, remove the bounds 47 | 48LL - fn a() -> A + 'static { 49LL + fn a() -> A { 50 | 51 52error[E0404]: expected trait, found enum `Result` 53 --> $DIR/not-on-struct.rs:16:34 54 | 55LL | fn b<'a,T,E>(iter: Iterator<Item=Result<T,E> + 'a>) { 56 | ^^^^^^^^^^^ not a trait 57 | 58help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way 59 --> $DIR/not-on-struct.rs:16:48 60 | 61LL | fn b<'a,T,E>(iter: Iterator<Item=Result<T,E> + 'a>) { 62 | ----------- ^^ ...because of this bound 63 | | 64 | expected this type to be a trait... 65help: if you meant to use a type and not a trait here, remove the bounds 66 | 67LL - fn b<'a,T,E>(iter: Iterator<Item=Result<T,E> + 'a>) { 68LL + fn b<'a,T,E>(iter: Iterator<Item=Result<T,E>>) { 69 | 70 71error[E0404]: expected trait, found struct `A` 72 --> $DIR/not-on-struct.rs:19:21 73 | 74LL | fn c() -> 'static + A { 75 | ^ not a trait 76 | 77help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way 78 --> $DIR/not-on-struct.rs:19:11 79 | 80LL | fn c() -> 'static + A { 81 | ^^^^^^^ - expected this type to be a trait... 82 | | 83 | ...because of this bound 84help: if you meant to use a type and not a trait here, remove the bounds 85 | 86LL - fn c() -> 'static + A { 87LL + fn c() -> A { 88 | 89 90error[E0404]: expected trait, found enum `Result` 91 --> $DIR/not-on-struct.rs:22:39 92 | 93LL | fn d<'a,T,E>(iter: Iterator<Item='a + Result<T,E>>) { 94 | ^^^^^^^^^^^ not a trait 95 | 96help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way 97 --> $DIR/not-on-struct.rs:22:34 98 | 99LL | fn d<'a,T,E>(iter: Iterator<Item='a + Result<T,E>>) { 100 | ^^ ----------- expected this type to be a trait... 101 | | 102 | ...because of this bound 103help: if you meant to use a type and not a trait here, remove the bounds 104 | 105LL - fn d<'a,T,E>(iter: Iterator<Item='a + Result<T,E>>) { 106LL + fn d<'a,T,E>(iter: Iterator<Item=Result<T,E>>) { 107 | 108 109error[E0404]: expected trait, found struct `A` 110 --> $DIR/not-on-struct.rs:25:21 111 | 112LL | fn e() -> 'static + A + 'static { 113 | ^ not a trait 114 | 115help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way 116 --> $DIR/not-on-struct.rs:25:11 117 | 118LL | fn e() -> 'static + A + 'static { 119 | ^^^^^^^ - ^^^^^^^ ...because of these bounds 120 | | 121 | expected this type to be a trait... 122help: if you meant to use a type and not a trait here, remove the bounds 123 | 124LL - fn e() -> 'static + A + 'static { 125LL + fn e() -> A { 126 | 127 128error[E0404]: expected trait, found enum `Result` 129 --> $DIR/not-on-struct.rs:29:39 130 | 131LL | fn f<'a,T,E>(iter: Iterator<Item='a + Result<T,E> + 'a>) { 132 | ^^^^^^^^^^^ not a trait 133 | 134help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way 135 --> $DIR/not-on-struct.rs:29:34 136 | 137LL | fn f<'a,T,E>(iter: Iterator<Item='a + Result<T,E> + 'a>) { 138 | ^^ ----------- ^^ ...because of these bounds 139 | | 140 | expected this type to be a trait... 141help: if you meant to use a type and not a trait here, remove the bounds 142 | 143LL - fn f<'a,T,E>(iter: Iterator<Item='a + Result<T,E> + 'a>) { 144LL + fn f<'a,T,E>(iter: Iterator<Item=Result<T,E>>) { 145 | 146 147error[E0404]: expected trait, found struct `Traitor` 148 --> $DIR/not-on-struct.rs:35:11 149 | 150LL | trait Trait {} 151 | ----------- similarly named trait `Trait` defined here 152LL | fn g() -> Traitor + 'static { 153 | ^^^^^^^ not a trait 154 | 155help: `+` is used to constrain a "trait object" type with lifetimes or auto-traits; structs and enums can't be bound in that way 156 --> $DIR/not-on-struct.rs:35:21 157 | 158LL | fn g() -> Traitor + 'static { 159 | ------- ^^^^^^^ ...because of this bound 160 | | 161 | expected this type to be a trait... 162help: if you meant to use a type and not a trait here, remove the bounds 163 | 164LL - fn g() -> Traitor + 'static { 165LL + fn g() -> Traitor { 166 | 167help: a trait with a similar name exists 168 | 169LL | fn g() -> Trait + 'static { 170 | ~~~~~ 171 172error: aborting due to 11 previous errors 173 174Some errors have detailed explanations: E0226, E0404. 175For more information about an error, try `rustc --explain E0226`.