|
| 1 | +error[E0391]: cycle detected when computing type of opaque `f::{opaque#0}` |
| 2 | + --> $DIR/const_check_false_cycle.rs:5:17 |
| 3 | + | |
| 4 | +LL | const fn f() -> impl Eq { |
| 5 | + | ^^^^^^^ |
| 6 | + | |
| 7 | +note: ...which requires borrow-checking `f`... |
| 8 | + --> $DIR/const_check_false_cycle.rs:5:1 |
| 9 | + | |
| 10 | +LL | const fn f() -> impl Eq { |
| 11 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 12 | +note: ...which requires promoting constants in MIR for `f`... |
| 13 | + --> $DIR/const_check_false_cycle.rs:5:1 |
| 14 | + | |
| 15 | +LL | const fn f() -> impl Eq { |
| 16 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 17 | +note: ...which requires const checking `f`... |
| 18 | + --> $DIR/const_check_false_cycle.rs:5:1 |
| 19 | + | |
| 20 | +LL | const fn f() -> impl Eq { |
| 21 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 22 | + = note: ...which requires computing whether `f::{opaque#0}` is freeze... |
| 23 | + = note: ...which requires evaluating trait selection obligation `f::{opaque#0}: core::marker::Freeze`... |
| 24 | + = note: ...which again requires computing type of opaque `f::{opaque#0}`, completing the cycle |
| 25 | +note: cycle used when computing type of `f::{opaque#0}` |
| 26 | + --> $DIR/const_check_false_cycle.rs:5:17 |
| 27 | + | |
| 28 | +LL | const fn f() -> impl Eq { |
| 29 | + | ^^^^^^^ |
| 30 | + = 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 |
| 31 | + |
| 32 | +error: aborting due to 1 previous error |
| 33 | + |
| 34 | +For more information about this error, try `rustc --explain E0391`. |
0 commit comments