|
| 1 | +error[E0425]: cannot find value `bar` in this scope |
| 2 | + --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:1:30 |
| 3 | + | |
| 4 | +LL | trait Trait<const N: Trait = bar> { |
| 5 | + | ^^^ not found in this scope |
| 6 | + |
| 7 | +warning: trait objects without an explicit `dyn` are deprecated |
| 8 | + --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:1:22 |
| 9 | + | |
| 10 | +LL | trait Trait<const N: Trait = bar> { |
| 11 | + | ^^^^^ |
| 12 | + | |
| 13 | + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! |
| 14 | + = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> |
| 15 | + = note: `#[warn(bare_trait_objects)]` on by default |
| 16 | +help: if this is an object-safe trait, use `dyn` |
| 17 | + | |
| 18 | +LL | trait Trait<const N: dyn Trait = bar> { |
| 19 | + | +++ |
| 20 | + |
| 21 | +error[E0391]: cycle detected when computing type of `Trait::N` |
| 22 | + --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:1:22 |
| 23 | + | |
| 24 | +LL | trait Trait<const N: Trait = bar> { |
| 25 | + | ^^^^^ |
| 26 | + | |
| 27 | + = note: ...which immediately requires computing type of `Trait::N` again |
| 28 | +note: cycle used when computing explicit predicates of trait `Trait` |
| 29 | + --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:1:1 |
| 30 | + | |
| 31 | +LL | trait Trait<const N: Trait = bar> { |
| 32 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 33 | + = 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 |
| 34 | + |
| 35 | +error[E0391]: cycle detected when computing type of `Trait::N` |
| 36 | + --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:1:13 |
| 37 | + | |
| 38 | +LL | trait Trait<const N: Trait = bar> { |
| 39 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 40 | + | |
| 41 | + = note: ...which immediately requires computing type of `Trait::N` again |
| 42 | +note: cycle used when computing explicit predicates of trait `Trait` |
| 43 | + --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:1:1 |
| 44 | + | |
| 45 | +LL | trait Trait<const N: Trait = bar> { |
| 46 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 47 | + = 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 |
| 48 | + |
| 49 | +error: `(dyn Trait<{const error}> + 'static)` is forbidden as the type of a const generic parameter |
| 50 | + --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:1:22 |
| 51 | + | |
| 52 | +LL | trait Trait<const N: Trait = bar> { |
| 53 | + | ^^^^^ |
| 54 | + | |
| 55 | + = note: the only supported types are integers, `bool` and `char` |
| 56 | + |
| 57 | +error: aborting due to 4 previous errors; 1 warning emitted |
| 58 | + |
| 59 | +Some errors have detailed explanations: E0391, E0425. |
| 60 | +For more information about an error, try `rustc --explain E0391`. |
0 commit comments