|
| 1 | +error[E0391]: cycle detected when building THIR for `defines` |
| 2 | + --> $DIR/non-structural-match-types-cycle-err.rs:19:9 |
| 3 | + | |
| 4 | +LL | AnyOption::<_>::NONE => {} |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | +note: ...which requires evaluating type-level constant... |
| 8 | + --> $DIR/non-structural-match-types-cycle-err.rs:5:5 |
| 9 | + | |
| 10 | +LL | const NONE: Option<T> = None; |
| 11 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 12 | +note: ...which requires const-evaluating + checking `<impl at $DIR/non-structural-match-types-cycle-err.rs:4:1: 4:21>::NONE`... |
| 13 | + --> $DIR/non-structural-match-types-cycle-err.rs:5:5 |
| 14 | + | |
| 15 | +LL | const NONE: Option<T> = None; |
| 16 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 17 | + = note: ...which requires computing layout of `core::option::Option<{async block@$DIR/non-structural-match-types-cycle-err.rs:18:16: 18:21}>`... |
| 18 | + = note: ...which requires computing layout of `{async block@$DIR/non-structural-match-types-cycle-err.rs:18:16: 18:21}`... |
| 19 | +note: ...which requires optimizing MIR for `defines::{closure#0}`... |
| 20 | + --> $DIR/non-structural-match-types-cycle-err.rs:18:16 |
| 21 | + | |
| 22 | +LL | match Some(async {}) { |
| 23 | + | ^^^^^ |
| 24 | +note: ...which requires elaborating drops for `defines::{closure#0}`... |
| 25 | + --> $DIR/non-structural-match-types-cycle-err.rs:18:16 |
| 26 | + | |
| 27 | +LL | match Some(async {}) { |
| 28 | + | ^^^^^ |
| 29 | +note: ...which requires borrow-checking `defines`... |
| 30 | + --> $DIR/non-structural-match-types-cycle-err.rs:17:1 |
| 31 | + | |
| 32 | +LL | fn defines() { |
| 33 | + | ^^^^^^^^^^^^ |
| 34 | +note: ...which requires promoting constants in MIR for `defines`... |
| 35 | + --> $DIR/non-structural-match-types-cycle-err.rs:17:1 |
| 36 | + | |
| 37 | +LL | fn defines() { |
| 38 | + | ^^^^^^^^^^^^ |
| 39 | +note: ...which requires checking if `defines` contains FFI-unwind calls... |
| 40 | + --> $DIR/non-structural-match-types-cycle-err.rs:17:1 |
| 41 | + | |
| 42 | +LL | fn defines() { |
| 43 | + | ^^^^^^^^^^^^ |
| 44 | +note: ...which requires building MIR for `defines`... |
| 45 | + --> $DIR/non-structural-match-types-cycle-err.rs:17:1 |
| 46 | + | |
| 47 | +LL | fn defines() { |
| 48 | + | ^^^^^^^^^^^^ |
| 49 | +note: ...which requires match-checking `defines`... |
| 50 | + --> $DIR/non-structural-match-types-cycle-err.rs:17:1 |
| 51 | + | |
| 52 | +LL | fn defines() { |
| 53 | + | ^^^^^^^^^^^^ |
| 54 | + = note: ...which again requires building THIR for `defines`, completing the cycle |
| 55 | +note: cycle used when unsafety-checking `defines` |
| 56 | + --> $DIR/non-structural-match-types-cycle-err.rs:17:1 |
| 57 | + | |
| 58 | +LL | fn defines() { |
| 59 | + | ^^^^^^^^^^^^ |
| 60 | + = 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 |
| 61 | + |
| 62 | +error: aborting due to 1 previous error |
| 63 | + |
| 64 | +For more information about this error, try `rustc --explain E0391`. |
0 commit comments