rust/src/test/ui/traits/inductive-overflow/two-traits.stderr

28 lines
867 B
Plaintext
Raw Normal View History

error[E0277]: `T` cannot be shared between threads safely
2021-02-08 16:15:45 -06:00
--> $DIR/two-traits.rs:11:5
|
LL | type X: Trait;
| ----- required by this bound in `Magic::X`
...
LL | type X = Self;
| ^^^^^^^^^^^^^^ `T` cannot be shared between threads safely
|
help: consider further restricting this bound
|
LL | impl<T: Magic + std::marker::Sync> Magic for T {
| +++++++++++++++++++
2018-08-08 07:28:26 -05:00
error[E0275]: overflow evaluating the requirement `*mut (): Magic`
2021-02-08 16:15:45 -06:00
--> $DIR/two-traits.rs:20:5
2018-08-08 07:28:26 -05:00
|
LL | fn wizard<T: Magic>() { check::<<T as Magic>::X>(); }
2020-04-06 00:15:06 -05:00
| ----- required by this bound in `wizard`
...
2019-03-09 06:03:44 -06:00
LL | wizard::<*mut ()>();
2018-08-08 07:28:26 -05:00
| ^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
2018-08-08 07:28:26 -05:00
Some errors have detailed explanations: E0275, E0277.
For more information about an error, try `rustc --explain E0275`.