1
Fork 0
rust/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr

21 lines
764 B
Text
Raw Normal View History

2018-08-08 14:28:26 +02:00
error[E0568]: auto traits cannot have super traits
2018-12-25 08:56:47 -07:00
--> $DIR/traits-inductive-overflow-supertrait-oibit.rs:7:1
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | auto trait Magic: Copy {}
2018-08-08 14:28:26 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `NoClone: std::marker::Copy` is not satisfied
2018-12-25 08:56:47 -07:00
--> $DIR/traits-inductive-overflow-supertrait-oibit.rs:15:18
2018-08-08 14:28:26 +02:00
|
LL | fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }
| --------------------------------- required by `copy`
...
2019-03-09 15:03:44 +03:00
LL | let (a, b) = copy(NoClone);
2018-08-08 14:28:26 +02:00
| ^^^^ the trait `std::marker::Copy` is not implemented for `NoClone`
|
= note: required because of the requirements on the impl of `Magic` for `NoClone`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.