|
| 1 | +error[E0391]: cycle detected when evaluating type-level constant |
| 2 | + --> $DIR/const_block.rs:7:36 |
| 3 | + | |
| 4 | +LL | fn bar(x: pattern_type!(u32 is 0..=const{ 5 + 5 })) {} |
| 5 | + | ^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | +note: ...which requires const-evaluating + checking `bar::{constant#2}`... |
| 8 | + --> $DIR/const_block.rs:7:36 |
| 9 | + | |
| 10 | +LL | fn bar(x: pattern_type!(u32 is 0..=const{ 5 + 5 })) {} |
| 11 | + | ^^^^^^^^^^^^^^ |
| 12 | +note: ...which requires caching mir of `bar::{constant#2}` for CTFE... |
| 13 | + --> $DIR/const_block.rs:7:36 |
| 14 | + | |
| 15 | +LL | fn bar(x: pattern_type!(u32 is 0..=const{ 5 + 5 })) {} |
| 16 | + | ^^^^^^^^^^^^^^ |
| 17 | +note: ...which requires elaborating drops for `bar::{constant#2}`... |
| 18 | + --> $DIR/const_block.rs:7:36 |
| 19 | + | |
| 20 | +LL | fn bar(x: pattern_type!(u32 is 0..=const{ 5 + 5 })) {} |
| 21 | + | ^^^^^^^^^^^^^^ |
| 22 | +note: ...which requires borrow-checking `bar::{constant#2}`... |
| 23 | + --> $DIR/const_block.rs:7:36 |
| 24 | + | |
| 25 | +LL | fn bar(x: pattern_type!(u32 is 0..=const{ 5 + 5 })) {} |
| 26 | + | ^^^^^^^^^^^^^^ |
| 27 | +note: ...which requires borrow-checking `bar::{constant#0}`... |
| 28 | + --> $DIR/const_block.rs:7:41 |
| 29 | + | |
| 30 | +LL | fn bar(x: pattern_type!(u32 is 0..=const{ 5 + 5 })) {} |
| 31 | + | ^^^^^^^^^ |
| 32 | +note: ...which requires promoting constants in MIR for `bar::{constant#0}`... |
| 33 | + --> $DIR/const_block.rs:7:41 |
| 34 | + | |
| 35 | +LL | fn bar(x: pattern_type!(u32 is 0..=const{ 5 + 5 })) {} |
| 36 | + | ^^^^^^^^^ |
| 37 | +note: ...which requires const checking `bar::{constant#0}`... |
| 38 | + --> $DIR/const_block.rs:7:41 |
| 39 | + | |
| 40 | +LL | fn bar(x: pattern_type!(u32 is 0..=const{ 5 + 5 })) {} |
| 41 | + | ^^^^^^^^^ |
| 42 | +note: ...which requires building MIR for `bar::{constant#0}`... |
| 43 | + --> $DIR/const_block.rs:7:41 |
| 44 | + | |
| 45 | +LL | fn bar(x: pattern_type!(u32 is 0..=const{ 5 + 5 })) {} |
| 46 | + | ^^^^^^^^^ |
| 47 | +note: ...which requires match-checking `bar::{constant#0}`... |
| 48 | + --> $DIR/const_block.rs:7:41 |
| 49 | + | |
| 50 | +LL | fn bar(x: pattern_type!(u32 is 0..=const{ 5 + 5 })) {} |
| 51 | + | ^^^^^^^^^ |
| 52 | +note: ...which requires type-checking `bar::{constant#0}`... |
| 53 | + --> $DIR/const_block.rs:7:41 |
| 54 | + | |
| 55 | +LL | fn bar(x: pattern_type!(u32 is 0..=const{ 5 + 5 })) {} |
| 56 | + | ^^^^^^^^^ |
| 57 | +note: ...which requires type-checking `bar`... |
| 58 | + --> $DIR/const_block.rs:7:1 |
| 59 | + | |
| 60 | +LL | fn bar(x: pattern_type!(u32 is 0..=const{ 5 + 5 })) {} |
| 61 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 62 | + = note: ...which again requires evaluating type-level constant, completing the cycle |
| 63 | +note: cycle used when checking that `bar` is well-formed |
| 64 | + --> $DIR/const_block.rs:7:1 |
| 65 | + | |
| 66 | +LL | fn bar(x: pattern_type!(u32 is 0..=const{ 5 + 5 })) {} |
| 67 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 68 | + = 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 |
| 69 | + |
| 70 | +error: aborting due to 1 previous error |
| 71 | + |
| 72 | +For more information about this error, try `rustc --explain E0391`. |
0 commit comments