rust/src/test/ui/traits/trait-bounds-not-on-struct.stderr

16 lines
463 B
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0404]: expected trait, found struct `Foo`
2018-12-25 09:56:47 -06:00
--> $DIR/trait-bounds-not-on-struct.rs:5:16
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | fn foo(_x: Box<Foo + Send>) { }
2018-08-08 07:28:26 -05:00
| ^^^ not a trait
error[E0404]: expected trait, found struct `Vec`
2018-12-25 09:56:47 -06:00
--> $DIR/trait-bounds-not-on-struct.rs:7:21
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | type A<T> = Box<dyn Vec<T>>;
2018-08-08 07:28:26 -05:00
| ^^^^^^ not a trait
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0404`.