Forbid generic parameters in types of #[type_const] items fixes rust-lang/rust#150614 we enforce the same restriction on `#[type_const]` const items that already exists for const generic parameters - when `generic_const_parameter_types` feature gate is not enabled, the type of a `#[type_const]` item cannot reference generic parameters. implementation follows the same pattern used for const generic parameters. we check if the item has the `#[type_const]` attribute and if the feature gate is disabled, then we apply `RibKind::ConstParamTy` restrictions when visiting the type, which prevents the use of generic parameters. check is added in three places: - Free const items (`ItemKind::Const`) - Trait associated consts (`AssocItemKind::Const` in traits) - Impl associated consts (`AssocItemKind::Const` in impls) added tests for new feature, hope i get this task right :> r? `@BoxyUwU` |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| messages.ftl | ||