]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/inductive-overflow/two-traits.stderr
Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle
[rust.git] / tests / ui / traits / inductive-overflow / two-traits.stderr
1 error[E0277]: `T` cannot be shared between threads safely
2   --> $DIR/two-traits.rs:11:14
3    |
4 LL |     type X = Self;
5    |              ^^^^ `T` cannot be shared between threads safely
6    |
7 note: required by a bound in `Magic::X`
8   --> $DIR/two-traits.rs:8:13
9    |
10 LL |     type X: Trait;
11    |             ^^^^^ required by this bound in `Magic::X`
12 help: consider further restricting this bound
13    |
14 LL | impl<T: Magic + std::marker::Sync> Magic for T {
15    |               +++++++++++++++++++
16
17 error[E0275]: overflow evaluating the requirement `*mut (): Magic`
18   --> $DIR/two-traits.rs:20:5
19    |
20 LL |     wizard::<*mut ()>();
21    |     ^^^^^^^^^^^^^^^^^
22    |
23 note: required by a bound in `wizard`
24   --> $DIR/two-traits.rs:17:14
25    |
26 LL | fn wizard<T: Magic>() { check::<<T as Magic>::X>(); }
27    |              ^^^^^ required by this bound in `wizard`
28
29 error: aborting due to 2 previous errors
30
31 Some errors have detailed explanations: E0275, E0277.
32 For more information about an error, try `rustc --explain E0275`.