|
| 1 | +error[E0391]: cycle detected when computing type of `Bar::{opaque#0}` |
| 2 | + --> $DIR/in-where-clause.rs:5:12 |
| 3 | + | |
| 4 | +LL | type Bar = impl Sized; |
| 5 | + | ^^^^^^^^^^ |
| 6 | + | |
| 7 | +note: ...which requires computing type of opaque `Bar::{opaque#0}`... |
| 8 | + --> $DIR/in-where-clause.rs:5:12 |
| 9 | + | |
| 10 | +LL | type Bar = impl Sized; |
| 11 | + | ^^^^^^^^^^ |
| 12 | +note: ...which requires type-checking `foo`... |
| 13 | + --> $DIR/in-where-clause.rs:9:1 |
| 14 | + | |
| 15 | +LL | / fn foo() -> Bar |
| 16 | +LL | | where |
| 17 | +LL | | Bar: Send, |
| 18 | + | |______________^ |
| 19 | + = note: ...which requires revealing opaque types in `[Binder { value: TraitPredicate(<Bar as core::marker::Send>, polarity:Positive), bound_vars: [] }]`... |
| 20 | + = note: ...which again requires computing type of `Bar::{opaque#0}`, completing the cycle |
| 21 | +note: cycle used when checking that `Bar::{opaque#0}` is well-formed |
| 22 | + --> $DIR/in-where-clause.rs:5:12 |
| 23 | + | |
| 24 | +LL | type Bar = impl Sized; |
| 25 | + | ^^^^^^^^^^ |
| 26 | + = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information |
| 27 | + |
| 28 | +error[E0391]: cycle detected when computing type of opaque `Bar::{opaque#0}` |
| 29 | + --> $DIR/in-where-clause.rs:5:12 |
| 30 | + | |
| 31 | +LL | type Bar = impl Sized; |
| 32 | + | ^^^^^^^^^^ |
| 33 | + | |
| 34 | +note: ...which requires type-checking `foo`... |
| 35 | + --> $DIR/in-where-clause.rs:13:9 |
| 36 | + | |
| 37 | +LL | [0; 1 + 2] |
| 38 | + | ^^^^^ |
| 39 | + = note: ...which requires evaluating trait selection obligation `Bar: core::marker::Send`... |
| 40 | + = note: ...which again requires computing type of opaque `Bar::{opaque#0}`, completing the cycle |
| 41 | +note: cycle used when computing type of `Bar::{opaque#0}` |
| 42 | + --> $DIR/in-where-clause.rs:5:12 |
| 43 | + | |
| 44 | +LL | type Bar = impl Sized; |
| 45 | + | ^^^^^^^^^^ |
| 46 | + = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information |
| 47 | + |
| 48 | +error: aborting due to 2 previous errors |
| 49 | + |
| 50 | +For more information about this error, try `rustc --explain E0391`. |
0 commit comments