When `#![feature(min_generic_const_args)]` is enabled, we now lower all const paths in generic arg position to `hir::ConstArgKind::Path`. We then lower assoc const paths to `ty::ConstKind::Unevaluated` since we can no longer use the anon const expression lowering machinery. In the process of implementing this, I factored out `hir_ty_lowering` code that is now shared between lowering assoc types and assoc consts. This PR also introduces a `#[type_const]` attribute for trait assoc consts that are allowed as const args. However, we still need to implement code to check that assoc const definitions satisfy `#[type_const]` if present (basically is it a const path or a monomorphic anon const).
14 lines
560 B
Plaintext
14 lines
560 B
Plaintext
error[E0658]: inherent associated types are unstable
|
|
--> $DIR/inherent-const-gating.rs:11:18
|
|
|
|
|
LL | let _x: [(); S::N] = todo!();
|
|
| ^^^^
|
|
|
|
|
= note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
|
|
= help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0658`.
|