diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index 2f1a547e05a48..bd1db99c3766b 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -2402,7 +2402,7 @@ pub struct BorrowedFnSig<'a> { /// * the `G = Ty` in `Trait = Ty>` /// * the `A: Bound` in `Trait` /// * the `RetTy` in `Trait(ArgTy, ArgTy) -> RetTy` -/// * the `C = { Ct }` in `Trait` (feature `min_generic_const_args`) +/// * the `C = { Ct }` in `Trait` (feature `gca_min_const_items`) /// * the `f(..): Bound` in `Trait` (feature `return_type_notation`) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] pub struct AssocItemConstraint { diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index d2748ad4632f1..b10279d71e566 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -1403,7 +1403,7 @@ impl<'hir> LoweringContext<'_, 'hir> { // type and value namespaces. If we resolved the path in the value namespace, we // transform it into a generic const argument. // - // Note that even under `#![feature(min_generic_const_args)]`, only plain paths + // Note that even under `#![feature(gca_min_const_items)]`, only plain paths // to constants are allowed - e.g. `A::` and // `A::>` are disallowed (they must be wrapped in `{ }`). // @@ -1420,7 +1420,7 @@ impl<'hir> LoweringContext<'_, 'hir> { let ct = self.arena.alloc(ct); return GenericArg::Const(ct.try_as_ambig_ct().unwrap()); } - TyKind::GcaMacro(expr) if self.tcx.features().min_generic_const_args() => { + TyKind::GcaMacro(expr) if self.tcx.features().gca_min_const_items() => { let ct = match self.can_lower_expr_to_const_arg_direct( expr, DirectConstArgContext::MacrolessMinGenericConstArgs, @@ -2558,7 +2558,7 @@ impl<'hir> LoweringContext<'_, 'hir> { // We cannot just match on `ExprKind::Underscore` as `(_)` is represented as // `ExprKind::Paren(ExprKind::Underscore)` and should also be lowered to `GenericArg::Infer` // - // FIXME(macroless_generic_const_args): Handling of underscores should be moved into + // FIXME(gca_macroless_args): Handling of underscores should be moved into // lower_expr_to_const_arg_direct. It is left here as retaining compatibility of what is // currently allowed on stable gets hairy and annoying otherwise. match c.value.peel_parens().kind { @@ -2632,7 +2632,7 @@ impl<'hir> LoweringContext<'_, 'hir> { span: Span, ) -> hir::ConstItemRhs<'hir> { let is_direct = |body| { - if self.tcx.features().macroless_const_item_generic_const_args() { + if self.tcx.features().gca_macroless_items() { self.can_lower_expr_to_const_arg_direct( body, DirectConstArgContext::MacrolessMinGenericConstArgs, @@ -2645,7 +2645,7 @@ impl<'hir> LoweringContext<'_, 'hir> { matches!(body, Expr { kind: ExprKind::GcaMacro(_), .. }) } }; - if self.tcx.features().min_generic_const_args() + if self.tcx.features().gca_min_const_items() && let Some(body) = body && is_direct(body) { @@ -2658,9 +2658,9 @@ impl<'hir> LoweringContext<'_, 'hir> { } fn ambient_direct_const_arg_context(&self) -> DirectConstArgContext { - if self.tcx.features().macroless_generic_const_args() { + if self.tcx.features().gca_macroless_args() { DirectConstArgContext::MacrolessMinGenericConstArgs - } else if self.tcx.features().min_generic_const_args() { + } else if self.tcx.features().gca_min_const_items() { DirectConstArgContext::MinGenericConstArgs } else { DirectConstArgContext::Stable @@ -2965,7 +2965,7 @@ impl<'hir> LoweringContext<'_, 'hir> { fn lower_anon_const_to_const_arg(&mut self, anon: &AnonConst) -> hir::ConstArg<'hir> { // Stable only allows one nesting of blocks for directly represented paths. mGCA allows // arbitrarily many, and are handled inside lower_expr_to_const_arg_direct for consistency. - let expr = if self.tcx.features().macroless_generic_const_args() { + let expr = if self.tcx.features().gca_macroless_args() { &anon.value } else { anon.value.maybe_unwrap_block() diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index c1134e1dd7300..9d0ca67ce93d5 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -442,12 +442,12 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) { gate_all!(final_associated_functions, "`final` on trait functions is experimental"); gate_all!(fn_delegation, "functions delegation is not yet fully implemented"); gate_all!(frontmatter, "frontmatters are experimental"); + gate_all!(gca_min_const_items, "unbraced const blocks as const args are experimental"); gate_all!(gen_blocks, "gen blocks are experimental"); gate_all!(generic_const_items, "generic const items are experimental"); gate_all!(global_registration, "global registration is experimental"); gate_all!(guard_patterns, "guard patterns are experimental", "consider using match arm guards"); gate_all!(impl_restriction, "`impl` restrictions are experimental"); - gate_all!(min_generic_const_args, "unbraced const blocks as const args are experimental"); gate_all!(more_qualified_paths, "usage of qualified paths in this context is experimental"); gate_all!(move_expr, "`move(expr)` syntax is experimental"); gate_all!(mut_ref, "mutable by-reference bindings are experimental"); @@ -490,9 +490,9 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) { "named parameters in parenthesized generic argument lists are experimental" ); - // `associated_const_equality` will be stabilized as part of `min_generic_const_args`. + // `associated_const_equality` will be stabilized as part of `gca_min_const_items`. for &span in spans.get(&sym::associated_const_equality).into_flat_iter() { - gate!(visitor, min_generic_const_args, span, "associated const equality is incomplete"); + gate!(visitor, gca_min_const_items, span, "associated const equality is incomplete"); } // Negative bounds are *super* internal. We require `-Zinternal-testing-features` *and* @@ -703,13 +703,13 @@ fn check_features_requiring_new_solver(sess: &Session, features: &Features) { if let Some(gca_span) = features .enabled_lang_features() .iter() - .find(|feat| feat.gate_name == sym::generic_const_args) + .find(|feat| feat.gate_name == sym::gca_const_items) .map(|feat| feat.attr_sp) { #[allow(rustc::symbol_intern_string_literal)] sess.dcx().emit_err(diagnostics::MissingDependentFeatures { parent_span: gca_span, - parent: sym::generic_const_args, + parent: sym::gca_const_items, missing: String::from("-Znext-solver=globally"), }); } diff --git a/compiler/rustc_attr_parsing/src/attributes/semantics.rs b/compiler/rustc_attr_parsing/src/attributes/semantics.rs index bc3fee8bc0ba3..6c4cd5ef667c8 100644 --- a/compiler/rustc_attr_parsing/src/attributes/semantics.rs +++ b/compiler/rustc_attr_parsing/src/attributes/semantics.rs @@ -28,6 +28,6 @@ impl NoArgsAttributeParser for AlwaysGcaParser { const PATH: &[Symbol] = &[sym::rustc_always_gca]; const ALLOWED_TARGETS: AllowedTargets<'_> = AllowedTargets::AllowList(&[Allow(Target::AssocConst(AssocCtxt::Trait))]); - const STABILITY: AttributeStability = unstable!(min_generic_const_args); + const STABILITY: AttributeStability = unstable!(gca_min_const_items); const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::AlwaysGca; } diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index 403617f7bfa6f..5e89a060e3335 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -63,7 +63,7 @@ declare_features! ( (removed, allow_fail, "1.60.0", Some(46488), Some("removed due to no clear use cases"), 93416), /// Allows users to enforce equality of associated constants `TraitImpl`. (removed, associated_const_equality, "1.94.0", Some(92827), - Some("merged into `min_generic_const_args`")), + Some("merged into `gca_min_const_items`")), (removed, await_macro, "1.38.0", Some(50547), Some("subsumed by `.await` syntax"), 62293), /// Allows using `box` in patterns (RFC 469). @@ -167,6 +167,7 @@ declare_features! ( ), 133768 ), + (removed, generic_const_args, "CURRENT_RUSTC_VERSION", Some(151972), Some("renamed to `gca_const_items`")), (removed, import_shadowing, "1.0.0", None, None), /// Allows in-band quantification of lifetime bindings (e.g., `fn foo(x: &'a u8) -> &'a u8`). (removed, in_band_lifetimes, "1.61.0", Some(44524), @@ -192,9 +193,12 @@ declare_features! ( which is available from cargo build scripts with `cargo:rustc-link-arg` now"), 83820), (removed, macro_reexport, "1.0.0", Some(29638), Some("subsumed by `pub use`"), 49982), + (removed, macroless_const_item_generic_const_args, "CURRENT_RUSTC_VERSION", Some(162540), Some("renamed to `gca_macroless_items`")), + (removed, macroless_generic_const_args, "CURRENT_RUSTC_VERSION", Some(159006), Some("renamed to `gca_macroless_args`")), /// Allows using `#[main]` to replace the entrypoint `#[lang = "start"]` calls. (removed, main, "1.53.0", Some(29634), None, 84217), (removed, managed_boxes, "1.0.0", None, None), + (removed, min_generic_const_args, "CURRENT_RUSTC_VERSION", Some(132980), Some("renamed to `gca_min_const_items`")), /// Allows the use of type alias impl trait in function return positions (removed, min_type_alias_impl_trait, "1.56.0", Some(63063), Some("removed in favor of full type_alias_impl_trait"), 87564), diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index a020ff315e470..49489c0ed903d 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -546,10 +546,18 @@ declare_features! ( (internal, freeze_impls, "1.78.0", Some(121675)), /// Frontmatter `---` blocks for use by external tools. (unstable, frontmatter, "1.88.0", Some(136889)), + /// Allows using generics in more complex const expressions, based on definitional equality. + (incomplete, gca_const_items, "1.95.0", Some(151972)), + /// Allows directly represented gca_const_items without the `gca!` macro. + (incomplete, gca_macroless_args, "1.99.0", Some(159006)), + /// Allows directly represented gca_const_items as the rhs of const items without the + /// `gca!` macro. + (incomplete, gca_macroless_items, "CURRENT_RUSTC_VERSION", Some(162540)), + /// Enables the generic const args MVP (paths to type const items and constructors + /// for ADTs and primitives). + (incomplete, gca_min_const_items, "1.84.0", Some(132980)), /// Allows defining gen blocks and `gen fn`. (unstable, gen_blocks, "1.75.0", Some(117078)), - /// Allows using generics in more complex const expressions, based on definitional equality. - (incomplete, generic_const_args, "1.95.0", Some(151972)), /// Allows non-trivial generic constants which have to be shown to successfully evaluate /// to a value by being part of an item signature. (incomplete, generic_const_exprs, "1.56.0", Some(76560)), @@ -609,19 +617,11 @@ declare_features! ( (unstable, macro_metavar_expr, "1.61.0", Some(83527)), /// Provides a way to concatenate identifiers using metavariable expressions. (unstable, macro_metavar_expr_concat, "1.81.0", Some(124225)), - /// Allows directly represented generic_const_args as the rhs of const items without the - /// `gca!` macro. - (incomplete, macroless_const_item_generic_const_args, "CURRENT_RUSTC_VERSION", Some(162540)), - /// Allows directly represented generic_const_args without the `gca!` macro. - (incomplete, macroless_generic_const_args, "1.99.0", Some(159006)), /// Allows `#[marker]` on certain traits allowing overlapping implementations. (unstable, marker_trait_attr, "1.30.0", Some(29864)), /// Allows additional const parameter types, such as [u8; 10] or user defined types. /// User defined types must not have fields more private than the type itself. (unstable, min_adt_const_params, "1.96.0", Some(154042)), - /// Enables the generic const args MVP (paths to type const items and constructors - /// for ADTs and primitives). - (incomplete, min_generic_const_args, "1.84.0", Some(132980)), /// A minimal, sound subset of specialization intended to be used by the /// standard library until the soundness issues with specialization /// are fixed. @@ -859,8 +859,8 @@ pub const INCOMPATIBLE_FEATURES: &[(Symbol, Symbol)] = &[ /// Some features require one or more other features to be enabled. pub const DEPENDENT_FEATURES: &[(Symbol, &[Symbol])] = &[ - (sym::generic_const_args, &[sym::min_generic_const_args]), - (sym::macroless_generic_const_args, &[sym::min_generic_const_args]), - (sym::macroless_const_item_generic_const_args, &[sym::min_generic_const_args]), + (sym::gca_const_items, &[sym::gca_min_const_items]), + (sym::gca_macroless_args, &[sym::gca_min_const_items]), + (sym::gca_macroless_items, &[sym::gca_min_const_items]), (sym::unsized_const_params, &[sym::adt_const_params]), ]; diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index a613b992367e2..f55ab2a0ccbcc 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -3093,7 +3093,7 @@ pub enum ImplItemKind<'hir> { /// * the `G = Ty` in `Trait = Ty>` /// * the `A: Bound` in `Trait` /// * the `RetTy` in `Trait(ArgTy, ArgTy) -> RetTy` -/// * the `C = { Ct }` in `Trait` (feature `min_generic_const_args`) +/// * the `C = { Ct }` in `Trait` (feature `gca_min_const_items`) /// * the `f(..): Bound` in `Trait` (feature `return_type_notation`) #[derive(Debug, Clone, Copy, StableHash)] pub struct AssocItemConstraint<'hir> { diff --git a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs index af380929c446e..204b6f913cb8b 100644 --- a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs +++ b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs @@ -2162,8 +2162,8 @@ pub(super) fn compare_const_directness<'tcx>( if trait_is_gca == impl_is_gca { return Ok(()); } - // feature(generic_const_args) is allowed to impl non-GCA traits with a GCA const - if tcx.features().generic_const_args() && !trait_is_gca && impl_is_gca { + // feature(gca_const_items) is allowed to impl non-GCA traits with a GCA const + if tcx.features().gca_const_items() && !trait_is_gca && impl_is_gca { return Ok(()); } diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index 0a1787a23c893..541ea012bb354 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -1289,7 +1289,7 @@ pub(super) fn check_const_item<'tcx>( tcx.require_lang_item(LangItem::ConstParamTy, span), ); } - // FIXME(min_generic_const_args): We *might* want to move this check to `type_of`, so we can + // FIXME(gca_min_const_items): We *might* want to move this check to `type_of`, so we can // return `ty::Error` if it references invalid params. However, doing so is hard, because // `type_of` doesn't know if it's a direct const - `const_of_item` determines that, and // `const_of_item` calls `type_of`. diff --git a/compiler/rustc_hir_analysis/src/collect.rs b/compiler/rustc_hir_analysis/src/collect.rs index 8f693221b0fd2..c3cc3bcd6cd0c 100644 --- a/compiler/rustc_hir_analysis/src/collect.rs +++ b/compiler/rustc_hir_analysis/src/collect.rs @@ -1803,7 +1803,7 @@ fn anon_const_kind<'tcx>(tcx: TyCtxt<'tcx>, def: LocalDefId) -> ty::AnonConstKin debug_assert_matches!(const_arg.kind, hir::ConstArgKind::Anon(hir::AnonConst { def_id, .. }) if *def_id == def); if tcx.features().generic_const_exprs() { ty::AnonConstKind::GCE - } else if tcx.features().min_generic_const_args() { + } else if tcx.features().gca_min_const_items() { ty::AnonConstKind::MCG } else if let hir::Node::Expr(hir::Expr { kind: hir::ExprKind::Repeat(_, repeat_count), diff --git a/compiler/rustc_hir_analysis/src/collect/generics_of.rs b/compiler/rustc_hir_analysis/src/collect/generics_of.rs index ee4e7471ee434..9605c777e55a9 100644 --- a/compiler/rustc_hir_analysis/src/collect/generics_of.rs +++ b/compiler/rustc_hir_analysis/src/collect/generics_of.rs @@ -224,7 +224,7 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics { // Node::AnonConst, or whether it will be represented directly, so it must generate a // DefId. If it ends up being direct, this DefId is then attached to the top-level // ConstArg, which is what we are seeing here. - debug_assert!(tcx.features().min_generic_const_args()); + debug_assert!(tcx.features().gca_min_const_items()); // Forward to the real parent. Some(tcx.local_parent(def_id)) } diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs index 4bfe93f5949f7..0b7df89551da8 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs @@ -558,9 +558,9 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { if let ty::AssocTag::Const = assoc_tag && !self.tcx().is_direct_const(assoc_item.def_id) - && !tcx.features().generic_const_args() + && !tcx.features().gca_const_items() { - if tcx.features().min_generic_const_args() { + if tcx.features().gca_min_const_items() { let err = self.dcx().struct_span_err( constraint.span, "use of trait associated const not defined as `#[rustc_always_gca]`", diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs index f2cf4743d76b6..bee062b27e0f5 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs @@ -370,7 +370,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { && let Some(hir_ty) = constraint.ty() && let ty = self.lower_ty(hir_ty) && (ty.is_enum() || ty.references_error()) - && tcx.features().min_generic_const_args() + && tcx.features().gca_min_const_items() { Some(diagnostics::AssocKindMismatchWrapInBracesSugg { lo: hir_ty.span.shrink_to_lo(), diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs index 36b5f6c268e74..e9dc2a61d698d 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs @@ -419,7 +419,7 @@ impl<'tcx> ForbidParamUsesFolder<'tcx> { "generic `Self` types are currently not permitted in anonymous constants" } ForbidParamContext::ConstArgument => { - if self.tcx.features().generic_const_args() { + if self.tcx.features().gca_const_items() { "generic parameters in const blocks are not allowed; use a named `const` item instead" } else { "generic parameters may not be used in const operations" @@ -442,15 +442,15 @@ impl<'tcx> ForbidParamUsesFolder<'tcx> { } } if matches!(self.context, ForbidParamContext::ConstArgument) { - if self.tcx.features().generic_const_args() { + if self.tcx.features().gca_const_items() { diag.help("consider factoring the expression into a `type const` item and use it as the const argument instead"); - } else if self.tcx.features().min_generic_const_args() { - diag.help("add `#![feature(generic_const_args)]` and extract the expression into a `type const` item"); + } else if self.tcx.features().gca_min_const_items() { + diag.help("add `#![feature(gca_const_items)]` and extract the expression into a `type const` item"); } else if self.tcx.sess.is_nightly_build() { diag.help( "add `#![feature(generic_const_exprs)]` to allow generic const expressions", ); - diag.help("alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item"); + diag.help("alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item"); } } diag.emit_err() @@ -3127,7 +3127,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { span: Span, ) -> Result<(), ErrorGuaranteed> { let tcx = self.tcx(); - if tcx.features().generic_const_args() || alias_const.is_direct_const(tcx) { + if tcx.features().gca_const_items() || alias_const.is_direct_const(tcx) { Ok(()) } else { let mut err = self diff --git a/compiler/rustc_middle/src/queries.rs b/compiler/rustc_middle/src/queries.rs index 925fc8d06e326..ddaf12f9812aa 100644 --- a/compiler/rustc_middle/src/queries.rs +++ b/compiler/rustc_middle/src/queries.rs @@ -289,7 +289,7 @@ rustc_queries! { /// Returns the const of the RHS of a (free or assoc) const item, if it is a `type const`, or if /// it is a directly represented `const` (i.e. a const with a `gca!` RHS, or a const that - /// `feature(macroless_generic_const_args)` has decided is direct). + /// `feature(gca_macroless_args)` has decided is direct). /// /// When a const item is used in a type-level expression, like in equality for an assoc const /// projection, this allows us to retrieve the typesystem-appropriate representation of the diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs index 5520b059f5678..d97fede2b6eb8 100644 --- a/compiler/rustc_middle/src/traits/mod.rs +++ b/compiler/rustc_middle/src/traits/mod.rs @@ -993,7 +993,7 @@ pub enum MethodViolation { /// Reasons an associated const might not be dyn compatible. #[derive(Clone, Debug, PartialEq, Eq, Hash, StableHash)] pub enum AssocConstViolation { - /// Unstable feature `min_generic_const_args` wasn't enabled. + /// Unstable feature `gca_min_const_items` wasn't enabled. FeatureNotEnabled, /// Not defined as a type-level associated const. diff --git a/compiler/rustc_middle/src/ty/assoc.rs b/compiler/rustc_middle/src/ty/assoc.rs index a3ccbc7742df4..e52d74f4c23fe 100644 --- a/compiler/rustc_middle/src/ty/assoc.rs +++ b/compiler/rustc_middle/src/ty/assoc.rs @@ -143,7 +143,7 @@ impl AssocItem { match self.kind { ty::AssocKind::Type { .. } => true, ty::AssocKind::Const { .. } => { - tcx.features().generic_const_args() || tcx.is_direct_const(self.def_id) + tcx.features().gca_const_items() || tcx.is_direct_const(self.def_id) } ty::AssocKind::Fn { .. } => false, } diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 9edb12949f4cf..b4104d997137f 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -110,8 +110,8 @@ impl<'tcx> rustc_type_ir::inherent::Features> for &'tcx rustc_featu self.generic_const_exprs() } - fn generic_const_args(self) -> bool { - self.generic_const_args() + fn gca_const_items(self) -> bool { + self.gca_const_items() } fn coroutine_clone(self) -> bool { @@ -1030,7 +1030,7 @@ impl<'tcx> TyCtxt<'tcx> { /// because it has a directly represented RHS, or is a trait definition that is marked as /// requiring its implementation to have a directly represented RHS. /// - /// Note: Be very careful with using this method - under `generic_const_args`, a trait can + /// Note: Be very careful with using this method - under `gca_const_items`, a trait can /// declare a regular const, but an `impl` could implement it with a directly represented const /// (a la refinement). This method would return false in such a case. pub fn is_direct_const(self, def_id: DefId) -> bool { diff --git a/compiler/rustc_mir_build/src/builder/expr/as_constant.rs b/compiler/rustc_mir_build/src/builder/expr/as_constant.rs index 43936770ff762..854cd37ae61d3 100644 --- a/compiler/rustc_mir_build/src/builder/expr/as_constant.rs +++ b/compiler/rustc_mir_build/src/builder/expr/as_constant.rs @@ -94,13 +94,13 @@ pub(crate) fn as_constant_inner<'tcx>( if tcx.is_direct_const(def_id) { return Some(get_kind(def_id, def_kind)); } - // Under generic_const_args, `def_id` might be a regular const declared in a trait, + // Under gca_const_items, `def_id` might be a regular const declared in a trait, // but is `impl`d as a directly represented const. We do not know whether it is // here, so we must use type system normalization for all const projections. - // FIXME(generic_const_args): there's a lot to consider here! `Const::Ty` uses + // FIXME(gca_const_items): there's a lot to consider here! `Const::Ty` uses // valtrees and `Const::Unevaluated` does not, we should revisit this before // stabilization. - if tcx.features().generic_const_args() + if tcx.features().gca_const_items() && let kind @ ty::AliasConstKind::Projection { .. } = get_kind(def_id, def_kind) { return Some(kind); diff --git a/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs b/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs index 3aec71f400de3..0a040b7e7a756 100644 --- a/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs +++ b/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs @@ -136,16 +136,16 @@ impl<'tcx> ConstToPat<'tcx> { return self.mk_err(err, ty); }; - // Under generic_const_args, `alias_const` might be a regular const declared in a trait, but + // Under gca_const_items, `alias_const` might be a regular const declared in a trait, but // is `impl`d as a directly represented const. We do not know whether it is here, so we must - // use type system normalization for all consts under generic_const_args. + // use type system normalization for all consts under gca_const_items. // // We probably want to always use type system normalization on stable too, but that would be // a breaking change (in addition to needing significant improvements to diagnostics), so - // right now, we limit this to just generic_const_args. + // right now, we limit this to just gca_const_items. // // See: https://github.com/rust-lang/project-const-generics/issues/105 - let const_value = if self.tcx.features().generic_const_args() + let const_value = if self.tcx.features().gca_const_items() || alias_const.kind.is_direct_const(self.tcx) { let Ok(normalize) = self diff --git a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs index 7397d43a48a00..c87539a6941cb 100644 --- a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs @@ -1434,7 +1434,7 @@ where self.eq(param_env, expected_term, evaluated.into())?; self.evaluate_added_goals_and_make_canonical_response(Certainty::Yes) } - None if self.cx().features().generic_const_args() => { + None if self.cx().features().gca_const_items() => { // HACK(khyperia): calling `deeply_resolve_ignoring_regions` here shouldn't be necessary, // `try_evaluate_const` calls `deeply_resolve_ignoring_regions` already. However, we want // to check `has_non_region_infer` against the type with vars resolved (i.e. check diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 0ac12d6f392b2..615d1bb221cc9 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -859,7 +859,7 @@ impl<'a> Parser<'a> { true } ast::ExprKind::ConstBlock(_) => { - self.psess.gated_spans.gate(sym::min_generic_const_args, expr.span); + self.psess.gated_spans.gate(sym::gca_min_const_items, expr.span); true } _ => false, diff --git a/compiler/rustc_resolve/src/diagnostics/impls.rs b/compiler/rustc_resolve/src/diagnostics/impls.rs index 331c948c66403..2ea2f52c696ba 100644 --- a/compiler/rustc_resolve/src/diagnostics/impls.rs +++ b/compiler/rustc_resolve/src/diagnostics/impls.rs @@ -1333,7 +1333,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { name, param_kind: is_type, help: self.tcx.sess.is_nightly_build() - && !self.tcx.features().min_generic_const_args(), + && !self.tcx.features().gca_min_const_items(), is_gca, help_gca: is_gca, help_suggest_gca: self.tcx.sess.is_nightly_build() && !is_gca, diff --git a/compiler/rustc_resolve/src/diagnostics/mod.rs b/compiler/rustc_resolve/src/diagnostics/mod.rs index d17e01425d2c9..d85024603ad33 100644 --- a/compiler/rustc_resolve/src/diagnostics/mod.rs +++ b/compiler/rustc_resolve/src/diagnostics/mod.rs @@ -429,7 +429,7 @@ pub(crate) struct ParamInNonTrivialAnonConst { )] pub(crate) help_gca: bool, #[help( - "alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item" + "alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item" )] pub(crate) help_suggest_gca: bool, } diff --git a/compiler/rustc_resolve/src/ident.rs b/compiler/rustc_resolve/src/ident.rs index 9faedfeac571b..d743093aae92f 100644 --- a/compiler/rustc_resolve/src/ident.rs +++ b/compiler/rustc_resolve/src/ident.rs @@ -1658,7 +1658,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { } NoConstantGenericsReason::NonTrivialConstArg => { ResolutionError::ParamInNonTrivialAnonConst { - is_gca: self.features.generic_const_args(), + is_gca: self.features.gca_const_items(), name: rib_ident.name, param_kind: ParamKindInNonTrivialAnonConst::Type, } @@ -1750,7 +1750,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { } NoConstantGenericsReason::NonTrivialConstArg => { ResolutionError::ParamInNonTrivialAnonConst { - is_gca: self.features.generic_const_args(), + is_gca: self.features.gca_const_items(), name: rib_ident.name, param_kind: ParamKindInNonTrivialAnonConst::Const { name: rib_ident.name, diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 70e1a6f93eba1..e1787eadf5fb9 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -5232,7 +5232,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { AnonConstKind::InlineConst => ConstantHasGenerics::Yes, AnonConstKind::ConstArg(_) | AnonConstKind::ArrayLength => { if self.r.features.generic_const_exprs() - || self.r.features.min_generic_const_args() + || self.r.features.gca_min_const_items() || is_trivial_const_arg { ConstantHasGenerics::Yes diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 3dbb1b7fff662..84c07d0fb0f44 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -4164,11 +4164,11 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> { name: lifetime_ref.ident.name, param_kind: diagnostics::ParamKindInNonTrivialAnonConst::Lifetime, help: self.r.tcx.sess.is_nightly_build() - && !self.r.features.min_generic_const_args(), - is_gca: self.r.features.generic_const_args(), - help_gca: self.r.features.generic_const_args(), + && !self.r.features.gca_min_const_items(), + is_gca: self.r.features.gca_const_items(), + help_gca: self.r.features.gca_const_items(), help_suggest_gca: self.r.tcx.sess.is_nightly_build() - && !self.r.features.generic_const_args(), + && !self.r.features.gca_const_items(), }) } } diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index b490362a34ee4..e62ad42875248 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1067,6 +1067,10 @@ symbols! { future_trait, fxsr, gca, + gca_const_items, + gca_macroless_args, + gca_macroless_items, + gca_min_const_items, gdb_script_file, ge, gen_blocks, diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs index 062b087413e4f..63b0733b0a095 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs @@ -3984,8 +3984,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { obligation: &PredicateObligation<'tcx>, span: Span, ) -> Result, ErrorGuaranteed> { - if !self.tcx.features().generic_const_exprs() - && !self.tcx.features().min_generic_const_args() + if !self.tcx.features().generic_const_exprs() && !self.tcx.features().gca_min_const_items() { let guar = self .dcx() diff --git a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs index 9bcbf393dd05b..9acc0682e6641 100644 --- a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs +++ b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs @@ -84,7 +84,7 @@ pub fn is_const_evaluatable<'tcx>( } _ => bug!("unexpected constkind in `is_const_evalautable: {unexpanded_ct:?}`"), } - } else if tcx.features().min_generic_const_args() { + } else if tcx.features().gca_min_const_items() { // This is a sanity check to make sure that non-generics consts are checked to // be evaluatable in case they aren't cchecked elsewhere. This will NOT error // if the const uses generics, as desired. diff --git a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs index 59f3ebfcce33e..c598e0ef8a8bd 100644 --- a/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs +++ b/compiler/rustc_trait_selection/src/traits/dyn_compatibility.rs @@ -368,10 +368,10 @@ pub fn dyn_compatibility_violations_for_assoc_item( let mut errors = Vec::new(); - if tcx.features().min_generic_const_args() { + if tcx.features().gca_min_const_items() { if !tcx.generics_of(item.def_id).is_own_empty() { errors.push(AssocConstViolation::Generic); - } else if !tcx.is_always_gca(item.def_id) && !tcx.features().generic_const_args() { + } else if !tcx.is_always_gca(item.def_id) && !tcx.features().gca_const_items() { errors.push(AssocConstViolation::NonType); } @@ -790,7 +790,7 @@ enum AllowSelfProjections { /// associated type of the current trait, since we retain the value of those associated /// types in the trait object type itself. /// -/// The same thing holds for associated consts under feature `min_generic_const_args`. +/// The same thing holds for associated consts under feature `gca_min_const_items`. /// /// ```rust,ignore (example) /// trait SuperTrait { @@ -914,7 +914,7 @@ impl<'tcx> TypeVisitor> for IllegalSelfTypeVisitor<'tcx> { ty::ConstKind::Alias( _, ty::AliasConst { kind: ty::AliasConstKind::Projection { def_id }, args, .. }, - ) if self.tcx.features().min_generic_const_args() => { + ) if self.tcx.features().gca_min_const_items() => { match self.allow_self_projections { AllowSelfProjections::Yes => { let trait_def_id = self.tcx.parent(def_id); diff --git a/compiler/rustc_trait_selection/src/traits/normalize.rs b/compiler/rustc_trait_selection/src/traits/normalize.rs index c220b35dd5f7d..5a66fafd57361 100644 --- a/compiler/rustc_trait_selection/src/traits/normalize.rs +++ b/compiler/rustc_trait_selection/src/traits/normalize.rs @@ -479,7 +479,7 @@ impl<'a, 'b, 'tcx> TypeFolder> for AssocTypeNormalizer<'a, 'b, 'tcx }; // Note that the Projection/Inherent/Free cases are unreachable on stable, - // unless a `min_generic_const_args` feature gate error has already + // unless a `gca_min_const_items` feature gate error has already // been emitted earlier in compilation. // // That's because we can only end up with an Alias ty::Const for a const item diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 7ee6eec3e1c44..2d79a738c76c2 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -1209,7 +1209,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { // terms of `Fn` etc, but we could probably make this more // precise still. // - // FIXME(min_generic_const_args): Consider consts as well? + // FIXME(gca_min_const_items): Consider consts as well? let unbound_input_types = stack.fresh_trait_pred.skip_binder().trait_ref.args.types().any(|ty| ty.is_fresh()); diff --git a/compiler/rustc_trait_selection/src/traits/wf.rs b/compiler/rustc_trait_selection/src/traits/wf.rs index ba33270c2adba..955ab1799a794 100644 --- a/compiler/rustc_trait_selection/src/traits/wf.rs +++ b/compiler/rustc_trait_selection/src/traits/wf.rs @@ -1090,9 +1090,7 @@ impl<'a, 'tcx> TypeVisitor> for WfPredicates<'a, 'tcx> { ty::ConstKind::Alias(_, alias_const) => { if !c.has_escaping_bound_vars() { // Skip type consts as mGCA doesn't support evaluatable clauses - if !alias_const.kind.is_direct_const(tcx) - && !tcx.features().generic_const_args() - { + if !alias_const.kind.is_direct_const(tcx) && !tcx.features().gca_const_items() { let predicate = ty::Binder::dummy(ty::PredicateKind::Clause( ty::ClauseKind::ConstEvaluatable(c), )); @@ -1171,7 +1169,7 @@ impl<'a, 'tcx> TypeVisitor> for WfPredicates<'a, 'tcx> { } ty::ConstKind::Value(val) => { // FIXME(mgca): no need to feature-gate once valtree lifetimes are not erased - if tcx.features().min_generic_const_args() { + if tcx.features().gca_min_const_items() { match val.ty.kind() { ty::Adt(adt_def, args) => { let adt_val = val.destructure_adt_const(); diff --git a/compiler/rustc_type_ir/src/const_kind.rs b/compiler/rustc_type_ir/src/const_kind.rs index f66322e034814..d969cca3dcda2 100644 --- a/compiler/rustc_type_ir/src/const_kind.rs +++ b/compiler/rustc_type_ir/src/const_kind.rs @@ -281,7 +281,7 @@ pub enum AnonConstKind { GCE, /// stable `min_const_generics` anon consts are not allowed to use any generic parameters /// - /// under `feature(min_generic_const_args)`, these may be inline consts as well, and should be + /// under `feature(gca_min_const_items)`, these may be inline consts as well, and should be /// treated the same as anon consts. MCG, /// anon consts used as the length of a repeat expr are syntactically allowed to use generic parameters diff --git a/compiler/rustc_type_ir/src/inherent.rs b/compiler/rustc_type_ir/src/inherent.rs index 26d094817ba09..28b733a865358 100644 --- a/compiler/rustc_type_ir/src/inherent.rs +++ b/compiler/rustc_type_ir/src/inherent.rs @@ -590,7 +590,7 @@ pub trait ParamEnv: Copy + Debug + Hash + Eq + TypeFoldable { pub trait Features: Copy { fn generic_const_exprs(self) -> bool; - fn generic_const_args(self) -> bool; + fn gca_const_items(self) -> bool; fn coroutine_clone(self) -> bool; diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index e67c7114d6d6a..514c2aa1c9bd1 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -1080,7 +1080,7 @@ pub trait Tuple {} /// const FOO: usize = gca!(BAR::); /// ``` #[rustc_builtin_macro(gca)] -#[unstable(feature = "min_generic_const_args", issue = "132980")] +#[unstable(feature = "gca_min_const_items", issue = "132980")] #[macro_export] macro_rules! gca { ($($arg:tt)*) => { diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index d59d204d6e144..bfb28b62d2089 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -759,7 +759,7 @@ pub use core::concat_bytes; )] #[unstable(feature = "derive_macro_global_path", issue = "154645")] pub use core::derive; -#[unstable(feature = "min_generic_const_args", issue = "132980")] +#[unstable(feature = "gca_min_const_items", issue = "132980")] pub use core::gca; #[stable(feature = "matches_macro", since = "1.42.0")] pub use core::matches; diff --git a/src/doc/rustc-dev-guide/src/const-generics.md b/src/doc/rustc-dev-guide/src/const-generics.md index 9e26a174d8cf6..74e78aab145a1 100644 --- a/src/doc/rustc-dev-guide/src/const-generics.md +++ b/src/doc/rustc-dev-guide/src/const-generics.md @@ -81,7 +81,7 @@ type Alias = [u8; ANON]; When we go through HIR ty lowering for the array type in `Alias`, we will lower the array length too, and feed `type_of(ANON) -> usize`. This will effectively set the type of the `ANON` const item during some later part of the compiler rather than when constructing the HIR. -After all of this desugaring has taken place the final representation in the type system (ie as a `ty::Const`) is a `ConstKind::Unevaluated` with the `DefId` of the `AnonConst`. This is equivalent to how we would representa a usage of an actual const item if we were to represent them without going through an anon const (e.g. when `min_generic_const_args` is enabled). +After all of this desugaring has taken place the final representation in the type system (ie as a `ty::Const`) is a `ConstKind::Unevaluated` with the `DefId` of the `AnonConst`. This is equivalent to how we would representa a usage of an actual const item if we were to represent them without going through an anon const (e.g. when `gca_min_const_items` is enabled). This allows the representation for const "aliases" to be the same as the representation of `TyKind::Alias`. Having a proper HIR body also allows for a *lot* of code re-use, e.g. we can reuse HIR typechecking and all of the lowering steps to MIR where we can then reuse const eval. @@ -141,7 +141,7 @@ In some sense we only allow generic parameters here when they are semantically u In the previous example the anon const can be evaluated for any type parameter `T` because raw pointers to sized types always have the same size (e.g. `8` on 64bit platforms). When detecting that we evaluated an anon const that syntactically contained generic parameters, but did not actually depend on them for evaluation to succeed, we emit the [`const_evaluatable_unchecked` FCW][cec_fcw]. -This is intended to become a hard error once we stabilize more ways of using generic parameters in const arguments, for example `min_generic_const_args` or (the now dead) `generic_const_exprs`. +This is intended to become a hard error once we stabilize more ways of using generic parameters in const arguments, for example `gca_min_const_items` or (the now dead) `generic_const_exprs`. The implementation for this FCW can be found here: [`const_eval_resolve_for_typeck`] @@ -182,7 +182,7 @@ It is currently unclear what the right way to make `generic_const_parameter_type `generic_const_exprs` would have allowed for anon consts with types referencing generic parameters, but that design wound up unworkable. -`min_generic_const_args` will allow for some expressions (for example array construction) to be representable without an anon const and therefore without running into these issues, though whether this is *enough* has yet to be determined. +`gca_min_const_items` will allow for some expressions (for example array construction) to be representable without an anon const and therefore without running into these issues, though whether this is *enough* has yet to be determined. ## Checking types of const arguments diff --git a/src/doc/rustc-dev-guide/src/normalization.md b/src/doc/rustc-dev-guide/src/normalization.md index 05484a672aaf3..cefd92999d9e5 100644 --- a/src/doc/rustc-dev-guide/src/normalization.md +++ b/src/doc/rustc-dev-guide/src/normalization.md @@ -155,7 +155,7 @@ fn bar() { ``` This is likely to change as const generics functionality is improved. -For example, `feature(associated_const_equality)` and `feature(min_generic_const_args)` both require handling const aliases similarly to types (without an anonymous constant wrapping all const args). +For example, `feature(associated_const_equality)` and `feature(gca_min_const_items)` both require handling const aliases similarly to types (without an anonymous constant wrapping all const args). ## What is normalization diff --git a/src/doc/unstable-book/src/language-features/generic-const-args.md b/src/doc/unstable-book/src/language-features/gca-const-items.md similarity index 75% rename from src/doc/unstable-book/src/language-features/generic-const-args.md rename to src/doc/unstable-book/src/language-features/gca-const-items.md index c496c50bf0400..e773f3bdec03d 100644 --- a/src/doc/unstable-book/src/language-features/generic-const-args.md +++ b/src/doc/unstable-book/src/language-features/gca-const-items.md @@ -1,4 +1,4 @@ -# generic_const_args +# gca_const_items Allows using generics in more complex const expressions, based on definitional equality. @@ -11,23 +11,23 @@ The tracking issue for this feature is: [#151972] Warning: This feature is incomplete; its design and syntax may change. This feature enables many of the same use cases supported by [generic_const_exprs], -but based on the machinery developed for [min_generic_const_args]. In a way, it is +but based on the machinery developed for [gca_min_const_items]. In a way, it is meant to be an interim successor for GCE (though it might not currently support all the valid cases that supported by GCE). See also: [generic_const_items] -[min_generic_const_args]: min-generic-const-args.md +[gca_min_const_items]: gca-min-const-items.md [generic_const_exprs]: generic-const-exprs.md [generic_const_items]: generic-const-items.md ## Examples - + ```rust,ignore (requires-Z-next-solver) #![feature(generic_const_items)] -#![feature(min_generic_const_args)] -#![feature(generic_const_args)] +#![feature(gca_min_const_items)] +#![feature(gca_const_items)] #![expect(incomplete_features)] type const ADD1: usize = const { N + 1 }; diff --git a/src/doc/unstable-book/src/language-features/macroless-generic-const-args.md b/src/doc/unstable-book/src/language-features/gca-macroless-args.md similarity index 56% rename from src/doc/unstable-book/src/language-features/macroless-generic-const-args.md rename to src/doc/unstable-book/src/language-features/gca-macroless-args.md index fadc2260bfbdc..d81b202d9dd3c 100644 --- a/src/doc/unstable-book/src/language-features/macroless-generic-const-args.md +++ b/src/doc/unstable-book/src/language-features/gca-macroless-args.md @@ -1,6 +1,6 @@ -# macroless_generic_const_args +# gca_macroless_args -Enables using `#![feature(min_generic_const_args)]` without the `gca!` macro. +Enables using `#![feature(gca_min_const_items)]` without the `gca!` macro. The tracking issue for this feature is: [#159006] @@ -11,23 +11,23 @@ The tracking issue for this feature is: [#159006] Warning: This feature is incomplete; its design and syntax may change. Related features: -- [min_generic_const_args]. See that doc for what the `gca!` is. This feature enables +- [gca_min_const_items]. See that doc for what the `gca!` is. This feature enables support for directly represented const arguments without the macro. -- [macroless_const_item_generic_const_args]. For a version of this feature that works for const arguments +- [gca_macroless_items]. For a version of this feature that works for const arguments as the right hand side of a const item. -[min_generic_const_args]: min-generic-const-args.md -[macroless_const_item_generic_const_args]: macroless-const-item-generic-const-args.md +[gca_min_const_items]: gca-min-const-items.md +[gca_macroless_items]: gca-macroless-items.md ## Examples -Here is an example from [min_generic_const_args]: +Here is an example from [gca_min_const_items]: -[min_generic_const_args]: min-generic-const-args.md +[gca_min_const_items]: gca-min-const-items.md ```rust #![allow(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] trait Bar { #[rustc_always_gca] @@ -49,11 +49,11 @@ struct Foo { } ``` -Using `#![feature(macroless_generic_const_args)]` enables you to write the above without the macro: +Using `#![feature(gca_macroless_args)]` enables you to write the above without the macro: ```rust #![allow(incomplete_features)] -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] trait Bar { #[rustc_always_gca] @@ -65,7 +65,7 @@ trait Bar { struct Baz; impl Bar for Baz { - // note these still need a macro, macroless for these is `macroless_const_item_generic_const_args` + // note these still need a macro, macroless for these is `gca_macroless_items` const VAL: usize = core::gca!(2); const VAL2: usize = core::gca!(const { Self::VAL * 2 }); } diff --git a/src/doc/unstable-book/src/language-features/macroless-const-item-generic-const-args.md b/src/doc/unstable-book/src/language-features/gca-macroless-items.md similarity index 52% rename from src/doc/unstable-book/src/language-features/macroless-const-item-generic-const-args.md rename to src/doc/unstable-book/src/language-features/gca-macroless-items.md index feb03a633d1bd..d683adc0b1349 100644 --- a/src/doc/unstable-book/src/language-features/macroless-const-item-generic-const-args.md +++ b/src/doc/unstable-book/src/language-features/gca-macroless-items.md @@ -1,6 +1,6 @@ -# macroless_generic_const_args +# gca_macroless_args -Enables implementing const items under `#![feature(min_generic_const_args)]` and `#![feature(generic_const_args)]` without the `gca!` macro. +Enables implementing const items under `#![feature(gca_min_const_items)]` and `#![feature(gca_const_items)]` without the `gca!` macro. The tracking issue for this feature is: [#162540] @@ -11,26 +11,26 @@ The tracking issue for this feature is: [#162540] Warning: This feature is incomplete; its design and syntax may change. Related features: -- [min_generic_const_args]. See that doc for what the `gca!` is. This feature enables +- [gca_min_const_items]. See that doc for what the `gca!` is. This feature enables support for directly represented const arguments as the rhs of const items without the macro. -- [macroless_generic_const_args]. For a version of this feature that works for const arguments in other +- [gca_macroless_args]. For a version of this feature that works for const arguments in other positions -[min_generic_const_args]: min-generic-const-args.md -[macroless_generic_const_args]: macroless-generic-const-args.md +[gca_min_const_items]: gca-min-const-items.md +[gca_macroless_args]: gca-macroless-args.md ## Examples -Here is an example from [min_generic_const_args]: +Here is an example from [gca_min_const_items]: -[min_generic_const_args]: min-generic-const-args.md +[gca_min_const_items]: gca-min-const-items.md ```rust,ignore (needs new solver) #![allow(incomplete_features)] #![feature( - min_generic_const_args, - generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_const_items, + gca_macroless_args, generic_const_items, )] @@ -48,15 +48,15 @@ fn foo() { } ``` -Using `#![feature(macroless_const_item_generic_const_args)]` enables you to write the above without the macro: +Using `#![feature(gca_macroless_items)]` enables you to write the above without the macro: ```rust,ignore (needs new solver) #![allow(incomplete_features)] #![feature( - min_generic_const_args, - generic_const_args, - macroless_generic_const_args, - macroless_const_item_generic_const_args, + gca_min_const_items, + gca_const_items, + gca_macroless_args, + gca_macroless_items, generic_const_items, )] diff --git a/src/doc/unstable-book/src/language-features/min-generic-const-args.md b/src/doc/unstable-book/src/language-features/gca-min-const-items.md similarity index 85% rename from src/doc/unstable-book/src/language-features/min-generic-const-args.md rename to src/doc/unstable-book/src/language-features/gca-min-const-items.md index 920bc0e36c1ba..4027e782714ed 100644 --- a/src/doc/unstable-book/src/language-features/min-generic-const-args.md +++ b/src/doc/unstable-book/src/language-features/gca-min-const-items.md @@ -1,4 +1,4 @@ -# min_generic_const_args +# gca_min_const_items Enables the generic const args MVP (paths to direct const items and constructors for ADTs and primitives). @@ -15,12 +15,12 @@ and uses a different approach for implementation. It is intentionally more restr cases that make the `generic_const_exprs` hard to implement properly. See [Feature background][feature_background] for more details. -Related features: [macroless_generic_const_args], [generic_const_args], [generic_const_items]. +Related features: [gca_macroless_args], [gca_const_items], [generic_const_items]. [feature_background]: https://github.com/rust-lang/project-const-generics/blob/main/documents/min_const_generics_plan.md [generic_const_exprs]: generic-const-exprs.md -[macroless_generic_const_args]: macroless-generic-const-args.md -[generic_const_args]: generic-const-args.md +[gca_macroless_args]: gca-macroless-args.md +[gca_const_items]: gca-const-items.md [generic_const_items]: generic-const-items.md ## `gca!` macro @@ -34,9 +34,9 @@ expression "directly", i.e. without an anon const, in a way that is visible to t (Note that plain paths to generic parameters are always represented directly, without `gca!`, as this already works on stable) -See [macroless_generic_const_args] as a feature to disable the requirement of writing `gca!`. +See [gca_macroless_args] as a feature to disable the requirement of writing `gca!`. -[macroless_generic_const_args]: macroless-generic-const-args.md +[gca_macroless_args]: gca-macroless-args.md ## direct const items @@ -45,7 +45,7 @@ Constants with a direct right-hand side are allowed to be used in type contexts, ```compile_fail #![allow(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] const X: usize = core::gca!(1); const Y: usize = 1; @@ -60,7 +60,7 @@ struct Foo { ```rust #![allow(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] trait Bar { #[rustc_always_gca] @@ -114,7 +114,7 @@ Use of const functions is allowed: ```rust #![allow(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] const VAL: usize = 1; diff --git a/src/doc/unstable-book/src/language-features/generic-const-exprs.md b/src/doc/unstable-book/src/language-features/generic-const-exprs.md index 2085ed8fed0cc..645a2df3ebad4 100644 --- a/src/doc/unstable-book/src/language-features/generic-const-exprs.md +++ b/src/doc/unstable-book/src/language-features/generic-const-exprs.md @@ -12,10 +12,10 @@ The tracking issue for this feature is: [#76560] Warning: This feature is incomplete; its design and syntax may change. -See also: [min_generic_const_args], [generic_const_args] +See also: [gca_min_const_items], [gca_const_items] -[min_generic_const_args]: min-generic-const-args.md -[generic_const_args]: generic-const-args.md +[gca_min_const_items]: gca-min-const-items.md +[gca_const_items]: gca-const-items.md ## Examples diff --git a/src/doc/unstable-book/src/language-features/generic-const-items.md b/src/doc/unstable-book/src/language-features/generic-const-items.md index c856c9f135aff..ddf8f445ae859 100644 --- a/src/doc/unstable-book/src/language-features/generic-const-items.md +++ b/src/doc/unstable-book/src/language-features/generic-const-items.md @@ -11,11 +11,11 @@ The tracking issue for this feature is: [#113521] Warning: This feature is an [experiment] and lacks an RFC. There are no guarantees that it will ever be stabilized. -See also: [generic_const_exprs], [min_generic_const_args]. +See also: [generic_const_exprs], [gca_min_const_items]. [experiment]: https://lang-team.rust-lang.org/how_to/experiment.html [generic_const_exprs]: generic-const-exprs.md -[min_generic_const_args]: min-generic-const-args.md +[gca_min_const_items]: gca-min-const-items.md ## Examples diff --git a/src/tools/clippy/CHANGELOG.md b/src/tools/clippy/CHANGELOG.md index 37f5eb09e5247..e79efa20fd534 100644 --- a/src/tools/clippy/CHANGELOG.md +++ b/src/tools/clippy/CHANGELOG.md @@ -318,7 +318,7 @@ Current stable, released 2026-05-28 [#16685](https://github.com/rust-lang/rust-clippy/pull/16685) * [`nonminimal_bool`] fix ICE in `swap_binop()` by using the proper `TypeckResults` [#16659](https://github.com/rust-lang/rust-clippy/pull/16659) -* Fix ICE when using the `min_generic_const_args` incomplete feature +* Fix ICE when using the `gca_min_const_items` incomplete feature [#16692](https://github.com/rust-lang/rust-clippy/pull/16692) ### Documentation Improvements diff --git a/src/tools/clippy/clippy_utils/src/consts.rs b/src/tools/clippy/clippy_utils/src/consts.rs index 890fc7cb4e947..a9d269ac83271 100644 --- a/src/tools/clippy/clippy_utils/src/consts.rs +++ b/src/tools/clippy/clippy_utils/src/consts.rs @@ -871,7 +871,7 @@ impl<'tcx> ConstEvalCtxt<'tcx> { { did }, - // TODO: revisit when feature `min_generic_const_args` is stabilized. In the meantime, + // TODO: revisit when feature `gca_min_const_items` is stabilized. In the meantime, // `TyCtxt::const_eval_resolve()` will trigger an ICE when evaluating the body of the // `type const` definition. _ if let Res::Def(DefKind::Const | DefKind::AssocConst, did) = self.typeck.qpath_res(qpath, id) diff --git a/src/tools/clippy/tests/ui/crashes/mgca-16691.rs b/src/tools/clippy/tests/ui/crashes/mgca-16691.rs index 554528905fc85..4da9a8b60d1a3 100644 --- a/src/tools/clippy/tests/ui/crashes/mgca-16691.rs +++ b/src/tools/clippy/tests/ui/crashes/mgca-16691.rs @@ -1,6 +1,6 @@ //@ check-pass #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/src/tools/clippy/tests/ui/trait_duplication_in_bounds_assoc_const_eq.fixed b/src/tools/clippy/tests/ui/trait_duplication_in_bounds_assoc_const_eq.fixed index dc1d663a9393b..d887aac9c0378 100644 --- a/src/tools/clippy/tests/ui/trait_duplication_in_bounds_assoc_const_eq.fixed +++ b/src/tools/clippy/tests/ui/trait_duplication_in_bounds_assoc_const_eq.fixed @@ -1,6 +1,6 @@ #![deny(clippy::trait_duplication_in_bounds)] #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] trait AssocConstTrait { #[rustc_always_gca] diff --git a/src/tools/clippy/tests/ui/trait_duplication_in_bounds_assoc_const_eq.rs b/src/tools/clippy/tests/ui/trait_duplication_in_bounds_assoc_const_eq.rs index 669e0fbdd3809..feeec8e421f1d 100644 --- a/src/tools/clippy/tests/ui/trait_duplication_in_bounds_assoc_const_eq.rs +++ b/src/tools/clippy/tests/ui/trait_duplication_in_bounds_assoc_const_eq.rs @@ -1,6 +1,6 @@ #![deny(clippy::trait_duplication_in_bounds)] #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] trait AssocConstTrait { #[rustc_always_gca] diff --git a/src/tools/rustfmt/tests/source/gca.rs b/src/tools/rustfmt/tests/source/gca.rs index ab394c21b8b32..0c63def96916f 100644 --- a/src/tools/rustfmt/tests/source/gca.rs +++ b/src/tools/rustfmt/tests/source/gca.rs @@ -1,8 +1,8 @@ -// gca! is a built-in macro relevant to min_generic_const_args; its contents should be formatted as +// gca! is a built-in macro relevant to gca_min_const_items; its contents should be formatted as // if its contents were passed through unchanged (the macro changes the semantics of the contained // expression, the syntax is unchanged) -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/src/tools/rustfmt/tests/target/gca.rs b/src/tools/rustfmt/tests/target/gca.rs index 8110bb0d2c827..db8936ed64c43 100644 --- a/src/tools/rustfmt/tests/target/gca.rs +++ b/src/tools/rustfmt/tests/target/gca.rs @@ -1,8 +1,8 @@ -// gca! is a built-in macro relevant to min_generic_const_args; its contents should be formatted as +// gca! is a built-in macro relevant to gca_min_const_items; its contents should be formatted as // if its contents were passed through unchanged (the macro changes the semantics of the contained // expression, the syntax is unchanged) -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/crashes/138009.rs b/tests/crashes/138009.rs index 494e3fb827ddb..9b44b6148eab5 100644 --- a/tests/crashes/138009.rs +++ b/tests/crashes/138009.rs @@ -1,5 +1,5 @@ //@ known-bug: #138009 -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/crashes/149809.rs b/tests/crashes/149809.rs index b1172b72b17cd..0b8f6338734d3 100644 --- a/tests/crashes/149809.rs +++ b/tests/crashes/149809.rs @@ -1,5 +1,5 @@ //@ known-bug: #149809 -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![feature(inherent_associated_types)] use std::gca; diff --git a/tests/crashes/150049.rs b/tests/crashes/150049.rs index 994e257a28d59..23cb868c8099a 100644 --- a/tests/crashes/150049.rs +++ b/tests/crashes/150049.rs @@ -1,5 +1,5 @@ //@ known-bug: #150049 -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![feature(inherent_associated_types)] use std::gca; diff --git a/tests/crashes/150749.rs b/tests/crashes/150749.rs index 8e4e413236c82..fa13c49ef564a 100644 --- a/tests/crashes/150749.rs +++ b/tests/crashes/150749.rs @@ -1,5 +1,5 @@ //@ known-bug: #150749 -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/debuginfo/associated-const-bindings.rs b/tests/debuginfo/associated-const-bindings.rs index 171d457925522..ca0693d4e389f 100644 --- a/tests/debuginfo/associated-const-bindings.rs +++ b/tests/debuginfo/associated-const-bindings.rs @@ -10,7 +10,7 @@ //@ cdb-command:dv /t /n local //@ cdb-check:struct ref$ > > > local = [...] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(unused_variables, incomplete_features)] use std::gca; diff --git a/tests/pretty/gca-macro.pp b/tests/pretty/gca-macro.pp index 8912d790b337a..271b92b0e319e 100644 --- a/tests/pretty/gca-macro.pp +++ b/tests/pretty/gca-macro.pp @@ -2,7 +2,7 @@ #![no_std] //@ pretty-mode:expanded //@ pp-exact:gca-macro.pp -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] extern crate std; #[prelude_import] use ::std::prelude::rust_2015::*; diff --git a/tests/pretty/gca-macro.rs b/tests/pretty/gca-macro.rs index 248fd4424e1da..decc72e18b4bf 100644 --- a/tests/pretty/gca-macro.rs +++ b/tests/pretty/gca-macro.rs @@ -1,6 +1,6 @@ //@ pretty-mode:expanded //@ pp-exact:gca-macro.pp -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/rustdoc-html/constant/ice-associated-const-equality-105952.rs b/tests/rustdoc-html/constant/ice-associated-const-equality-105952.rs index 5c47382ef536d..236aba80544db 100644 --- a/tests/rustdoc-html/constant/ice-associated-const-equality-105952.rs +++ b/tests/rustdoc-html/constant/ice-associated-const-equality-105952.rs @@ -1,7 +1,7 @@ //! Regression test for #![crate_name = "foo"] -#![feature(min_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, adt_const_params)] #![expect(incomplete_features)] use std::marker::ConstParamTy; diff --git a/tests/rustdoc-html/inline_cross/auxiliary/assoc-const-equality.rs b/tests/rustdoc-html/inline_cross/auxiliary/assoc-const-equality.rs index 64cfc129d09ce..62aa7697e18a1 100644 --- a/tests/rustdoc-html/inline_cross/auxiliary/assoc-const-equality.rs +++ b/tests/rustdoc-html/inline_cross/auxiliary/assoc-const-equality.rs @@ -1,5 +1,5 @@ #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] pub fn accept(_: impl Trait) {} diff --git a/tests/rustdoc-html/type-const-associated-const-no-body.rs b/tests/rustdoc-html/type-const-associated-const-no-body.rs index 101e4b48a9c9c..99e1ed3b6add7 100644 --- a/tests/rustdoc-html/type-const-associated-const-no-body.rs +++ b/tests/rustdoc-html/type-const-associated-const-no-body.rs @@ -2,7 +2,7 @@ //! and #![crate_name = "foo"] -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![expect(incomplete_features)] pub trait Tr { diff --git a/tests/rustdoc-html/type-const-free-in-array.rs b/tests/rustdoc-html/type-const-free-in-array.rs index 3fd6b21e34eea..e78fc9844758b 100644 --- a/tests/rustdoc-html/type-const-free-in-array.rs +++ b/tests/rustdoc-html/type-const-free-in-array.rs @@ -1,5 +1,5 @@ #![crate_name = "foo"] -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/rustdoc-html/type-const-inherent-with-body.rs b/tests/rustdoc-html/type-const-inherent-with-body.rs index 030ca8608a02d..dd0bb079a7072 100644 --- a/tests/rustdoc-html/type-const-inherent-with-body.rs +++ b/tests/rustdoc-html/type-const-inherent-with-body.rs @@ -1,5 +1,5 @@ #![crate_name = "foo"] -#![feature(min_generic_const_args, macroless_generic_const_args, inherent_associated_types)] +#![feature(gca_min_const_items, gca_macroless_args, inherent_associated_types)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/rustdoc-ui/associated-constant-not-allowed-102467.rs b/tests/rustdoc-ui/associated-constant-not-allowed-102467.rs index af6899571d631..513687646f043 100644 --- a/tests/rustdoc-ui/associated-constant-not-allowed-102467.rs +++ b/tests/rustdoc-ui/associated-constant-not-allowed-102467.rs @@ -2,7 +2,7 @@ // It ensures that the expected error is displayed. #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] trait T { type A: S = 34>; diff --git a/tests/ui/associated-consts/assoc-const-equality-region-var-hash-ice.stderr b/tests/ui/associated-consts/assoc-const-equality-region-var-hash-ice.stderr index d70cb19a95523..79faf6b4e5653 100644 --- a/tests/ui/associated-consts/assoc-const-equality-region-var-hash-ice.stderr +++ b/tests/ui/associated-consts/assoc-const-equality-region-var-hash-ice.stderr @@ -21,7 +21,7 @@ LL | fn foo() -> dyn Trait<'r, K = {}> { | ^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0308]: mismatched types diff --git a/tests/ui/associated-consts/assoc-const-equality-unexpected-region.stderr b/tests/ui/associated-consts/assoc-const-equality-unexpected-region.stderr index 6e38e3e41acbf..be308e7540386 100644 --- a/tests/ui/associated-consts/assoc-const-equality-unexpected-region.stderr +++ b/tests/ui/associated-consts/assoc-const-equality-unexpected-region.stderr @@ -25,7 +25,7 @@ LL | impl dyn TraitA<'_> where (): TraitA<'a, K = 0> {} | ^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates diff --git a/tests/ui/associated-consts/associated-const-type-parameter-arrays.stderr b/tests/ui/associated-consts/associated-const-type-parameter-arrays.stderr index 2170857fd7994..b007bd6694628 100644 --- a/tests/ui/associated-consts/associated-const-type-parameter-arrays.stderr +++ b/tests/ui/associated-consts/associated-const-type-parameter-arrays.stderr @@ -6,7 +6,7 @@ LL | let _array: [u32; ::Y]; | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/associated-consts/issue-110933.rs b/tests/ui/associated-consts/issue-110933.rs index 8c3fc59af1bb1..59e123bb0e509 100644 --- a/tests/ui/associated-consts/issue-110933.rs +++ b/tests/ui/associated-consts/issue-110933.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(incomplete_features)] pub trait Trait { diff --git a/tests/ui/associated-consts/issue-47814.stderr b/tests/ui/associated-consts/issue-47814.stderr index b59603861d2e8..4d6efef3b82c0 100644 --- a/tests/ui/associated-consts/issue-47814.stderr +++ b/tests/ui/associated-consts/issue-47814.stderr @@ -10,7 +10,7 @@ note: not a concrete type LL | impl<'a> ArpIPv4<'a> { | ^^^^^^^^^^^ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/associated-consts/type-const-in-array-len-wrong-type.rs b/tests/ui/associated-consts/type-const-in-array-len-wrong-type.rs index bb5e7ad4be181..64fb443bc8042 100644 --- a/tests/ui/associated-consts/type-const-in-array-len-wrong-type.rs +++ b/tests/ui/associated-consts/type-const-in-array-len-wrong-type.rs @@ -1,7 +1,7 @@ #![feature( generic_const_exprs, - min_generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_macroless_args, inherent_associated_types )] diff --git a/tests/ui/associated-consts/type-const-in-array-len.rs b/tests/ui/associated-consts/type-const-in-array-len.rs index b4cf05a618255..b2d291c1ff45b 100644 --- a/tests/ui/associated-consts/type-const-in-array-len.rs +++ b/tests/ui/associated-consts/type-const-in-array-len.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(min_generic_const_args, macroless_generic_const_args, inherent_associated_types)] +#![feature(gca_min_const_items, gca_macroless_args, inherent_associated_types)] use std::gca; diff --git a/tests/ui/associated-item/associated-item-duplicate-bounds.stderr b/tests/ui/associated-item/associated-item-duplicate-bounds.stderr index 28bf0e8fb3327..60dbbcbe458fe 100644 --- a/tests/ui/associated-item/associated-item-duplicate-bounds.stderr +++ b/tests/ui/associated-item/associated-item-duplicate-bounds.stderr @@ -6,7 +6,7 @@ LL | links: [u32; A::LINKS], // Shouldn't suggest bounds already there. | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/associated-type-bounds/duplicate-bound-err.rs b/tests/ui/associated-type-bounds/duplicate-bound-err.rs index 5dc2ad6a3a56c..f9acdbf3c5e6e 100644 --- a/tests/ui/associated-type-bounds/duplicate-bound-err.rs +++ b/tests/ui/associated-type-bounds/duplicate-bound-err.rs @@ -1,6 +1,6 @@ //@ edition: 2024 -#![feature(min_generic_const_args, type_alias_impl_trait, return_type_notation)] +#![feature(gca_min_const_items, type_alias_impl_trait, return_type_notation)] #![expect(incomplete_features)] #![allow(refining_impl_trait_internal)] diff --git a/tests/ui/associated-type-bounds/duplicate-bound.rs b/tests/ui/associated-type-bounds/duplicate-bound.rs index 68f9c373cd49c..b9025682e2920 100644 --- a/tests/ui/associated-type-bounds/duplicate-bound.rs +++ b/tests/ui/associated-type-bounds/duplicate-bound.rs @@ -1,7 +1,7 @@ //@ edition: 2024 //@ run-pass -#![feature(min_generic_const_args, return_type_notation)] +#![feature(gca_min_const_items, return_type_notation)] #![expect(incomplete_features)] #![allow(dead_code, refining_impl_trait_internal, type_alias_bounds)] diff --git a/tests/ui/associated-types/associated-types-eq-2.stderr b/tests/ui/associated-types/associated-types-eq-2.stderr index 9be346516c892..fdcfb8cd53f98 100644 --- a/tests/ui/associated-types/associated-types-eq-2.stderr +++ b/tests/ui/associated-types/associated-types-eq-2.stderr @@ -8,7 +8,7 @@ LL | | = 42, T2 = Qux, T3 = usize> for Bar { | |____^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: associated const equality is incomplete @@ -18,7 +18,7 @@ LL | impl Tr3 for Qux { | ^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: associated const equality is incomplete @@ -28,7 +28,7 @@ LL | impl Tr3<42, T2 = 42, T3 = usize> for Bar { | ^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: associated const equality is incomplete @@ -38,7 +38,7 @@ LL | impl Tr3 for Bar { | ^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0229]: associated item constraints are not allowed here diff --git a/tests/ui/associated-types/type-const-inherent-impl-normalize.rs b/tests/ui/associated-types/type-const-inherent-impl-normalize.rs index 8a0d14554d201..2b9f08d72588a 100644 --- a/tests/ui/associated-types/type-const-inherent-impl-normalize.rs +++ b/tests/ui/associated-types/type-const-inherent-impl-normalize.rs @@ -1,7 +1,7 @@ struct S; impl S { const LEN: usize = std::gca!(1); - //~^ ERROR: use of unstable library feature `min_generic_const_args` [E0658] + //~^ ERROR: use of unstable library feature `gca_min_const_items` [E0658] //~| ERROR: expected expression, found `gca!()` fn arr() { [8; Self::LEN] diff --git a/tests/ui/associated-types/type-const-inherent-impl-normalize.stderr b/tests/ui/associated-types/type-const-inherent-impl-normalize.stderr index 9ee66984529de..167f2587978e1 100644 --- a/tests/ui/associated-types/type-const-inherent-impl-normalize.stderr +++ b/tests/ui/associated-types/type-const-inherent-impl-normalize.stderr @@ -1,11 +1,11 @@ -error[E0658]: use of unstable library feature `min_generic_const_args` +error[E0658]: use of unstable library feature `gca_min_const_items` --> $DIR/type-const-inherent-impl-normalize.rs:3:24 | LL | const LEN: usize = std::gca!(1); | ^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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: expected expression, found `gca!()` constant diff --git a/tests/ui/assumptions_on_binders/resolved-region-var-max-universe.rs b/tests/ui/assumptions_on_binders/resolved-region-var-max-universe.rs index 378af46decb96..ef1a5ca74c546 100644 --- a/tests/ui/assumptions_on_binders/resolved-region-var-max-universe.rs +++ b/tests/ui/assumptions_on_binders/resolved-region-var-max-universe.rs @@ -8,7 +8,7 @@ // The missing `T` in `check` is intentional. It makes HIR ty lowering emit an // error while still leaving behind the region constraint that used to ICE. -#![feature(min_generic_const_args, inherent_associated_types, generic_const_items)] +#![feature(gca_min_const_items, inherent_associated_types, generic_const_items)] use std::gca; diff --git a/tests/ui/attributes/malformed-attrs.rs b/tests/ui/attributes/malformed-attrs.rs index 36ad21a54bd51..e27516d5a60d8 100644 --- a/tests/ui/attributes/malformed-attrs.rs +++ b/tests/ui/attributes/malformed-attrs.rs @@ -9,7 +9,7 @@ #![feature(dropck_eyepatch)] #![feature(export_stable)] #![allow(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![feature(ffi_const, ffi_pure)] #![feature(coverage_attribute)] #![feature(sanitize)] diff --git a/tests/ui/const-generics/adt_const_params/index-oob-ice-83993.stderr b/tests/ui/const-generics/adt_const_params/index-oob-ice-83993.stderr index d42a098be25cd..e2b989c9c5d1e 100644 --- a/tests/ui/const-generics/adt_const_params/index-oob-ice-83993.stderr +++ b/tests/ui/const-generics/adt_const_params/index-oob-ice-83993.stderr @@ -6,7 +6,7 @@ LL | let x: &'b (); | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/index-oob-ice-83993.rs:18:17 @@ -16,7 +16,7 @@ LL | let _: &'b (); | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 2 previous errors diff --git a/tests/ui/const-generics/associated-const-bindings/ambiguity.rs b/tests/ui/const-generics/associated-const-bindings/ambiguity.rs index a8d66c950a064..f566feec0e416 100644 --- a/tests/ui/const-generics/associated-const-bindings/ambiguity.rs +++ b/tests/ui/const-generics/associated-const-bindings/ambiguity.rs @@ -1,7 +1,7 @@ // We used to say "ambiguous associated type" on ambiguous associated consts. // Ensure that we now use the correct label. -#![feature(adt_const_params, min_generic_const_args, unsized_const_params)] +#![feature(adt_const_params, gca_min_const_items, unsized_const_params)] #![allow(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/associated-const-bindings/assoc-const-ty-mismatch.rs b/tests/ui/const-generics/associated-const-bindings/assoc-const-ty-mismatch.rs index 1092733a8e2ef..f750f3bbca8af 100644 --- a/tests/ui/const-generics/associated-const-bindings/assoc-const-ty-mismatch.rs +++ b/tests/ui/const-generics/associated-const-bindings/assoc-const-ty-mismatch.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(incomplete_features, unused)] pub trait Foo { diff --git a/tests/ui/const-generics/associated-const-bindings/assoc-const.rs b/tests/ui/const-generics/associated-const-bindings/assoc-const.rs index d7e5ce3229dfd..f63c5a24200ad 100644 --- a/tests/ui/const-generics/associated-const-bindings/assoc-const.rs +++ b/tests/ui/const-generics/associated-const-bindings/assoc-const.rs @@ -1,5 +1,5 @@ //@ run-pass -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(unused, incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/associated-const-bindings/bound-var-in-ty-not-wf.rs b/tests/ui/const-generics/associated-const-bindings/bound-var-in-ty-not-wf.rs index a3dc049c144f2..28b10f2b266a3 100644 --- a/tests/ui/const-generics/associated-const-bindings/bound-var-in-ty-not-wf.rs +++ b/tests/ui/const-generics/associated-const-bindings/bound-var-in-ty-not-wf.rs @@ -1,7 +1,7 @@ // Check that we eventually catch types of assoc const bounds // (containing late-bound vars) that are ill-formed. #![feature( - min_generic_const_args, + gca_min_const_items, adt_const_params, const_param_ty_trait, generic_const_parameter_types diff --git a/tests/ui/const-generics/associated-const-bindings/bound-var-in-ty.rs b/tests/ui/const-generics/associated-const-bindings/bound-var-in-ty.rs index 729d4256d4baf..5049d6ba2f0e6 100644 --- a/tests/ui/const-generics/associated-const-bindings/bound-var-in-ty.rs +++ b/tests/ui/const-generics/associated-const-bindings/bound-var-in-ty.rs @@ -4,7 +4,7 @@ //@ check-pass #![feature( - min_generic_const_args, + gca_min_const_items, adt_const_params, const_param_ty_trait, generic_const_parameter_types diff --git a/tests/ui/const-generics/associated-const-bindings/coexisting-with-type-binding.rs b/tests/ui/const-generics/associated-const-bindings/coexisting-with-type-binding.rs index f6fa6ece02ad9..f3b309075d772 100644 --- a/tests/ui/const-generics/associated-const-bindings/coexisting-with-type-binding.rs +++ b/tests/ui/const-generics/associated-const-bindings/coexisting-with-type-binding.rs @@ -5,7 +5,7 @@ //@ check-pass -#![feature(adt_const_params, min_generic_const_args, unsized_const_params)] +#![feature(adt_const_params, gca_min_const_items, unsized_const_params)] #![allow(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/associated-const-bindings/coherence.rs b/tests/ui/const-generics/associated-const-bindings/coherence.rs index d5764bfc93b61..35e14f4c7b780 100644 --- a/tests/ui/const-generics/associated-const-bindings/coherence.rs +++ b/tests/ui/const-generics/associated-const-bindings/coherence.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/associated-const-bindings/const-bound-to-assoc-ty-99828.stderr b/tests/ui/const-generics/associated-const-bindings/const-bound-to-assoc-ty-99828.stderr index 692e511fb469e..e58d64778ff17 100644 --- a/tests/ui/const-generics/associated-const-bindings/const-bound-to-assoc-ty-99828.stderr +++ b/tests/ui/const-generics/associated-const-bindings/const-bound-to-assoc-ty-99828.stderr @@ -5,7 +5,7 @@ LL | fn get_iter(vec: &[i32]) -> impl Iterator + '_ { | ^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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: expected type, found constant diff --git a/tests/ui/const-generics/associated-const-bindings/const-projection-err.rs b/tests/ui/const-generics/associated-const-bindings/const-projection-err.rs index 8d876e2ca3582..86a67e67799de 100644 --- a/tests/ui/const-generics/associated-const-bindings/const-projection-err.rs +++ b/tests/ui/const-generics/associated-const-bindings/const-projection-err.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(incomplete_features)] trait TraitWAssocConst { diff --git a/tests/ui/const-generics/associated-const-bindings/const_evaluatable_unchecked.rs b/tests/ui/const-generics/associated-const-bindings/const_evaluatable_unchecked.rs index 7f7aec0ebcdd5..d231129613911 100644 --- a/tests/ui/const-generics/associated-const-bindings/const_evaluatable_unchecked.rs +++ b/tests/ui/const-generics/associated-const-bindings/const_evaluatable_unchecked.rs @@ -4,7 +4,7 @@ // // issue: //@ check-pass -#![feature(min_generic_const_args, associated_type_defaults)] +#![feature(gca_min_const_items, associated_type_defaults)] #![allow(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-compat-assoc-const-ty-mentions-self.rs b/tests/ui/const-generics/associated-const-bindings/dyn-compat-assoc-const-ty-mentions-self.rs index f393a4910cd8d..318db40badad8 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-compat-assoc-const-ty-mentions-self.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-compat-assoc-const-ty-mentions-self.rs @@ -6,7 +6,7 @@ #![feature(adt_const_params)] #![feature(generic_const_items)] #![feature(generic_const_parameter_types)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![feature(const_param_ty_trait)] #![expect(incomplete_features)] diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-compat-basic.rs b/tests/ui/const-generics/associated-const-bindings/dyn-compat-basic.rs index cddb6eb88e937..88a227b066110 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-compat-basic.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-compat-basic.rs @@ -3,7 +3,7 @@ //@ check-pass -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-mismatch.rs b/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-mismatch.rs index c38431c8e1d78..e4bbccae17064 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-mismatch.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-mismatch.rs @@ -1,6 +1,6 @@ // Ensure that we actually enforce equality constraints found in trait object types. -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-param-default-mentions-self.rs b/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-param-default-mentions-self.rs index b6d67f8fd8b19..0f154dfc718e4 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-param-default-mentions-self.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-param-default-mentions-self.rs @@ -1,7 +1,7 @@ // Test that we force users to explicitly specify const arguments for const parameters that // have defaults if the default mentions the `Self` type parameter. -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-projection-behind-trait-alias-mentions-self.rs b/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-projection-behind-trait-alias-mentions-self.rs index 1171744f8e774..59bbc71722ed1 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-projection-behind-trait-alias-mentions-self.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-projection-behind-trait-alias-mentions-self.rs @@ -5,7 +5,7 @@ // The author of the trait object type can't fix this unlike the supertrait bound // equivalent where they just need to explicitly specify the assoc const. -#![feature(min_generic_const_args, macroless_generic_const_args, trait_alias)] +#![feature(gca_min_const_items, gca_macroless_args, trait_alias)] #![expect(incomplete_features)] trait Trait { diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-projection-from-supertrait-mentions-self.rs b/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-projection-from-supertrait-mentions-self.rs index 1a417be8ea451..ea5b150e83ba2 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-projection-from-supertrait-mentions-self.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-compat-const-projection-from-supertrait-mentions-self.rs @@ -1,7 +1,7 @@ // Test that we force users to explicitly specify associated constants (via bindings) // which reference the `Self` type parameter. -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![expect(incomplete_features)] trait X: Y { diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-compat-generic-assoc-const.rs b/tests/ui/const-generics/associated-const-bindings/dyn-compat-generic-assoc-const.rs index 05e8aeea5ed5a..8d6bc2e5131ec 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-compat-generic-assoc-const.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-compat-generic-assoc-const.rs @@ -3,7 +3,7 @@ //@ dont-require-annotations: NOTE -#![feature(min_generic_const_args, generic_const_items)] +#![feature(gca_min_const_items, generic_const_items)] #![expect(incomplete_features)] trait Trait { diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-compat-non-type-assoc-const.rs b/tests/ui/const-generics/associated-const-bindings/dyn-compat-non-type-assoc-const.rs index 9036de88bd355..aaede20d6fa6b 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-compat-non-type-assoc-const.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-compat-non-type-assoc-const.rs @@ -2,7 +2,7 @@ //@ dont-require-annotations: NOTE -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] trait Trait { diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-bound-on-assoc-const-allowed-and-enforced.rs b/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-bound-on-assoc-const-allowed-and-enforced.rs index 2d282ace5436a..15b218e966707 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-bound-on-assoc-const-allowed-and-enforced.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-bound-on-assoc-const-allowed-and-enforced.rs @@ -2,7 +2,7 @@ // reference the `Self` type parameter (contrary to methods) and that such where clauses are // actually enforced. -#![feature(min_generic_const_args, generic_const_items)] +#![feature(gca_min_const_items, generic_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-assoc-const-ty.rs b/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-assoc-const-ty.rs index 53746231f46d7..728e79fc62597 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-assoc-const-ty.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-assoc-const-ty.rs @@ -6,8 +6,8 @@ #![feature( adt_const_params, - min_generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_macroless_args, const_param_ty_trait, generic_const_parameter_types )] diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-methods.rs b/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-methods.rs index 7cd8d6ef36302..524f0dd5cac68 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-methods.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-methods.rs @@ -11,7 +11,7 @@ // correct values from the type assoc consts). //@ run-pass -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-supertrait-bounds.rs b/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-supertrait-bounds.rs index 256c9feeb6771..05e03eb0b2256 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-supertrait-bounds.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-compat-self-const-projections-in-supertrait-bounds.rs @@ -4,7 +4,7 @@ //@ dont-require-annotations: NOTE -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![expect(incomplete_features)] trait Trait: SuperTrait<{ Self::N }> { diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-compat-symbol-mangling.rs b/tests/ui/const-generics/associated-const-bindings/dyn-compat-symbol-mangling.rs index 2a28022b8844e..9525e20406173 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-compat-symbol-mangling.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-compat-symbol-mangling.rs @@ -10,7 +10,7 @@ //\@[legacy] normalize-stderr: "h[[:xdigit:]]{16}" -> "h[HASH]" //@ [v0] normalize-stderr: "sym\[.*?\]" -> "sym[HASH]" -#![feature(min_generic_const_args, rustc_attrs)] +#![feature(gca_min_const_items, rustc_attrs)] #![expect(incomplete_features)] #![crate_name = "sym"] diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-compat-unspecified-assoc-consts.rs b/tests/ui/const-generics/associated-const-bindings/dyn-compat-unspecified-assoc-consts.rs index 6c4c8ccc35572..efbbb07317e1c 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-compat-unspecified-assoc-consts.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-compat-unspecified-assoc-consts.rs @@ -2,7 +2,7 @@ // be specified in the corresp. trait object type (barring exceptions) similiar to associated // types. Check that we reject code that doesn't provide the necessary bindings. -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] trait Trait { diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-const-projection-escaping-bound-vars.rs b/tests/ui/const-generics/associated-const-bindings/dyn-const-projection-escaping-bound-vars.rs index d498f52003b48..d772e027d9e7c 100644 --- a/tests/ui/const-generics/associated-const-bindings/dyn-const-projection-escaping-bound-vars.rs +++ b/tests/ui/const-generics/associated-const-bindings/dyn-const-projection-escaping-bound-vars.rs @@ -2,7 +2,7 @@ //! (#151642) //@ check-pass -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] trait Trait2<'a> { diff --git a/tests/ui/const-generics/associated-const-bindings/equality-unused-issue-126729.rs b/tests/ui/const-generics/associated-const-bindings/equality-unused-issue-126729.rs index 0b4e871ceb5c6..5afa1251a67ce 100644 --- a/tests/ui/const-generics/associated-const-bindings/equality-unused-issue-126729.rs +++ b/tests/ui/const-generics/associated-const-bindings/equality-unused-issue-126729.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(incomplete_features)] #![deny(dead_code)] diff --git a/tests/ui/const-generics/associated-const-bindings/equality_bound_with_infer.rs b/tests/ui/const-generics/associated-const-bindings/equality_bound_with_infer.rs index 3027357d0fb7e..8acbf1f0f45d3 100644 --- a/tests/ui/const-generics/associated-const-bindings/equality_bound_with_infer.rs +++ b/tests/ui/const-generics/associated-const-bindings/equality_bound_with_infer.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(min_generic_const_args, generic_const_items)] +#![feature(gca_min_const_items, generic_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/associated-const-bindings/esc-bound-var-in-ty.rs b/tests/ui/const-generics/associated-const-bindings/esc-bound-var-in-ty.rs index 5a4ea95eae189..611612036de8b 100644 --- a/tests/ui/const-generics/associated-const-bindings/esc-bound-var-in-ty.rs +++ b/tests/ui/const-generics/associated-const-bindings/esc-bound-var-in-ty.rs @@ -2,7 +2,7 @@ // the type of assoc consts used in an equality bound. #![feature( adt_const_params, - min_generic_const_args, + gca_min_const_items, unsized_const_params, generic_const_parameter_types )] diff --git a/tests/ui/const-generics/associated-const-bindings/issue-102335-const.rs b/tests/ui/const-generics/associated-const-bindings/issue-102335-const.rs index cfbca73dd531b..c1ec53437a6f1 100644 --- a/tests/ui/const-generics/associated-const-bindings/issue-102335-const.rs +++ b/tests/ui/const-generics/associated-const-bindings/issue-102335-const.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(incomplete_features)] trait T { diff --git a/tests/ui/const-generics/associated-const-bindings/issue-105330.stderr b/tests/ui/const-generics/associated-const-bindings/issue-105330.stderr index 06900404ec34e..cabdd6bd9d0fa 100644 --- a/tests/ui/const-generics/associated-const-bindings/issue-105330.stderr +++ b/tests/ui/const-generics/associated-const-bindings/issue-105330.stderr @@ -22,7 +22,7 @@ LL | fn foo>() { | ^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: associated const equality is incomplete @@ -32,7 +32,7 @@ LL | fn main>() { | ^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0562]: `impl Trait` is not allowed in impl headers diff --git a/tests/ui/const-generics/associated-const-bindings/issue-93835.stderr b/tests/ui/const-generics/associated-const-bindings/issue-93835.stderr index 990d22bba4de6..c19e949139725 100644 --- a/tests/ui/const-generics/associated-const-bindings/issue-93835.stderr +++ b/tests/ui/const-generics/associated-const-bindings/issue-93835.stderr @@ -23,7 +23,7 @@ LL | type_ascribe!(p, a>); | ^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: associated const equality is incomplete @@ -33,7 +33,7 @@ LL | type_ascribe!(p, a>); | ^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` diff --git a/tests/ui/const-generics/associated-const-bindings/mismatched-types-with-generic-in-ace-no-feature-gate.stderr b/tests/ui/const-generics/associated-const-bindings/mismatched-types-with-generic-in-ace-no-feature-gate.stderr index d2f28a62e04e3..16ed4ecb1df8b 100644 --- a/tests/ui/const-generics/associated-const-bindings/mismatched-types-with-generic-in-ace-no-feature-gate.stderr +++ b/tests/ui/const-generics/associated-const-bindings/mismatched-types-with-generic-in-ace-no-feature-gate.stderr @@ -15,7 +15,7 @@ LL | fn take0(_: impl Owner = { N }>) {} | ^^^^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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 2 previous errors diff --git a/tests/ui/const-generics/associated-const-bindings/mismatched-types-with-generic-in-ace.rs b/tests/ui/const-generics/associated-const-bindings/mismatched-types-with-generic-in-ace.rs index 9ef5c902062e3..1746531bae2c6 100644 --- a/tests/ui/const-generics/associated-const-bindings/mismatched-types-with-generic-in-ace.rs +++ b/tests/ui/const-generics/associated-const-bindings/mismatched-types-with-generic-in-ace.rs @@ -1,4 +1,4 @@ -#![feature(generic_const_items, min_generic_const_args)] +#![feature(generic_const_items, gca_min_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/associated-const-bindings/missing.rs b/tests/ui/const-generics/associated-const-bindings/missing.rs index 22b565cb27d20..0bc2efb35d2e2 100644 --- a/tests/ui/const-generics/associated-const-bindings/missing.rs +++ b/tests/ui/const-generics/associated-const-bindings/missing.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(incomplete_features, unused)] pub trait Foo { diff --git a/tests/ui/const-generics/associated-const-bindings/normalization-via-param-env.rs b/tests/ui/const-generics/associated-const-bindings/normalization-via-param-env.rs index d013eb164065f..209eb73421d6c 100644 --- a/tests/ui/const-generics/associated-const-bindings/normalization-via-param-env.rs +++ b/tests/ui/const-generics/associated-const-bindings/normalization-via-param-env.rs @@ -1,5 +1,5 @@ //@ check-pass -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![allow(incomplete_features)] // Regression test for normalizing const projections diff --git a/tests/ui/const-generics/associated-const-bindings/param-in-ty.rs b/tests/ui/const-generics/associated-const-bindings/param-in-ty.rs index d7c6426d7bc38..db4b809597fd5 100644 --- a/tests/ui/const-generics/associated-const-bindings/param-in-ty.rs +++ b/tests/ui/const-generics/associated-const-bindings/param-in-ty.rs @@ -1,7 +1,7 @@ // Regression test for issue #108271. // Detect and reject generic params in the type of assoc consts used in an equality bound. #![feature( - min_generic_const_args, + gca_min_const_items, adt_const_params, unsized_const_params, generic_const_parameter_types, diff --git a/tests/ui/const-generics/associated-const-bindings/projection-unspecified-but-bounded.rs b/tests/ui/const-generics/associated-const-bindings/projection-unspecified-but-bounded.rs index 572e50862988b..61062681d20da 100644 --- a/tests/ui/const-generics/associated-const-bindings/projection-unspecified-but-bounded.rs +++ b/tests/ui/const-generics/associated-const-bindings/projection-unspecified-but-bounded.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(incomplete_features)] // Issue 110549 diff --git a/tests/ui/const-generics/associated-const-bindings/supertraits.rs b/tests/ui/const-generics/associated-const-bindings/supertraits.rs index d0647b62adb2e..ee8fe9bcd1e58 100644 --- a/tests/ui/const-generics/associated-const-bindings/supertraits.rs +++ b/tests/ui/const-generics/associated-const-bindings/supertraits.rs @@ -4,7 +4,7 @@ //@ check-pass #![feature( - min_generic_const_args, + gca_min_const_items, adt_const_params, const_param_ty_trait, generic_const_parameter_types diff --git a/tests/ui/const-generics/associated-const-bindings/unbraced-enum-variant.rs b/tests/ui/const-generics/associated-const-bindings/unbraced-enum-variant.rs index f2b581412a727..f706b44007552 100644 --- a/tests/ui/const-generics/associated-const-bindings/unbraced-enum-variant.rs +++ b/tests/ui/const-generics/associated-const-bindings/unbraced-enum-variant.rs @@ -1,5 +1,5 @@ //@ edition:2015 -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(incomplete_features)] pub enum Mode { diff --git a/tests/ui/const-generics/associated-const-bindings/unconstrained_impl_param.stderr b/tests/ui/const-generics/associated-const-bindings/unconstrained_impl_param.stderr index c34674604b51d..8ca341e4b23f1 100644 --- a/tests/ui/const-generics/associated-const-bindings/unconstrained_impl_param.stderr +++ b/tests/ui/const-generics/associated-const-bindings/unconstrained_impl_param.stderr @@ -5,7 +5,7 @@ LL | impl Trait for () where (U,): AssocConst {} | ^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates diff --git a/tests/ui/const-generics/associated-const-bindings/using-fnptr-as-type_const.rs b/tests/ui/const-generics/associated-const-bindings/using-fnptr-as-type_const.rs index b8eebfa3697e5..e9c4fb0584b81 100644 --- a/tests/ui/const-generics/associated-const-bindings/using-fnptr-as-type_const.rs +++ b/tests/ui/const-generics/associated-const-bindings/using-fnptr-as-type_const.rs @@ -1,7 +1,7 @@ // Regression test for #119783 #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] trait Trait { #[rustc_always_gca] diff --git a/tests/ui/const-generics/associated-const-bindings/wf-mismatch-1.rs b/tests/ui/const-generics/associated-const-bindings/wf-mismatch-1.rs index d098350c34734..1b7dd61a27125 100644 --- a/tests/ui/const-generics/associated-const-bindings/wf-mismatch-1.rs +++ b/tests/ui/const-generics/associated-const-bindings/wf-mismatch-1.rs @@ -1,7 +1,7 @@ //! Check that we correctly handle associated const bindings //! in `impl Trait` where the RHS is a const param (#151642). -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] trait Trait { diff --git a/tests/ui/const-generics/associated-const-bindings/wf-mismatch-2.rs b/tests/ui/const-generics/associated-const-bindings/wf-mismatch-2.rs index 67bfa9e6656ae..a23ddef117fdd 100644 --- a/tests/ui/const-generics/associated-const-bindings/wf-mismatch-2.rs +++ b/tests/ui/const-generics/associated-const-bindings/wf-mismatch-2.rs @@ -1,7 +1,7 @@ //! Check that we correctly handle associated const bindings //! in `dyn Trait` where the RHS is a const param (#151642). -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] trait Trait { diff --git a/tests/ui/const-generics/associated-const-bindings/wf-mismatch-3.rs b/tests/ui/const-generics/associated-const-bindings/wf-mismatch-3.rs index 0180aa4694f67..29cadda23761f 100644 --- a/tests/ui/const-generics/associated-const-bindings/wf-mismatch-3.rs +++ b/tests/ui/const-generics/associated-const-bindings/wf-mismatch-3.rs @@ -1,7 +1,7 @@ //! Check that we correctly handle associated const bindings //! where the RHS is a normalizable const projection (#151642). -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/const-arg-in-const-arg.min.stderr b/tests/ui/const-generics/const-arg-in-const-arg.min.stderr index 9ab0a3f137d74..102afaa9a0da2 100644 --- a/tests/ui/const-generics/const-arg-in-const-arg.min.stderr +++ b/tests/ui/const-generics/const-arg-in-const-arg.min.stderr @@ -6,7 +6,7 @@ LL | let _: [u8; foo::()]; | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:16:23 @@ -16,7 +16,7 @@ LL | let _: [u8; bar::()]; | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:18:23 @@ -26,7 +26,7 @@ LL | let _: [u8; faz::<'a>(&())]; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:20:23 @@ -36,7 +36,7 @@ LL | let _: [u8; baz::<'a>(&())]; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:21:23 @@ -46,7 +46,7 @@ LL | let _: [u8; faz::<'b>(&())]; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:23:23 @@ -56,7 +56,7 @@ LL | let _: [u8; baz::<'b>(&())]; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:27:23 @@ -66,7 +66,7 @@ LL | let _ = [0; bar::()]; | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:29:23 @@ -76,7 +76,7 @@ LL | let _ = [0; faz::<'a>(&())]; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:31:23 @@ -86,7 +86,7 @@ LL | let _ = [0; baz::<'a>(&())]; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:32:23 @@ -96,7 +96,7 @@ LL | let _ = [0; faz::<'b>(&())]; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:34:23 @@ -106,7 +106,7 @@ LL | let _ = [0; baz::<'b>(&())]; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:35:24 @@ -116,7 +116,7 @@ LL | let _: Foo<{ foo::() }>; | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:36:24 @@ -126,7 +126,7 @@ LL | let _: Foo<{ bar::() }>; | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:38:24 @@ -136,7 +136,7 @@ LL | let _: Foo<{ faz::<'a>(&()) }>; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:40:24 @@ -146,7 +146,7 @@ LL | let _: Foo<{ baz::<'a>(&()) }>; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:41:24 @@ -156,7 +156,7 @@ LL | let _: Foo<{ faz::<'b>(&()) }>; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:43:24 @@ -166,7 +166,7 @@ LL | let _: Foo<{ baz::<'b>(&()) }>; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:44:27 @@ -176,7 +176,7 @@ LL | let _ = Foo::<{ foo::() }>; | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:45:27 @@ -186,7 +186,7 @@ LL | let _ = Foo::<{ bar::() }>; | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:47:27 @@ -196,7 +196,7 @@ LL | let _ = Foo::<{ faz::<'a>(&()) }>; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:49:27 @@ -206,7 +206,7 @@ LL | let _ = Foo::<{ baz::<'a>(&()) }>; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:50:27 @@ -216,7 +216,7 @@ LL | let _ = Foo::<{ faz::<'b>(&()) }>; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const-arg-in-const-arg.rs:52:27 @@ -226,7 +226,7 @@ LL | let _ = Foo::<{ baz::<'b>(&()) }>; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0747]: unresolved item provided when a constant was expected --> $DIR/const-arg-in-const-arg.rs:16:23 diff --git a/tests/ui/const-generics/const-argument-if-length.min.stderr b/tests/ui/const-generics/const-argument-if-length.min.stderr index f6046db879ee0..c52d79a6f67bf 100644 --- a/tests/ui/const-generics/const-argument-if-length.min.stderr +++ b/tests/ui/const-generics/const-argument-if-length.min.stderr @@ -6,7 +6,7 @@ LL | pad: [u8; is_zst::()], | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0277]: the size for values of type `T` cannot be known at compilation time --> $DIR/const-argument-if-length.rs:16:12 diff --git a/tests/ui/const-generics/const-argument-non-static-lifetime.min.stderr b/tests/ui/const-generics/const-argument-non-static-lifetime.min.stderr index 4adcdf836c891..21f7e72f7dcb7 100644 --- a/tests/ui/const-generics/const-argument-non-static-lifetime.min.stderr +++ b/tests/ui/const-generics/const-argument-non-static-lifetime.min.stderr @@ -6,7 +6,7 @@ LL | let _: &'a (); | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/defaults/complex-generic-default-expr.min.stderr b/tests/ui/const-generics/defaults/complex-generic-default-expr.min.stderr index 71ca2b2888644..a24200f54b170 100644 --- a/tests/ui/const-generics/defaults/complex-generic-default-expr.min.stderr +++ b/tests/ui/const-generics/defaults/complex-generic-default-expr.min.stderr @@ -6,7 +6,7 @@ LL | struct Foo; | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/complex-generic-default-expr.rs:9:62 @@ -16,7 +16,7 @@ LL | struct Bar() }>(T); | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 2 previous errors diff --git a/tests/ui/const-generics/early/const_arg_trivial_macro_expansion-4.stderr b/tests/ui/const-generics/early/const_arg_trivial_macro_expansion-4.stderr index d4d95168caf28..2ad49111e26e6 100644 --- a/tests/ui/const-generics/early/const_arg_trivial_macro_expansion-4.stderr +++ b/tests/ui/const-generics/early/const_arg_trivial_macro_expansion-4.stderr @@ -11,7 +11,7 @@ LL | fn foo() -> Foo<{ arg!{} arg!{} }> { loop {} } | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const_arg_trivial_macro_expansion-4.rs:7:9 @@ -26,7 +26,7 @@ LL | fn foo() -> Foo<{ arg!{} arg!{} }> { loop {} } | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/const_arg_trivial_macro_expansion-4.rs:15:46 @@ -36,7 +36,7 @@ LL | fn bar() -> [(); { empty!{}; N }] { loop {} } | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 3 previous errors diff --git a/tests/ui/const-generics/early/macro_rules-braces.stderr b/tests/ui/const-generics/early/macro_rules-braces.stderr index 410b26d823bcc..f5a300026a51b 100644 --- a/tests/ui/const-generics/early/macro_rules-braces.stderr +++ b/tests/ui/const-generics/early/macro_rules-braces.stderr @@ -28,7 +28,7 @@ LL | let _: foo!({{ N }}); | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/macro_rules-braces.rs:36:19 @@ -38,7 +38,7 @@ LL | let _: bar!({ N }); | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/macro_rules-braces.rs:41:20 @@ -48,7 +48,7 @@ LL | let _: baz!({{ N }}); | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/macro_rules-braces.rs:46:19 @@ -58,7 +58,7 @@ LL | let _: biz!({ N }); | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 6 previous errors diff --git a/tests/ui/const-generics/early/trivial-const-arg-macro-nested-braces-2.stderr b/tests/ui/const-generics/early/trivial-const-arg-macro-nested-braces-2.stderr index 334b72a2f8416..927f0af668fa3 100644 --- a/tests/ui/const-generics/early/trivial-const-arg-macro-nested-braces-2.stderr +++ b/tests/ui/const-generics/early/trivial-const-arg-macro-nested-braces-2.stderr @@ -11,7 +11,7 @@ LL | fn foo() -> A<{{ y!() }}> { | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/early/trivial-const-arg-macro-nested-braces.stderr b/tests/ui/const-generics/early/trivial-const-arg-macro-nested-braces.stderr index 068091e6cc933..5d5319d0b8af7 100644 --- a/tests/ui/const-generics/early/trivial-const-arg-macro-nested-braces.stderr +++ b/tests/ui/const-generics/early/trivial-const-arg-macro-nested-braces.stderr @@ -11,7 +11,7 @@ LL | fn foo() -> A<{ y!() }> { | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/early/trivial-const-arg-nested-braces.stderr b/tests/ui/const-generics/early/trivial-const-arg-nested-braces.stderr index 7c831d4353643..168661e6d85b4 100644 --- a/tests/ui/const-generics/early/trivial-const-arg-nested-braces.stderr +++ b/tests/ui/const-generics/early/trivial-const-arg-nested-braces.stderr @@ -6,7 +6,7 @@ LL | fn foo() -> A<{ { N } }> { | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/fn-item-as-const-arg-137084.rs b/tests/ui/const-generics/fn-item-as-const-arg-137084.rs index 0d8d2effc3da0..cec3c881cc710 100644 --- a/tests/ui/const-generics/fn-item-as-const-arg-137084.rs +++ b/tests/ui/const-generics/fn-item-as-const-arg-137084.rs @@ -1,7 +1,7 @@ // Regression test for https://github.com/rust-lang/rust/issues/137084 // Previously caused ICE when using function item as const generic argument -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![allow(incomplete_features)] fn a() {} diff --git a/tests/ui/const-generics/gca/ambiguous-on-failed-eval-with-vars-fail.old.stderr b/tests/ui/const-generics/gca/ambiguous-on-failed-eval-with-vars-fail.old.stderr index 4306110c8433d..f3cb4a06cddc8 100644 --- a/tests/ui/const-generics/gca/ambiguous-on-failed-eval-with-vars-fail.old.stderr +++ b/tests/ui/const-generics/gca/ambiguous-on-failed-eval-with-vars-fail.old.stderr @@ -1,8 +1,8 @@ -error: `generic_const_args` requires -Znext-solver=globally to be enabled +error: `gca_const_items` requires -Znext-solver=globally to be enabled --> $DIR/ambiguous-on-failed-eval-with-vars-fail.rs:9:5 | -LL | generic_const_args, - | ^^^^^^^^^^^^^^^^^^ +LL | gca_const_items, + | ^^^^^^^^^^^^^^^ | = help: enable all of these features diff --git a/tests/ui/const-generics/gca/ambiguous-on-failed-eval-with-vars-fail.rs b/tests/ui/const-generics/gca/ambiguous-on-failed-eval-with-vars-fail.rs index a178a0f0d0b95..e24b11dbb1746 100644 --- a/tests/ui/const-generics/gca/ambiguous-on-failed-eval-with-vars-fail.rs +++ b/tests/ui/const-generics/gca/ambiguous-on-failed-eval-with-vars-fail.rs @@ -5,8 +5,8 @@ // removes the restriction that -Znext-solver must be enabled) #![feature( - min_generic_const_args, - generic_const_args, + gca_min_const_items, + gca_const_items, //[old]~^ ERROR next-solver generic_const_items )] diff --git a/tests/ui/const-generics/gca/ambiguous-on-failed-eval-with-vars.rs b/tests/ui/const-generics/gca/ambiguous-on-failed-eval-with-vars.rs index 3d78566e15c92..fc1f174280acd 100644 --- a/tests/ui/const-generics/gca/ambiguous-on-failed-eval-with-vars.rs +++ b/tests/ui/const-generics/gca/ambiguous-on-failed-eval-with-vars.rs @@ -2,9 +2,9 @@ //@ compile-flags: -Znext-solver #![feature( - min_generic_const_args, - macroless_generic_const_args, - generic_const_args, + gca_min_const_items, + gca_macroless_args, + gca_const_items, generic_const_items )] #![expect(incomplete_features)] diff --git a/tests/ui/const-generics/gca/assoc-const.rs b/tests/ui/const-generics/gca/assoc-const.rs index 316084e5b8cf9..d4b933d6a4aef 100644 --- a/tests/ui/const-generics/gca/assoc-const.rs +++ b/tests/ui/const-generics/gca/assoc-const.rs @@ -1,6 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![feature(min_generic_const_args, generic_const_args)] +#![feature(gca_min_const_items, gca_const_items)] use std::gca; diff --git a/tests/ui/const-generics/gca/basic-different-definitions.rs b/tests/ui/const-generics/gca/basic-different-definitions.rs index 215b28c985113..52797d142d400 100644 --- a/tests/ui/const-generics/gca/basic-different-definitions.rs +++ b/tests/ui/const-generics/gca/basic-different-definitions.rs @@ -2,8 +2,8 @@ //@ compile-flags: -Znext-solver #![feature(generic_const_items)] -#![feature(min_generic_const_args)] -#![feature(generic_const_args)] +#![feature(gca_min_const_items)] +#![feature(gca_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/gca/basic.rs b/tests/ui/const-generics/gca/basic.rs index c6158023a1be5..d432f733b69c5 100644 --- a/tests/ui/const-generics/gca/basic.rs +++ b/tests/ui/const-generics/gca/basic.rs @@ -2,8 +2,8 @@ //@ compile-flags: -Znext-solver #![feature(generic_const_items)] -#![feature(min_generic_const_args)] -#![feature(generic_const_args)] +#![feature(gca_min_const_items)] +#![feature(gca_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/gca/coherence-fail.rs b/tests/ui/const-generics/gca/coherence-fail.rs index 9b92fec952ce9..8fed4f8fa655d 100644 --- a/tests/ui/const-generics/gca/coherence-fail.rs +++ b/tests/ui/const-generics/gca/coherence-fail.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(generic_const_items, min_generic_const_args, generic_const_args)] +#![feature(generic_const_items, gca_min_const_items, gca_const_items)] #![expect(incomplete_features)] // computing the same value with different constant items but same generic arguments should fail diff --git a/tests/ui/const-generics/gca/coherence-ok.rs b/tests/ui/const-generics/gca/coherence-ok.rs index 4ea66eb8e290d..7db4d22604bf0 100644 --- a/tests/ui/const-generics/gca/coherence-ok.rs +++ b/tests/ui/const-generics/gca/coherence-ok.rs @@ -1,6 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver -#![feature(generic_const_items, min_generic_const_args, generic_const_args)] +#![feature(generic_const_items, gca_min_const_items, gca_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/gca/const-pattern-field-type-mismatch-162394.rs b/tests/ui/const-generics/gca/const-pattern-field-type-mismatch-162394.rs index 181693c365255..7600c4882a91c 100644 --- a/tests/ui/const-generics/gca/const-pattern-field-type-mismatch-162394.rs +++ b/tests/ui/const-generics/gca/const-pattern-field-type-mismatch-162394.rs @@ -1,9 +1,9 @@ //@ compile-flags: -Znext-solver=globally #![allow(incomplete_features)] -#![feature(macroless_generic_const_args)] -#![feature(macroless_const_item_generic_const_args)] -#![feature(generic_const_args, min_generic_const_args)] +#![feature(gca_macroless_args)] +#![feature(gca_macroless_items)] +#![feature(gca_const_items, gca_min_const_items)] #![feature(min_adt_const_params)] use std::marker::ConstParamTy; diff --git a/tests/ui/const-generics/gca/const-reference-to-constructor.rs b/tests/ui/const-generics/gca/const-reference-to-constructor.rs index bafaf9f532545..5f7cb70bf7017 100644 --- a/tests/ui/const-generics/gca/const-reference-to-constructor.rs +++ b/tests/ui/const-generics/gca/const-reference-to-constructor.rs @@ -1,8 +1,8 @@ //@ check-pass //@ compile-flags: -Znext-solver //! https://github.com/rust-lang/rust/issues/162923 -#![feature(min_generic_const_args)] -#![feature(generic_const_args)] +#![feature(gca_min_const_items)] +#![feature(gca_const_items)] enum T::B as u8 }> { A = 2, B, diff --git a/tests/ui/const-generics/gca/dyn-compat-generic-non-type-assoc-const.rs b/tests/ui/const-generics/gca/dyn-compat-generic-non-type-assoc-const.rs index ec32c7c8b1062..51c04bb47928a 100644 --- a/tests/ui/const-generics/gca/dyn-compat-generic-non-type-assoc-const.rs +++ b/tests/ui/const-generics/gca/dyn-compat-generic-non-type-assoc-const.rs @@ -1,10 +1,10 @@ // Ensure that traits with generic non-type associated consts are dyn *in*compatible, -// even when non-type associated const equality is enabled by `generic_const_args`. +// even when non-type associated const equality is enabled by `gca_const_items`. //@ dont-require-annotations: NOTE //@ compile-flags: -Znext-solver=globally -#![feature(generic_const_args, generic_const_items, min_generic_const_args)] +#![feature(gca_const_items, generic_const_items, gca_min_const_items)] #![expect(incomplete_features)] trait Trait { diff --git a/tests/ui/const-generics/gca/dyn-non-type-assoc-const-binding.rs b/tests/ui/const-generics/gca/dyn-non-type-assoc-const-binding.rs index bf764b829ab6d..2ae6aac08234c 100644 --- a/tests/ui/const-generics/gca/dyn-non-type-assoc-const-binding.rs +++ b/tests/ui/const-generics/gca/dyn-non-type-assoc-const-binding.rs @@ -1,7 +1,7 @@ //@ check-pass //@ compile-flags: -Znext-solver=globally -#![feature(min_generic_const_args, generic_const_args)] +#![feature(gca_min_const_items, gca_const_items)] #![expect(incomplete_features)] trait Trait { diff --git a/tests/ui/const-generics/gca/gca-anon-const-rejected.rs b/tests/ui/const-generics/gca/gca-anon-const-rejected.rs index 9cb0891127dd8..c1bffd959b887 100644 --- a/tests/ui/const-generics/gca/gca-anon-const-rejected.rs +++ b/tests/ui/const-generics/gca/gca-anon-const-rejected.rs @@ -1,8 +1,8 @@ //@ compile-flags: -Znext-solver // Test that anonymous const blocks using generic parameters are rejected -// under `generic_const_args`. Users should use named const items instead: +// under `gca_const_items`. Users should use named const items instead: // `const FOO: usize = N + 1;` -#![feature(generic_const_args, min_generic_const_args, generic_const_items)] +#![feature(gca_const_items, gca_min_const_items, generic_const_items)] use std::gca; diff --git a/tests/ui/const-generics/gca/gca-macro-fn-call.rs b/tests/ui/const-generics/gca/gca-macro-fn-call.rs index f4a604e2b4700..6035c14e5eb75 100644 --- a/tests/ui/const-generics/gca/gca-macro-fn-call.rs +++ b/tests/ui/const-generics/gca/gca-macro-fn-call.rs @@ -1,6 +1,6 @@ //! Regression test for #157152. //! -//! Under `min_generic_const_args` with `macroless_generic_const_args`, a braced const +//! Under `gca_min_const_items` with `gca_macroless_args`, a braced const //! argument containing an associated-function call (e.g. `FieldName::len()`, as generated //! by `tracing`'s logging macros as `FieldName<{ FieldName::len(name) }>`) was lowered as //! a tuple-struct constructor. Lowering the callee's `Self` type `FieldName`, written @@ -13,8 +13,8 @@ //! tuple-variant constructor (unions, primitives, foreign types), not just structs. //@ compile-flags: -Znext-solver -#![feature(min_generic_const_args, macroless_generic_const_args)] -#![feature(generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] +#![feature(gca_const_items)] #![feature(extern_types)] #![expect(incomplete_features)] diff --git a/tests/ui/const-generics/gca/generic-free-const.rs b/tests/ui/const-generics/gca/generic-free-const.rs index 8fef5931db1ca..d5793323b510c 100644 --- a/tests/ui/const-generics/gca/generic-free-const.rs +++ b/tests/ui/const-generics/gca/generic-free-const.rs @@ -2,9 +2,9 @@ //@ compile-flags: -Znext-solver #![feature( - min_generic_const_args, - macroless_generic_const_args, - generic_const_args, + gca_min_const_items, + gca_macroless_args, + gca_const_items, generic_const_items )] #![expect(incomplete_features)] diff --git a/tests/ui/const-generics/gca/generic-param-rhs.rs b/tests/ui/const-generics/gca/generic-param-rhs.rs index 19a57347a9056..d0e9f077c111d 100644 --- a/tests/ui/const-generics/gca/generic-param-rhs.rs +++ b/tests/ui/const-generics/gca/generic-param-rhs.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Znext-solver -#![feature(min_generic_const_args, generic_const_args)] +#![feature(gca_min_const_items, gca_const_items)] #![expect(incomplete_features)] fn foo() {} diff --git a/tests/ui/const-generics/gca/non-type-equality-fail.rs b/tests/ui/const-generics/gca/non-type-equality-fail.rs index 1ea34829c6c6a..9dbf1db99d1d5 100644 --- a/tests/ui/const-generics/gca/non-type-equality-fail.rs +++ b/tests/ui/const-generics/gca/non-type-equality-fail.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Znext-solver -#![feature(min_generic_const_args, generic_const_args)] +#![feature(gca_min_const_items, gca_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/gca/non-type-equality-ok.rs b/tests/ui/const-generics/gca/non-type-equality-ok.rs index ae7c069ea55f5..742672238a088 100644 --- a/tests/ui/const-generics/gca/non-type-equality-ok.rs +++ b/tests/ui/const-generics/gca/non-type-equality-ok.rs @@ -2,10 +2,10 @@ //@ compile-flags: -Znext-solver #![feature( - min_generic_const_args, - macroless_generic_const_args, - macroless_const_item_generic_const_args, - generic_const_args, + gca_min_const_items, + gca_macroless_args, + gca_macroless_items, + gca_const_items, generic_const_items )] #![expect(incomplete_features)] diff --git a/tests/ui/const-generics/gca/path-to-non-type-const.rs b/tests/ui/const-generics/gca/path-to-non-type-const.rs index 53382fe4aa247..b28d4ab4943de 100644 --- a/tests/ui/const-generics/gca/path-to-non-type-const.rs +++ b/tests/ui/const-generics/gca/path-to-non-type-const.rs @@ -2,9 +2,9 @@ //@ compile-flags: -Znext-solver #![feature( - min_generic_const_args, - macroless_generic_const_args, - generic_const_args, + gca_min_const_items, + gca_macroless_args, + gca_const_items, inherent_associated_types )] #![expect(incomplete_features)] diff --git a/tests/ui/const-generics/gca/require-next-solver.rs b/tests/ui/const-generics/gca/require-next-solver.rs index ffe3141b0f28a..ce2fdea3a6328 100644 --- a/tests/ui/const-generics/gca/require-next-solver.rs +++ b/tests/ui/const-generics/gca/require-next-solver.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] -#![feature(generic_const_args)] +#![feature(gca_min_const_items)] +#![feature(gca_const_items)] //~^ ERROR next-solver fn main() {} diff --git a/tests/ui/const-generics/gca/require-next-solver.stderr b/tests/ui/const-generics/gca/require-next-solver.stderr index 677c37610d842..717b561993a17 100644 --- a/tests/ui/const-generics/gca/require-next-solver.stderr +++ b/tests/ui/const-generics/gca/require-next-solver.stderr @@ -1,8 +1,8 @@ -error: `generic_const_args` requires -Znext-solver=globally to be enabled +error: `gca_const_items` requires -Znext-solver=globally to be enabled --> $DIR/require-next-solver.rs:2:12 | -LL | #![feature(generic_const_args)] - | ^^^^^^^^^^^^^^^^^^ +LL | #![feature(gca_const_items)] + | ^^^^^^^^^^^^^^^ | = help: enable all of these features diff --git a/tests/ui/const-generics/gca/rhs-but-not-root.rs b/tests/ui/const-generics/gca/rhs-but-not-root.rs index 4f355c84e4875..b1cf364a66299 100644 --- a/tests/ui/const-generics/gca/rhs-but-not-root.rs +++ b/tests/ui/const-generics/gca/rhs-but-not-root.rs @@ -1,7 +1,7 @@ //@ compile-flags: -Znext-solver #![feature(generic_const_items)] -#![feature(min_generic_const_args)] -#![feature(generic_const_args)] +#![feature(gca_min_const_items)] +#![feature(gca_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/gca/suggest-const-item-for-generic-expr.stderr b/tests/ui/const-generics/gca/suggest-const-item-for-generic-expr.stderr index 3727cc4551e6e..27d6c5d4c8557 100644 --- a/tests/ui/const-generics/gca/suggest-const-item-for-generic-expr.stderr +++ b/tests/ui/const-generics/gca/suggest-const-item-for-generic-expr.stderr @@ -6,7 +6,7 @@ LL | fn as_bytes(&self) -> &[u8; size_of::()] { | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/suggest-const-item-for-generic-expr.rs:16:31 @@ -16,7 +16,7 @@ LL | fn foo() -> [u8; size_of::()] { | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/suggest-const-item-for-generic-expr.rs:21:34 @@ -26,7 +26,7 @@ LL | fn bar() -> [u8; N + 1] { | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 3 previous errors diff --git a/tests/ui/const-generics/gca/wf-inherentimpl.old.stderr b/tests/ui/const-generics/gca/wf-inherentimpl.old.stderr index 5a9dd515868b9..71e9bcdf38a09 100644 --- a/tests/ui/const-generics/gca/wf-inherentimpl.old.stderr +++ b/tests/ui/const-generics/gca/wf-inherentimpl.old.stderr @@ -1,8 +1,8 @@ -error: `generic_const_args` requires -Znext-solver=globally to be enabled +error: `gca_const_items` requires -Znext-solver=globally to be enabled --> $DIR/wf-inherentimpl.rs:6:12 | -LL | #![feature(generic_const_args, min_generic_const_args)] - | ^^^^^^^^^^^^^^^^^^ +LL | #![feature(gca_const_items, gca_min_const_items)] + | ^^^^^^^^^^^^^^^ | = help: enable all of these features diff --git a/tests/ui/const-generics/gca/wf-inherentimpl.rs b/tests/ui/const-generics/gca/wf-inherentimpl.rs index 8248c7b01832a..afced2edbb89e 100644 --- a/tests/ui/const-generics/gca/wf-inherentimpl.rs +++ b/tests/ui/const-generics/gca/wf-inherentimpl.rs @@ -3,8 +3,8 @@ //@[next] compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicit revisions) #![feature(inherent_associated_types)] -#![feature(generic_const_args, min_generic_const_args)] -//[old]~^ ERROR `generic_const_args` requires -Znext-solver=globally to be enabled +#![feature(gca_const_items, gca_min_const_items)] +//[old]~^ ERROR `gca_const_items` requires -Znext-solver=globally to be enabled use std::gca; struct Foo; impl Foo { diff --git a/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.min.stderr b/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.min.stderr index a507159a778f0..15016c747d8a9 100644 --- a/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.min.stderr +++ b/tests/ui/const-generics/generic_const_exprs/array-size-in-generic-struct-param.min.stderr @@ -6,7 +6,7 @@ LL | struct ArithArrayLen([u32; 0 + N]); | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/array-size-in-generic-struct-param.rs:23:15 @@ -16,7 +16,7 @@ LL | arr: [u8; CFG.arr_size], | = help: const parameters may only be used as standalone arguments here, i.e. `CFG` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: `Config` is forbidden as the type of a const generic parameter --> $DIR/array-size-in-generic-struct-param.rs:21:21 diff --git a/tests/ui/const-generics/generic_const_exprs/auxiliary/non_local_type_const.rs b/tests/ui/const-generics/generic_const_exprs/auxiliary/non_local_type_const.rs index b4401b182be4e..b99d84d84847f 100644 --- a/tests/ui/const-generics/generic_const_exprs/auxiliary/non_local_type_const.rs +++ b/tests/ui/const-generics/generic_const_exprs/auxiliary/non_local_type_const.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/generic_const_exprs/bad-multiply.stderr b/tests/ui/const-generics/generic_const_exprs/bad-multiply.stderr index 5f9ecc8fc701f..e349ab78e4838 100644 --- a/tests/ui/const-generics/generic_const_exprs/bad-multiply.stderr +++ b/tests/ui/const-generics/generic_const_exprs/bad-multiply.stderr @@ -6,7 +6,7 @@ LL | SmallVec<{ D * 2 }>:, | = help: const parameters may only be used as standalone arguments here, i.e. `D` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0747]: constant provided when a type was expected --> $DIR/bad-multiply.rs:7:14 diff --git a/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr b/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr index 6bfe4d60a54b3..810a87c35aed8 100644 --- a/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr +++ b/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr @@ -6,7 +6,7 @@ LL | let _: [u8; size_of::<*mut T>()]; // error on stable, error with gce | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/dependence_lint.rs:22:37 @@ -16,7 +16,7 @@ LL | let _: [u8; if true { size_of::() } else { 3 }]; // error on stable, | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item warning: cannot use constants which depend on generic parameters in types --> $DIR/dependence_lint.rs:10:9 diff --git a/tests/ui/const-generics/generic_const_exprs/direct-inline-const-generic-default.rs b/tests/ui/const-generics/generic_const_exprs/direct-inline-const-generic-default.rs index 358d0d997cae8..3e01e8ae37f75 100644 --- a/tests/ui/const-generics/generic_const_exprs/direct-inline-const-generic-default.rs +++ b/tests/ui/const-generics/generic_const_exprs/direct-inline-const-generic-default.rs @@ -3,7 +3,7 @@ // Regression test for https://github.com/rust-lang/rust/issues/159063. #![feature(generic_const_exprs)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] struct S; diff --git a/tests/ui/const-generics/generic_const_exprs/feature-attribute-missing-in-dependent-crate-ice.stderr b/tests/ui/const-generics/generic_const_exprs/feature-attribute-missing-in-dependent-crate-ice.stderr index d322775a5d974..bd811c72e83d6 100644 --- a/tests/ui/const-generics/generic_const_exprs/feature-attribute-missing-in-dependent-crate-ice.stderr +++ b/tests/ui/const-generics/generic_const_exprs/feature-attribute-missing-in-dependent-crate-ice.stderr @@ -10,7 +10,7 @@ note: not a concrete type LL | impl aux::FromSlice for Wrapper { | ^^^^^^^^^^ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/generic_const_exprs/feature-gate-generic_const_exprs.stderr b/tests/ui/const-generics/generic_const_exprs/feature-gate-generic_const_exprs.stderr index 4d8118d0ad530..e2b74b61b2043 100644 --- a/tests/ui/const-generics/generic_const_exprs/feature-gate-generic_const_exprs.stderr +++ b/tests/ui/const-generics/generic_const_exprs/feature-gate-generic_const_exprs.stderr @@ -6,7 +6,7 @@ LL | type Arr = [u8; N - 1]; | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/generic_const_exprs/issue-72787.min.stderr b/tests/ui/const-generics/generic_const_exprs/issue-72787.min.stderr index 392a7c5ec3914..15db638d1ae45 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-72787.min.stderr +++ b/tests/ui/const-generics/generic_const_exprs/issue-72787.min.stderr @@ -6,7 +6,7 @@ LL | Condition<{ LHS <= RHS }>: True | = help: const parameters may only be used as standalone arguments here, i.e. `LHS` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/issue-72787.rs:11:24 @@ -16,7 +16,7 @@ LL | Condition<{ LHS <= RHS }>: True | = help: const parameters may only be used as standalone arguments here, i.e. `RHS` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/issue-72787.rs:23:25 @@ -26,7 +26,7 @@ LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, | = help: const parameters may only be used as standalone arguments here, i.e. `I` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/issue-72787.rs:23:36 @@ -36,7 +36,7 @@ LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True, | = help: const parameters may only be used as standalone arguments here, i.e. `J` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 4 previous errors diff --git a/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.min.stderr b/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.min.stderr index 345a7b381645f..fa711a917a666 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.min.stderr +++ b/tests/ui/const-generics/generic_const_exprs/issue-72819-generic-in-const-eval.min.stderr @@ -6,7 +6,7 @@ LL | where Assert::<{N < usize::MAX / 2}>: IsTrue, | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/generic_const_exprs/issue-74713.stderr b/tests/ui/const-generics/generic_const_exprs/issue-74713.stderr index 5cc02160d1878..9d03a11fc581d 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-74713.stderr +++ b/tests/ui/const-generics/generic_const_exprs/issue-74713.stderr @@ -6,7 +6,7 @@ LL | let _: &'a (); | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0308]: mismatched types --> $DIR/issue-74713.rs:3:10 diff --git a/tests/ui/const-generics/generic_const_exprs/next-solver-gce-incompatible-issue-158428.rs b/tests/ui/const-generics/generic_const_exprs/next-solver-gce-incompatible-issue-158428.rs index 8a23a68bc1810..5290c994ce692 100644 --- a/tests/ui/const-generics/generic_const_exprs/next-solver-gce-incompatible-issue-158428.rs +++ b/tests/ui/const-generics/generic_const_exprs/next-solver-gce-incompatible-issue-158428.rs @@ -1,8 +1,8 @@ //@ run-pass //@ compile-flags: -Znext-solver=globally -#![feature(min_generic_const_args)] -#![feature(generic_const_args)] +#![feature(gca_min_const_items)] +#![feature(gca_const_items)] #![feature(generic_const_exprs)] //~^ WARN: `feature(generic_const_exprs)` is not supported with the next-generation trait solver //@ normalize-stderr: "(--> ).*/tests/ui/const-generics/generic_const_exprs" -> "$1$$DIR" diff --git a/tests/ui/const-generics/generic_const_exprs/non-local-const.rs b/tests/ui/const-generics/generic_const_exprs/non-local-const.rs index 16fdab0f9e7f4..0d3e0770818fb 100644 --- a/tests/ui/const-generics/generic_const_exprs/non-local-const.rs +++ b/tests/ui/const-generics/generic_const_exprs/non-local-const.rs @@ -1,7 +1,7 @@ // regression test for #133808. //@ aux-build:non_local_type_const.rs -#![feature(min_generic_const_args, macroless_generic_const_args, generic_const_exprs)] +#![feature(gca_min_const_items, gca_macroless_args, generic_const_exprs)] #![allow(incomplete_features)] #![crate_type = "lib"] extern crate non_local_type_const; diff --git a/tests/ui/const-generics/generic_const_exprs/trivial-anon-const-use-cases.min.stderr b/tests/ui/const-generics/generic_const_exprs/trivial-anon-const-use-cases.min.stderr index 1d62f1da03ea7..885cad3846ec3 100644 --- a/tests/ui/const-generics/generic_const_exprs/trivial-anon-const-use-cases.min.stderr +++ b/tests/ui/const-generics/generic_const_exprs/trivial-anon-const-use-cases.min.stderr @@ -6,7 +6,7 @@ LL | stuff: [u8; { S + 1 }], // `S + 1` is NOT a valid const expression in t | = help: const parameters may only be used as standalone arguments here, i.e. `S` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/generic_const_parameter_types/inherent-type-const.rs b/tests/ui/const-generics/generic_const_parameter_types/inherent-type-const.rs index 97edbef7df10d..b4fe7a9a5da2a 100644 --- a/tests/ui/const-generics/generic_const_parameter_types/inherent-type-const.rs +++ b/tests/ui/const-generics/generic_const_parameter_types/inherent-type-const.rs @@ -3,7 +3,7 @@ //@[next] compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicit revisions) #![feature( - min_generic_const_args, + gca_min_const_items, generic_const_parameter_types, inherent_associated_types, min_adt_const_params, diff --git a/tests/ui/const-generics/ice-151186-fn-ptr-in-where-clause.rs b/tests/ui/const-generics/ice-151186-fn-ptr-in-where-clause.rs index fb9831d493465..47b85b142e033 100644 --- a/tests/ui/const-generics/ice-151186-fn-ptr-in-where-clause.rs +++ b/tests/ui/const-generics/ice-151186-fn-ptr-in-where-clause.rs @@ -1,6 +1,6 @@ // Regression test for https://github.com/rust-lang/rust/issues/151186 -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![allow(incomplete_features)] trait Maybe {} diff --git a/tests/ui/const-generics/ice-68875.stderr b/tests/ui/const-generics/ice-68875.stderr index 6cca0090cdaeb..ca01b2e643143 100644 --- a/tests/ui/const-generics/ice-68875.stderr +++ b/tests/ui/const-generics/ice-68875.stderr @@ -5,7 +5,7 @@ LL | data: &'a [u8; Self::SIZE], | ^^^^ | = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr b/tests/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr index f24817668e411..d865ecb6275b2 100644 --- a/tests/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr +++ b/tests/ui/const-generics/intrinsics-type_name-as-const-argument.min.stderr @@ -6,7 +6,7 @@ LL | T: Trait<{ std::intrinsics::type_name::() }>, | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: `&'static str` is forbidden as the type of a const generic parameter --> $DIR/intrinsics-type_name-as-const-argument.rs:9:22 diff --git a/tests/ui/const-generics/issue-46511.stderr b/tests/ui/const-generics/issue-46511.stderr index 766c0a7ff596f..74a1eb5779289 100644 --- a/tests/ui/const-generics/issue-46511.stderr +++ b/tests/ui/const-generics/issue-46511.stderr @@ -6,7 +6,7 @@ LL | _a: [u8; std::mem::size_of::<&'a mut u8>()] | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0392]: lifetime parameter `'a` is never used --> $DIR/issue-46511.rs:3:12 diff --git a/tests/ui/const-generics/issues/issue-56445-2.stderr b/tests/ui/const-generics/issues/issue-56445-2.stderr index f13f4fd0a36db..fa9a0d83201a6 100644 --- a/tests/ui/const-generics/issues/issue-56445-2.stderr +++ b/tests/ui/const-generics/issues/issue-56445-2.stderr @@ -10,7 +10,7 @@ note: not a concrete type LL | impl<'a> OnDiskDirEntry<'a> { | ^^^^^^^^^^^^^^^^^^ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/issues/issue-56445-3.stderr b/tests/ui/const-generics/issues/issue-56445-3.stderr index 4e1300969487b..4e5c491dbe8d0 100644 --- a/tests/ui/const-generics/issues/issue-56445-3.stderr +++ b/tests/ui/const-generics/issues/issue-56445-3.stderr @@ -5,7 +5,7 @@ LL | ram: [u8; Self::SIZE], | ^^^^ | = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/issues/issue-67375.min.stderr b/tests/ui/const-generics/issues/issue-67375.min.stderr index cee31a88b181c..757220e53dcac 100644 --- a/tests/ui/const-generics/issues/issue-67375.min.stderr +++ b/tests/ui/const-generics/issues/issue-67375.min.stderr @@ -6,7 +6,7 @@ LL | inner: [(); { [|_: &T| {}; 0].len() }], | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0392]: type parameter `T` is never used --> $DIR/issue-67375.rs:5:12 diff --git a/tests/ui/const-generics/issues/issue-67945-1.min.stderr b/tests/ui/const-generics/issues/issue-67945-1.min.stderr index 932ab653f2ca9..a0c4676443b73 100644 --- a/tests/ui/const-generics/issues/issue-67945-1.min.stderr +++ b/tests/ui/const-generics/issues/issue-67945-1.min.stderr @@ -6,7 +6,7 @@ LL | let x: S = MaybeUninit::uninit(); | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/issue-67945-1.rs:13:45 @@ -16,7 +16,7 @@ LL | let b = &*(&x as *const _ as *const S); | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0392]: type parameter `S` is never used --> $DIR/issue-67945-1.rs:7:12 diff --git a/tests/ui/const-generics/issues/issue-67945-2.min.stderr b/tests/ui/const-generics/issues/issue-67945-2.min.stderr index c73ddd35369b1..adc2cd09d26dc 100644 --- a/tests/ui/const-generics/issues/issue-67945-2.min.stderr +++ b/tests/ui/const-generics/issues/issue-67945-2.min.stderr @@ -5,7 +5,7 @@ LL | let x: Option> = None; | ^^^^ | = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/issues/issue-67945-3.min.stderr b/tests/ui/const-generics/issues/issue-67945-3.min.stderr index 9f726ed8e5e14..1ab37d3b2c466 100644 --- a/tests/ui/const-generics/issues/issue-67945-3.min.stderr +++ b/tests/ui/const-generics/issues/issue-67945-3.min.stderr @@ -6,7 +6,7 @@ LL | let x: Option = None; | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0392]: type parameter `S` is never used --> $DIR/issue-67945-3.rs:9:12 diff --git a/tests/ui/const-generics/issues/issue-67945-4.min.stderr b/tests/ui/const-generics/issues/issue-67945-4.min.stderr index 94873bc45c440..a6e3755088c92 100644 --- a/tests/ui/const-generics/issues/issue-67945-4.min.stderr +++ b/tests/ui/const-generics/issues/issue-67945-4.min.stderr @@ -6,7 +6,7 @@ LL | let x: Option> = None; | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0392]: type parameter `S` is never used --> $DIR/issue-67945-4.rs:8:12 diff --git a/tests/ui/const-generics/issues/issue-68366.min.stderr b/tests/ui/const-generics/issues/issue-68366.min.stderr index 89bd073e4011b..8d10b83b7bcb2 100644 --- a/tests/ui/const-generics/issues/issue-68366.min.stderr +++ b/tests/ui/const-generics/issues/issue-68366.min.stderr @@ -6,7 +6,7 @@ LL | impl Collatz<{Some(N)}> {} | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: `Option` is forbidden as the type of a const generic parameter --> $DIR/issue-68366.rs:9:25 diff --git a/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr b/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr index 289e9f59b697e..6e00aa40f6014 100644 --- a/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr +++ b/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr @@ -6,7 +6,7 @@ LL | fn ty_param() -> [u8; std::mem::size_of::()] { | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/issue-76701-ty-param-in-const.rs:6:42 @@ -16,7 +16,7 @@ LL | fn const_param() -> [u8; N + 1] { | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 2 previous errors diff --git a/tests/ui/const-generics/issues/issue-80062.stderr b/tests/ui/const-generics/issues/issue-80062.stderr index bff3886d6328b..5d804bf8ef8b2 100644 --- a/tests/ui/const-generics/issues/issue-80062.stderr +++ b/tests/ui/const-generics/issues/issue-80062.stderr @@ -6,7 +6,7 @@ LL | let _: [u8; sof::()]; | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/issues/issue-80375.stderr b/tests/ui/const-generics/issues/issue-80375.stderr index 552bdc6618785..d2adadad7ace4 100644 --- a/tests/ui/const-generics/issues/issue-80375.stderr +++ b/tests/ui/const-generics/issues/issue-80375.stderr @@ -6,7 +6,7 @@ LL | struct MyArray([u8; COUNT + 1]); | = help: const parameters may only be used as standalone arguments here, i.e. `COUNT` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/legacy-const-generics-bad.stderr b/tests/ui/const-generics/legacy-const-generics-bad.stderr index df686f6484c75..80d807c3f822a 100644 --- a/tests/ui/const-generics/legacy-const-generics-bad.stderr +++ b/tests/ui/const-generics/legacy-const-generics-bad.stderr @@ -18,7 +18,7 @@ LL | legacy_const_generics::foo(0, N + 1, 2); | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 2 previous errors diff --git a/tests/ui/const-generics/mgca/adt_expr_arg_simple.rs b/tests/ui/const-generics/mgca/adt_expr_arg_simple.rs index 32714ca551fbc..112cf5563a59e 100644 --- a/tests/ui/const-generics/mgca/adt_expr_arg_simple.rs +++ b/tests/ui/const-generics/mgca/adt_expr_arg_simple.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/adt_expr_arg_simple.stderr b/tests/ui/const-generics/mgca/adt_expr_arg_simple.stderr index 0213c447b59ca..96f8461b9cb82 100644 --- a/tests/ui/const-generics/mgca/adt_expr_arg_simple.stderr +++ b/tests/ui/const-generics/mgca/adt_expr_arg_simple.stderr @@ -10,7 +10,7 @@ error: generic parameters may not be used in const operations LL | foo::<{ Some:: { 0: const { N + 1 } } }>(); | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 2 previous errors diff --git a/tests/ui/const-generics/mgca/adt_expr_arg_tuple_expr_fail.rs b/tests/ui/const-generics/mgca/adt_expr_arg_tuple_expr_fail.rs index 6fbef3704991e..c488b90aec14b 100644 --- a/tests/ui/const-generics/mgca/adt_expr_arg_tuple_expr_fail.rs +++ b/tests/ui/const-generics/mgca/adt_expr_arg_tuple_expr_fail.rs @@ -1,6 +1,6 @@ #![feature( - min_generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_macroless_args, adt_const_params, unsized_const_params )] diff --git a/tests/ui/const-generics/mgca/adt_expr_erroneuous_inits.rs b/tests/ui/const-generics/mgca/adt_expr_erroneuous_inits.rs index f11bd2e51660b..20bac03fab1c0 100644 --- a/tests/ui/const-generics/mgca/adt_expr_erroneuous_inits.rs +++ b/tests/ui/const-generics/mgca/adt_expr_erroneuous_inits.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![expect(incomplete_features)] #![crate_type = "lib"] diff --git a/tests/ui/const-generics/mgca/adt_expr_fields_type_check.rs b/tests/ui/const-generics/mgca/adt_expr_fields_type_check.rs index ecb68b53fcb65..38eb04760c598 100644 --- a/tests/ui/const-generics/mgca/adt_expr_fields_type_check.rs +++ b/tests/ui/const-generics/mgca/adt_expr_fields_type_check.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![expect(incomplete_features)] #[derive(Eq, PartialEq, std::marker::ConstParamTy)] diff --git a/tests/ui/const-generics/mgca/adt_expr_infers_from_value.rs b/tests/ui/const-generics/mgca/adt_expr_infers_from_value.rs index 3db15a2aef49c..30b8ca3dd2752 100644 --- a/tests/ui/const-generics/mgca/adt_expr_infers_from_value.rs +++ b/tests/ui/const-generics/mgca/adt_expr_infers_from_value.rs @@ -2,8 +2,8 @@ #![feature( generic_const_items, - min_generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_macroless_args, adt_const_params, generic_const_parameter_types, const_param_ty_trait @@ -42,5 +42,5 @@ fn main() { struct PC { _0: PhantomData, } -// FIXME(min_generic_const_args): this shouldn't have to do silly (expr,).0 hacks +// FIXME(gca_min_const_items): this shouldn't have to do silly (expr,).0 hacks const PC: PC = (PC { _0: PhantomData:: },).0; diff --git a/tests/ui/const-generics/mgca/adt_expr_unit_enum_extra_field.rs b/tests/ui/const-generics/mgca/adt_expr_unit_enum_extra_field.rs index 6ae942c8dc06d..d48b5cb9e7100 100644 --- a/tests/ui/const-generics/mgca/adt_expr_unit_enum_extra_field.rs +++ b/tests/ui/const-generics/mgca/adt_expr_unit_enum_extra_field.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #[derive(Eq, PartialEq, std::marker::ConstParamTy)] enum E { diff --git a/tests/ui/const-generics/mgca/adt_expr_unit_struct_extra_field.rs b/tests/ui/const-generics/mgca/adt_expr_unit_struct_extra_field.rs index ef0b885388f7e..0eaadd1a9b31d 100644 --- a/tests/ui/const-generics/mgca/adt_expr_unit_struct_extra_field.rs +++ b/tests/ui/const-generics/mgca/adt_expr_unit_struct_extra_field.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #[derive(Eq, PartialEq, std::marker::ConstParamTy)] struct Foo; diff --git a/tests/ui/const-generics/mgca/ambiguous-assoc-const.rs b/tests/ui/const-generics/mgca/ambiguous-assoc-const.rs index ff828f6323fba..24d4a7dadeb68 100644 --- a/tests/ui/const-generics/mgca/ambiguous-assoc-const.rs +++ b/tests/ui/const-generics/mgca/ambiguous-assoc-const.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![expect(incomplete_features)] trait Tr { diff --git a/tests/ui/const-generics/mgca/array-const-arg-len-mismatch.rs b/tests/ui/const-generics/mgca/array-const-arg-len-mismatch.rs index 78e9c0821fa88..134a82e9d3490 100644 --- a/tests/ui/const-generics/mgca/array-const-arg-len-mismatch.rs +++ b/tests/ui/const-generics/mgca/array-const-arg-len-mismatch.rs @@ -3,7 +3,7 @@ //! Ensure that providing an array const arg with the wrong number of elements //! doesn't ICE or silently cause UB. #![expect(incomplete_features)] -#![feature(adt_const_params, min_generic_const_args, macroless_generic_const_args)] +#![feature(adt_const_params, gca_min_const_items, gca_macroless_args)] #![feature(unsized_const_params, generic_const_parameter_types)] use std::gca; diff --git a/tests/ui/const-generics/mgca/array-const-arg-type-mismatch.rs b/tests/ui/const-generics/mgca/array-const-arg-type-mismatch.rs index 3b36017445b59..def077e4d292d 100644 --- a/tests/ui/const-generics/mgca/array-const-arg-type-mismatch.rs +++ b/tests/ui/const-generics/mgca/array-const-arg-type-mismatch.rs @@ -1,5 +1,5 @@ #![expect(incomplete_features)] -#![feature(adt_const_params, min_generic_const_args, macroless_generic_const_args)] +#![feature(adt_const_params, gca_min_const_items, gca_macroless_args)] use std::marker::ConstParamTy; #[derive(Eq, PartialEq, ConstParamTy)] diff --git a/tests/ui/const-generics/mgca/array-expr-complex.rs b/tests/ui/const-generics/mgca/array-expr-complex.rs index be3b85e2bd240..1c96c492b3cfd 100644 --- a/tests/ui/const-generics/mgca/array-expr-complex.rs +++ b/tests/ui/const-generics/mgca/array-expr-complex.rs @@ -1,7 +1,7 @@ //@ revisions: r1 r2 r3 #![expect(incomplete_features)] -#![feature(min_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, adt_const_params)] use std::gca; diff --git a/tests/ui/const-generics/mgca/array-expr-empty.rs b/tests/ui/const-generics/mgca/array-expr-empty.rs index d37c6f2fcfe35..41dfb5e6f8747 100644 --- a/tests/ui/const-generics/mgca/array-expr-empty.rs +++ b/tests/ui/const-generics/mgca/array-expr-empty.rs @@ -1,5 +1,5 @@ #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] fn takes_empty_array() {} //~^ ERROR: expected type, found `]` diff --git a/tests/ui/const-generics/mgca/array-expr-simple.rs b/tests/ui/const-generics/mgca/array-expr-simple.rs index 3a096d98e7fa0..eba86898c41a1 100644 --- a/tests/ui/const-generics/mgca/array-expr-simple.rs +++ b/tests/ui/const-generics/mgca/array-expr-simple.rs @@ -1,6 +1,6 @@ //@ run-pass #![expect(incomplete_features)] -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![allow(dead_code)] fn takes_array_u32() {} diff --git a/tests/ui/const-generics/mgca/array-expr-type-mismatch-in-where-bound.rs b/tests/ui/const-generics/mgca/array-expr-type-mismatch-in-where-bound.rs index be12837c4481f..a7582258de2f5 100644 --- a/tests/ui/const-generics/mgca/array-expr-type-mismatch-in-where-bound.rs +++ b/tests/ui/const-generics/mgca/array-expr-type-mismatch-in-where-bound.rs @@ -1,5 +1,5 @@ //! regression test for -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![feature(adt_const_params)] #![expect(incomplete_features)] diff --git a/tests/ui/const-generics/mgca/array-expr-with-assoc-const.rs b/tests/ui/const-generics/mgca/array-expr-with-assoc-const.rs index 356c48085adb0..85ef64c498a4c 100644 --- a/tests/ui/const-generics/mgca/array-expr-with-assoc-const.rs +++ b/tests/ui/const-generics/mgca/array-expr-with-assoc-const.rs @@ -1,6 +1,6 @@ //@ run-pass #![expect(incomplete_features)] -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![allow(dead_code)] fn takes_array() {} diff --git a/tests/ui/const-generics/mgca/array-expr-with-macro.rs b/tests/ui/const-generics/mgca/array-expr-with-macro.rs index 24e9280e543e7..db768339118f3 100644 --- a/tests/ui/const-generics/mgca/array-expr-with-macro.rs +++ b/tests/ui/const-generics/mgca/array-expr-with-macro.rs @@ -1,6 +1,6 @@ //@ run-pass #![expect(incomplete_features)] -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![allow(dead_code)] macro_rules! make_array { diff --git a/tests/ui/const-generics/mgca/array-expr-with-struct.rs b/tests/ui/const-generics/mgca/array-expr-with-struct.rs index 4cc958a9f0273..1d4c051e53f0b 100644 --- a/tests/ui/const-generics/mgca/array-expr-with-struct.rs +++ b/tests/ui/const-generics/mgca/array-expr-with-struct.rs @@ -1,5 +1,5 @@ //@ run-pass -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![expect(incomplete_features)] #![allow(dead_code)] diff --git a/tests/ui/const-generics/mgca/array-expr-with-tuple.rs b/tests/ui/const-generics/mgca/array-expr-with-tuple.rs index 4e5124a6d7ae1..f429ca20ce832 100644 --- a/tests/ui/const-generics/mgca/array-expr-with-tuple.rs +++ b/tests/ui/const-generics/mgca/array-expr-with-tuple.rs @@ -1,7 +1,7 @@ //@ run-pass #![feature( - min_generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_macroless_args, adt_const_params, unsized_const_params )] diff --git a/tests/ui/const-generics/mgca/array-with-wrong-tuple-type.rs b/tests/ui/const-generics/mgca/array-with-wrong-tuple-type.rs index 138f3c41d6799..a4131a22337aa 100644 --- a/tests/ui/const-generics/mgca/array-with-wrong-tuple-type.rs +++ b/tests/ui/const-generics/mgca/array-with-wrong-tuple-type.rs @@ -1,7 +1,7 @@ #![feature( adt_const_params, - min_generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_macroless_args, unsized_const_params )] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/mgca/array_elem_type_mismatch.rs b/tests/ui/const-generics/mgca/array_elem_type_mismatch.rs index b8cbbed030fe5..aa6385c28ded0 100644 --- a/tests/ui/const-generics/mgca/array_elem_type_mismatch.rs +++ b/tests/ui/const-generics/mgca/array_elem_type_mismatch.rs @@ -3,8 +3,8 @@ #![feature( adt_const_params, generic_const_parameter_types, - min_generic_const_args, - macroless_generic_const_args + gca_min_const_items, + gca_macroless_args )] fn foo() {} diff --git a/tests/ui/const-generics/mgca/array_expr_arg_complex.rs b/tests/ui/const-generics/mgca/array_expr_arg_complex.rs index 76534f12d80c8..7edeb25f30e48 100644 --- a/tests/ui/const-generics/mgca/array_expr_arg_complex.rs +++ b/tests/ui/const-generics/mgca/array_expr_arg_complex.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, adt_const_params, unsized_const_params)] +#![feature(gca_min_const_items, adt_const_params, unsized_const_params)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/assoc-const-projection-in-bound.rs b/tests/ui/const-generics/mgca/assoc-const-projection-in-bound.rs index 9601cbc997f45..7997cff84c510 100644 --- a/tests/ui/const-generics/mgca/assoc-const-projection-in-bound.rs +++ b/tests/ui/const-generics/mgca/assoc-const-projection-in-bound.rs @@ -1,7 +1,7 @@ //! regression test for //@ run-pass #![expect(incomplete_features)] -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![allow(dead_code)] use std::gca; diff --git a/tests/ui/const-generics/mgca/assoc-const-without-type_const.rs b/tests/ui/const-generics/mgca/assoc-const-without-type_const.rs index e3c37cac7a696..a3117bc5387ce 100644 --- a/tests/ui/const-generics/mgca/assoc-const-without-type_const.rs +++ b/tests/ui/const-generics/mgca/assoc-const-without-type_const.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![allow(incomplete_features)] pub trait Tr { diff --git a/tests/ui/const-generics/mgca/assoc-const.rs b/tests/ui/const-generics/mgca/assoc-const.rs index 8a2a02ee096f6..786e2557cce8f 100644 --- a/tests/ui/const-generics/mgca/assoc-const.rs +++ b/tests/ui/const-generics/mgca/assoc-const.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![allow(incomplete_features)] pub trait Tr { diff --git a/tests/ui/const-generics/mgca/auxiliary/anon-const-def-id-on-const-arg-with-anon.rs b/tests/ui/const-generics/mgca/auxiliary/anon-const-def-id-on-const-arg-with-anon.rs index c1ebfc18e0816..c25ce5a03b73e 100644 --- a/tests/ui/const-generics/mgca/auxiliary/anon-const-def-id-on-const-arg-with-anon.rs +++ b/tests/ui/const-generics/mgca/auxiliary/anon-const-def-id-on-const-arg-with-anon.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(incomplete_features)] pub struct S; // this is a directly represented anon const... it's a bit weird. diff --git a/tests/ui/const-generics/mgca/bad-const-arg-fn-154539.rs b/tests/ui/const-generics/mgca/bad-const-arg-fn-154539.rs index a4ad2cccaa544..aca8016ff0235 100644 --- a/tests/ui/const-generics/mgca/bad-const-arg-fn-154539.rs +++ b/tests/ui/const-generics/mgca/bad-const-arg-fn-154539.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/bad-gca-macro.rs b/tests/ui/const-generics/mgca/bad-gca-macro.rs index 50f2ebe65e818..db4fc5ded6926 100644 --- a/tests/ui/const-generics/mgca/bad-gca-macro.rs +++ b/tests/ui/const-generics/mgca/bad-gca-macro.rs @@ -1,7 +1,7 @@ //@ edition: 2024 //! Reject direct const arguments in value/type positions without unrelated brace suggestions. -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![deny(unused_braces)] use std::gca; diff --git a/tests/ui/const-generics/mgca/bad-impl-trait-with-apit.rs b/tests/ui/const-generics/mgca/bad-impl-trait-with-apit.rs index 1ecf303dbb695..f2fbdc913ceae 100644 --- a/tests/ui/const-generics/mgca/bad-impl-trait-with-apit.rs +++ b/tests/ui/const-generics/mgca/bad-impl-trait-with-apit.rs @@ -1,7 +1,7 @@ // Regression test for issue #155834 #![expect(incomplete_features)] -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] trait Trait {} diff --git a/tests/ui/const-generics/mgca/bad-type_const-syntax.rs b/tests/ui/const-generics/mgca/bad-type_const-syntax.rs index c0391d54e423d..8a8cdce52e768 100644 --- a/tests/ui/const-generics/mgca/bad-type_const-syntax.rs +++ b/tests/ui/const-generics/mgca/bad-type_const-syntax.rs @@ -11,11 +11,11 @@ struct S; impl Tr for S { const N: usize = core::gca!(0); - //~^ ERROR: use of unstable library feature `min_generic_const_args` [E0658] + //~^ ERROR: use of unstable library feature `gca_min_const_items` [E0658] //~| ERROR: implementation of a `#[rustc_always_gca]` must have a `gca!` RHS //~| ERROR: expected expression, found `gca!()` constant const M: usize = std::gca!(0); - //~^ ERROR: use of unstable library feature `min_generic_const_args` [E0658] + //~^ ERROR: use of unstable library feature `gca_min_const_items` [E0658] //~| ERROR: implementation of a `#[rustc_always_gca]` must have a `gca!` RHS //~| ERROR: expected expression, found `gca!()` constant } diff --git a/tests/ui/const-generics/mgca/bad-type_const-syntax.stderr b/tests/ui/const-generics/mgca/bad-type_const-syntax.stderr index 0e8c2f4971a41..13c6eddd54364 100644 --- a/tests/ui/const-generics/mgca/bad-type_const-syntax.stderr +++ b/tests/ui/const-generics/mgca/bad-type_const-syntax.stderr @@ -1,21 +1,21 @@ -error[E0658]: use of unstable library feature `min_generic_const_args` +error[E0658]: use of unstable library feature `gca_min_const_items` --> $DIR/bad-type_const-syntax.rs:13:22 | LL | const N: usize = core::gca!(0); | ^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: use of unstable library feature `min_generic_const_args` +error[E0658]: use of unstable library feature `gca_min_const_items` --> $DIR/bad-type_const-syntax.rs:17:22 | LL | const M: usize = std::gca!(0); | ^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: the `rustc_always_gca` attribute is an experimental feature @@ -25,7 +25,7 @@ LL | #[rustc_always_gca] | ^^^^^^^^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: the `rustc_always_gca` attribute is an experimental feature @@ -35,7 +35,7 @@ LL | #[rustc_always_gca] | ^^^^^^^^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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: expected expression, found `gca!()` constant diff --git a/tests/ui/const-generics/mgca/braced-const-infer-in-body.rs b/tests/ui/const-generics/mgca/braced-const-infer-in-body.rs index 38851a6e5130f..4fb4d54a9275e 100644 --- a/tests/ui/const-generics/mgca/braced-const-infer-in-body.rs +++ b/tests/ui/const-generics/mgca/braced-const-infer-in-body.rs @@ -1,7 +1,7 @@ //! Regression test for: https://github.com/rust-lang/rust/issues/160798 #![crate_type = "lib"] -#![feature(min_generic_const_args)] -#![feature(macroless_generic_const_args)] +#![feature(gca_min_const_items)] +#![feature(gca_macroless_args)] use std::gca; diff --git a/tests/ui/const-generics/mgca/braced-const-infer.rs b/tests/ui/const-generics/mgca/braced-const-infer.rs index ad68bb499f084..afee161c7ce88 100644 --- a/tests/ui/const-generics/mgca/braced-const-infer.rs +++ b/tests/ui/const-generics/mgca/braced-const-infer.rs @@ -1,5 +1,5 @@ //! Regression test for https://github.com/rust-lang/rust/issues/153198 -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![allow(incomplete_features, rust_2021_compatibility)] trait Trait {} diff --git a/tests/ui/const-generics/mgca/concrete-expr-with-generics-in-env.rs b/tests/ui/const-generics/mgca/concrete-expr-with-generics-in-env.rs index 9f6a62aa60e17..c72ce06ceb194 100644 --- a/tests/ui/const-generics/mgca/concrete-expr-with-generics-in-env.rs +++ b/tests/ui/const-generics/mgca/concrete-expr-with-generics-in-env.rs @@ -1,7 +1,7 @@ //@ check-pass #![expect(incomplete_features)] -#![feature(min_generic_const_args, generic_const_items)] +#![feature(gca_min_const_items, generic_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/const-arg-coherence-conflicting-methods.rs b/tests/ui/const-generics/mgca/const-arg-coherence-conflicting-methods.rs index e19b71153b1e5..58da2bc86bee6 100644 --- a/tests/ui/const-generics/mgca/const-arg-coherence-conflicting-methods.rs +++ b/tests/ui/const-generics/mgca/const-arg-coherence-conflicting-methods.rs @@ -1,7 +1,7 @@ // Regression test for #140729 #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/const-arg-mismatched-literal-suffix.rs b/tests/ui/const-generics/mgca/const-arg-mismatched-literal-suffix.rs index c4e941edbb4de..8a26ae568e3b8 100644 --- a/tests/ui/const-generics/mgca/const-arg-mismatched-literal-suffix.rs +++ b/tests/ui/const-generics/mgca/const-arg-mismatched-literal-suffix.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs b/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs index 75e936ee8f5e3..5272f6fe0c97b 100644 --- a/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs +++ b/tests/ui/const-generics/mgca/const-ctor-overflow-eval.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![expect(incomplete_features)] use std::marker::ConstParamTy; diff --git a/tests/ui/const-generics/mgca/const-ctor-with-error.rs b/tests/ui/const-generics/mgca/const-ctor-with-error.rs index c72feb65b959f..9272b07b01048 100644 --- a/tests/ui/const-generics/mgca/const-ctor-with-error.rs +++ b/tests/ui/const-generics/mgca/const-ctor-with-error.rs @@ -1,6 +1,6 @@ // to ensure it does not ices like before -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![expect(incomplete_features)] use std::marker::ConstParamTy; diff --git a/tests/ui/const-generics/mgca/const-ctor.rs b/tests/ui/const-generics/mgca/const-ctor.rs index 4d95fc5013dde..361edb1d25165 100644 --- a/tests/ui/const-generics/mgca/const-ctor.rs +++ b/tests/ui/const-generics/mgca/const-ctor.rs @@ -5,8 +5,8 @@ //@ check-pass #![feature( - min_generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_macroless_args, adt_const_params, generic_const_parameter_types, const_param_ty_trait diff --git a/tests/ui/const-generics/mgca/const-param-in-nested-inline-const-arg.rs b/tests/ui/const-generics/mgca/const-param-in-nested-inline-const-arg.rs index e8af7e00b470a..6d74d66874240 100644 --- a/tests/ui/const-generics/mgca/const-param-in-nested-inline-const-arg.rs +++ b/tests/ui/const-generics/mgca/const-param-in-nested-inline-const-arg.rs @@ -1,5 +1,5 @@ //@compile-flags: -Znext-solver=globally -#![feature(generic_const_args, min_generic_const_args)] +#![feature(gca_const_items, gca_min_const_items)] struct S; fn foo(_: S<{ const { const { N } } }>) {} diff --git a/tests/ui/const-generics/mgca/cyclic-type-const-151251.rs b/tests/ui/const-generics/mgca/cyclic-type-const-151251.rs index 7c0a6c9f7771b..af873ec558071 100644 --- a/tests/ui/const-generics/mgca/cyclic-type-const-151251.rs +++ b/tests/ui/const-generics/mgca/cyclic-type-const-151251.rs @@ -1,6 +1,6 @@ //@ needs-rustc-debug-assertions -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![feature(generic_const_exprs)] #![expect(incomplete_features)] diff --git a/tests/ui/const-generics/mgca/double-inline-const.rs b/tests/ui/const-generics/mgca/double-inline-const.rs index 9bfbd1819c695..0528fdbac7928 100644 --- a/tests/ui/const-generics/mgca/double-inline-const.rs +++ b/tests/ui/const-generics/mgca/double-inline-const.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] struct S; diff --git a/tests/ui/const-generics/mgca/double-inline-const.stderr b/tests/ui/const-generics/mgca/double-inline-const.stderr index c0ae0392562a2..846ef73ff7793 100644 --- a/tests/ui/const-generics/mgca/double-inline-const.stderr +++ b/tests/ui/const-generics/mgca/double-inline-const.stderr @@ -9,7 +9,7 @@ note: not a concrete type | LL | impl S { | ^^^^ - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/mgca/double-wrapped-path-not-accidentally-stabilized.stderr b/tests/ui/const-generics/mgca/double-wrapped-path-not-accidentally-stabilized.stderr index aecb2b6681b43..78663c8cfc855 100644 --- a/tests/ui/const-generics/mgca/double-wrapped-path-not-accidentally-stabilized.stderr +++ b/tests/ui/const-generics/mgca/double-wrapped-path-not-accidentally-stabilized.stderr @@ -6,7 +6,7 @@ LL | f::<{ { N } }>(); | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/mgca/early-bound-param-lt-bad.rs b/tests/ui/const-generics/mgca/early-bound-param-lt-bad.rs index 0ee2b4eb45f62..a78c7df160847 100644 --- a/tests/ui/const-generics/mgca/early-bound-param-lt-bad.rs +++ b/tests/ui/const-generics/mgca/early-bound-param-lt-bad.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] trait Trait {} diff --git a/tests/ui/const-generics/mgca/early-bound-param-lt-bad.stderr b/tests/ui/const-generics/mgca/early-bound-param-lt-bad.stderr index 511c888ee24f0..89006708b86c8 100644 --- a/tests/ui/const-generics/mgca/early-bound-param-lt-bad.stderr +++ b/tests/ui/const-generics/mgca/early-bound-param-lt-bad.stderr @@ -4,7 +4,7 @@ error: generic parameters may not be used in const operations LL | T: Trait | ^^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/mgca/explicit_anon_consts.rs b/tests/ui/const-generics/mgca/explicit_anon_consts.rs index 3c7c1da90ed39..956ab43a1fdd7 100644 --- a/tests/ui/const-generics/mgca/explicit_anon_consts.rs +++ b/tests/ui/const-generics/mgca/explicit_anon_consts.rs @@ -1,4 +1,4 @@ -#![feature(generic_const_items, min_generic_const_args)] +#![feature(generic_const_items, gca_min_const_items)] #![expect(incomplete_features)] // library crates exercise weirder code paths around // DefIds which were created for const args. diff --git a/tests/ui/const-generics/mgca/explicit_anon_consts.stderr b/tests/ui/const-generics/mgca/explicit_anon_consts.stderr index ad533df5138f5..39747b074550e 100644 --- a/tests/ui/const-generics/mgca/explicit_anon_consts.stderr +++ b/tests/ui/const-generics/mgca/explicit_anon_consts.stderr @@ -40,7 +40,7 @@ error: generic parameters may not be used in const operations LL | const ITEM3: usize = gca!(const { N }); | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/explicit_anon_consts.rs:61:31 @@ -48,7 +48,7 @@ error: generic parameters may not be used in const operations LL | T3: Trait, | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/explicit_anon_consts.rs:71:58 @@ -56,7 +56,7 @@ error: generic parameters may not be used in const operations LL | struct Default3; | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/explicit_anon_consts.rs:30:27 @@ -64,7 +64,7 @@ error: generic parameters may not be used in const operations LL | let _3 = [(); const { N }]; | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/explicit_anon_consts.rs:35:26 @@ -72,7 +72,7 @@ error: generic parameters may not be used in const operations LL | let _6: [(); const { N }] = todo!(); | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/explicit_anon_consts.rs:13:41 @@ -80,7 +80,7 @@ error: generic parameters may not be used in const operations LL | type Adt3 = Foo; | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/explicit_anon_consts.rs:21:42 @@ -88,7 +88,7 @@ error: generic parameters may not be used in const operations LL | type Arr3 = [(); const { N }]; | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 13 previous errors diff --git a/tests/ui/const-generics/mgca/explicit_anon_consts_literals_hack.rs b/tests/ui/const-generics/mgca/explicit_anon_consts_literals_hack.rs index f5e07d1891f40..a38430b49f4fd 100644 --- a/tests/ui/const-generics/mgca/explicit_anon_consts_literals_hack.rs +++ b/tests/ui/const-generics/mgca/explicit_anon_consts_literals_hack.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(min_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, adt_const_params)] #![expect(incomplete_features)] trait Trait { diff --git a/tests/ui/const-generics/mgca/free-const-recursive.rs b/tests/ui/const-generics/mgca/free-const-recursive.rs index 3fdeb37aa5d5d..54e55772e1ef3 100644 --- a/tests/ui/const-generics/mgca/free-const-recursive.rs +++ b/tests/ui/const-generics/mgca/free-const-recursive.rs @@ -4,9 +4,9 @@ // Regression test for -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] -#![cfg_attr(gca, feature(generic_const_args))] +#![cfg_attr(gca, feature(gca_const_items))] use std::gca; diff --git a/tests/ui/const-generics/mgca/gca-macro-correct-rib.rs b/tests/ui/const-generics/mgca/gca-macro-correct-rib.rs index b03bbb7faacc3..b8ac0c86f51cb 100644 --- a/tests/ui/const-generics/mgca/gca-macro-correct-rib.rs +++ b/tests/ui/const-generics/mgca/gca-macro-correct-rib.rs @@ -1,5 +1,5 @@ //! make sure TyKind::GcaMacro resolves properly with the correct ribs and doesn't ICE -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/gca-macro-feature-gate.rs b/tests/ui/const-generics/mgca/gca-macro-feature-gate.rs index 1f4d302110490..324c0d417f1d5 100644 --- a/tests/ui/const-generics/mgca/gca-macro-feature-gate.rs +++ b/tests/ui/const-generics/mgca/gca-macro-feature-gate.rs @@ -1,5 +1,5 @@ fn foo(_: [(); std::gca!(N)]) {} -//~^ ERROR use of unstable library feature `min_generic_const_args` +//~^ ERROR use of unstable library feature `gca_min_const_items` //~| ERROR expected expression, found `gca!()` constant //~| ERROR generic parameters may not be used in const operations fn main() {} diff --git a/tests/ui/const-generics/mgca/gca-macro-feature-gate.stderr b/tests/ui/const-generics/mgca/gca-macro-feature-gate.stderr index 70586b9b288b4..2a9a4cb0fe23c 100644 --- a/tests/ui/const-generics/mgca/gca-macro-feature-gate.stderr +++ b/tests/ui/const-generics/mgca/gca-macro-feature-gate.stderr @@ -1,11 +1,11 @@ -error[E0658]: use of unstable library feature `min_generic_const_args` +error[E0658]: use of unstable library feature `gca_min_const_items` --> $DIR/gca-macro-feature-gate.rs:1:32 | LL | fn foo(_: [(); std::gca!(N)]) {} | ^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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: generic parameters may not be used in const operations @@ -16,7 +16,7 @@ LL | fn foo(_: [(); std::gca!(N)]) {} | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: expected expression, found `gca!()` constant --> $DIR/gca-macro-feature-gate.rs:1:32 diff --git a/tests/ui/const-generics/mgca/gca-macro-infer-as-type.rs b/tests/ui/const-generics/mgca/gca-macro-infer-as-type.rs index 155626ad9d47f..a234c3ad70fc0 100644 --- a/tests/ui/const-generics/mgca/gca-macro-infer-as-type.rs +++ b/tests/ui/const-generics/mgca/gca-macro-infer-as-type.rs @@ -1,6 +1,6 @@ //! `gca!(_)` used to be allowed to infer to a type as a compiler implementation quirk. Since it //! uses explicit const argument syntax, it is now rejected when passed as a type argument -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/gca-macro-multiple-exprs.rs b/tests/ui/const-generics/mgca/gca-macro-multiple-exprs.rs index 518fc63d68bb9..3ca7243c97a63 100644 --- a/tests/ui/const-generics/mgca/gca-macro-multiple-exprs.rs +++ b/tests/ui/const-generics/mgca/gca-macro-multiple-exprs.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; struct S; fn foo(_: S) {} diff --git a/tests/ui/const-generics/mgca/generic-args-on-enum-variant-segments-fail.rs b/tests/ui/const-generics/mgca/generic-args-on-enum-variant-segments-fail.rs index 4f71ad857cf5a..9642a066ad32b 100644 --- a/tests/ui/const-generics/mgca/generic-args-on-enum-variant-segments-fail.rs +++ b/tests/ui/const-generics/mgca/generic-args-on-enum-variant-segments-fail.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![feature(adt_const_params, unsized_const_params)] use std::gca; #[derive(PartialEq, Eq, std::marker::ConstParamTy)] diff --git a/tests/ui/const-generics/mgca/generic-args-on-enum-variant-segments.rs b/tests/ui/const-generics/mgca/generic-args-on-enum-variant-segments.rs index 94782da82f150..f89dd4b87f32a 100644 --- a/tests/ui/const-generics/mgca/generic-args-on-enum-variant-segments.rs +++ b/tests/ui/const-generics/mgca/generic-args-on-enum-variant-segments.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![feature(adt_const_params, unsized_const_params)] use std::gca; diff --git a/tests/ui/const-generics/mgca/generic_const_items-mismatched-array-len.rs b/tests/ui/const-generics/mgca/generic_const_items-mismatched-array-len.rs index fad1703e3bfee..009722fbe93a5 100644 --- a/tests/ui/const-generics/mgca/generic_const_items-mismatched-array-len.rs +++ b/tests/ui/const-generics/mgca/generic_const_items-mismatched-array-len.rs @@ -1,6 +1,6 @@ //! Regression test for #160553 (used to ICE) #![allow(incomplete_features)] -#![feature(adt_const_params, min_generic_const_args, macroless_generic_const_args)] +#![feature(adt_const_params, gca_min_const_items, gca_macroless_args)] #![feature(generic_const_parameter_types)] use std::gca; diff --git a/tests/ui/const-generics/mgca/generic_const_parameter_types-inferred-array-len.rs b/tests/ui/const-generics/mgca/generic_const_parameter_types-inferred-array-len.rs index eb32077dcfaca..075237a2094b5 100644 --- a/tests/ui/const-generics/mgca/generic_const_parameter_types-inferred-array-len.rs +++ b/tests/ui/const-generics/mgca/generic_const_parameter_types-inferred-array-len.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(min_adt_const_params, min_generic_const_args, generic_const_parameter_types)] +#![feature(min_adt_const_params, gca_min_const_items, generic_const_parameter_types)] use std::gca; diff --git a/tests/ui/const-generics/mgca/generic_const_type_mismatch.rs b/tests/ui/const-generics/mgca/generic_const_type_mismatch.rs index 55443874a36d1..aecd2b81b1c02 100644 --- a/tests/ui/const-generics/mgca/generic_const_type_mismatch.rs +++ b/tests/ui/const-generics/mgca/generic_const_type_mismatch.rs @@ -4,7 +4,7 @@ adt_const_params, generic_const_items, generic_const_parameter_types, - min_generic_const_args, + gca_min_const_items, const_param_ty_trait )] diff --git a/tests/ui/const-generics/mgca/higher-ranked-lts-bad.rs b/tests/ui/const-generics/mgca/higher-ranked-lts-bad.rs index 368644b641dff..15a565df39f9a 100644 --- a/tests/ui/const-generics/mgca/higher-ranked-lts-bad.rs +++ b/tests/ui/const-generics/mgca/higher-ranked-lts-bad.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] trait Trait {} diff --git a/tests/ui/const-generics/mgca/higher-ranked-lts-good.rs b/tests/ui/const-generics/mgca/higher-ranked-lts-good.rs index 5b455bb1e71e6..e6eef04cc8082 100644 --- a/tests/ui/const-generics/mgca/higher-ranked-lts-good.rs +++ b/tests/ui/const-generics/mgca/higher-ranked-lts-good.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] trait Trait {} diff --git a/tests/ui/const-generics/mgca/infer-vars-in-const-args-conflicting.rs b/tests/ui/const-generics/mgca/infer-vars-in-const-args-conflicting.rs index 7baf7c23cc42b..51f504ab141b6 100644 --- a/tests/ui/const-generics/mgca/infer-vars-in-const-args-conflicting.rs +++ b/tests/ui/const-generics/mgca/infer-vars-in-const-args-conflicting.rs @@ -6,8 +6,8 @@ #![allow(incomplete_features)] #![feature( adt_const_params, - min_generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_macroless_args, generic_const_parameter_types )] diff --git a/tests/ui/const-generics/mgca/infer-vars-in-const-args-correct.rs b/tests/ui/const-generics/mgca/infer-vars-in-const-args-correct.rs index dfa1ae436aa7a..b52bb74d9be90 100644 --- a/tests/ui/const-generics/mgca/infer-vars-in-const-args-correct.rs +++ b/tests/ui/const-generics/mgca/infer-vars-in-const-args-correct.rs @@ -9,8 +9,8 @@ #![allow(incomplete_features)] #![feature( adt_const_params, - min_generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_macroless_args, generic_const_parameter_types, unsized_const_params )] diff --git a/tests/ui/const-generics/mgca/inherent-alias-default.rs b/tests/ui/const-generics/mgca/inherent-alias-default.rs index 2ef400454a195..74f494ecf2496 100644 --- a/tests/ui/const-generics/mgca/inherent-alias-default.rs +++ b/tests/ui/const-generics/mgca/inherent-alias-default.rs @@ -3,7 +3,7 @@ //! the generic args are in Self format at that point, not in impl format, so the result can't be //! used with the Self-format args. However, it does not instantiate the result, it just does //! ensure_ok(). This test just makes sure that codepath is hit in tests. -#![feature(min_generic_const_args, inherent_associated_types)] +#![feature(gca_min_const_items, inherent_associated_types)] use std::gca; diff --git a/tests/ui/const-generics/mgca/inherent-const-gating.rs b/tests/ui/const-generics/mgca/inherent-const-gating.rs index f4328435dc578..5b1d458c65884 100644 --- a/tests/ui/const-generics/mgca/inherent-const-gating.rs +++ b/tests/ui/const-generics/mgca/inherent-const-gating.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![allow(incomplete_features)] struct S; diff --git a/tests/ui/const-generics/mgca/invalid-array-in-tuple.rs b/tests/ui/const-generics/mgca/invalid-array-in-tuple.rs index e22ccf3480650..69c45462fb011 100644 --- a/tests/ui/const-generics/mgca/invalid-array-in-tuple.rs +++ b/tests/ui/const-generics/mgca/invalid-array-in-tuple.rs @@ -1,7 +1,7 @@ #![feature( adt_const_params, - min_generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_macroless_args, unsized_const_params )] #![allow(incomplete_features)] diff --git a/tests/ui/const-generics/mgca/invalid-gca-macro-owner-issue-159172.rs b/tests/ui/const-generics/mgca/invalid-gca-macro-owner-issue-159172.rs index 0b0f30fd5b9fe..dd096a5d665cd 100644 --- a/tests/ui/const-generics/mgca/invalid-gca-macro-owner-issue-159172.rs +++ b/tests/ui/const-generics/mgca/invalid-gca-macro-owner-issue-159172.rs @@ -1,5 +1,5 @@ //@ revisions: ty expr -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/late-bound-param-lt-bad.rs b/tests/ui/const-generics/mgca/late-bound-param-lt-bad.rs index 5c57bdfb9024e..b7928a9a85ad4 100644 --- a/tests/ui/const-generics/mgca/late-bound-param-lt-bad.rs +++ b/tests/ui/const-generics/mgca/late-bound-param-lt-bad.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] trait Trait {} diff --git a/tests/ui/const-generics/mgca/macro-const-arg-infer.rs b/tests/ui/const-generics/mgca/macro-const-arg-infer.rs index 010b1c240e2a6..c5180fa596162 100644 --- a/tests/ui/const-generics/mgca/macro-const-arg-infer.rs +++ b/tests/ui/const-generics/mgca/macro-const-arg-infer.rs @@ -1,5 +1,5 @@ //! Regression test for https://github.com/rust-lang/rust/issues/153198 -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/missing_generic_params.rs b/tests/ui/const-generics/mgca/missing_generic_params.rs index 2c28b0f038e6a..c370f34228888 100644 --- a/tests/ui/const-generics/mgca/missing_generic_params.rs +++ b/tests/ui/const-generics/mgca/missing_generic_params.rs @@ -7,7 +7,7 @@ // is only possible within bodies. So a delayed // bug was generated with no error ever reported. -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![allow(incomplete_features)] trait Trait {} impl Trait for [(); N] {} diff --git a/tests/ui/const-generics/mgca/mixed-direct-anon-expression-diagnostics.rs b/tests/ui/const-generics/mgca/mixed-direct-anon-expression-diagnostics.rs index b4214f5f74e89..995f715984d54 100644 --- a/tests/ui/const-generics/mgca/mixed-direct-anon-expression-diagnostics.rs +++ b/tests/ui/const-generics/mgca/mixed-direct-anon-expression-diagnostics.rs @@ -2,7 +2,7 @@ //! things that must be an anon const, are currently less than ideal. This test merely asserts the //! current (bad) state of diagnostics, so we can track improvements over time. -#![feature(min_generic_const_args, min_adt_const_params)] +#![feature(gca_min_const_items, min_adt_const_params)] #![allow(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/mixed-direct-anon-expression-diagnostics.stderr b/tests/ui/const-generics/mgca/mixed-direct-anon-expression-diagnostics.stderr index 920143d33626f..4d5f071037f97 100644 --- a/tests/ui/const-generics/mgca/mixed-direct-anon-expression-diagnostics.stderr +++ b/tests/ui/const-generics/mgca/mixed-direct-anon-expression-diagnostics.stderr @@ -10,7 +10,7 @@ error: generic parameters may not be used in const operations LL | f::<{ (N, 1 + 1) }>(); | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 2 previous errors diff --git a/tests/ui/const-generics/mgca/multi_braced_gca_macro.rs b/tests/ui/const-generics/mgca/multi_braced_gca_macro.rs index ecf6bba056a1a..ff659659ece61 100644 --- a/tests/ui/const-generics/mgca/multi_braced_gca_macro.rs +++ b/tests/ui/const-generics/mgca/multi_braced_gca_macro.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![expect(incomplete_features)] struct Foo; diff --git a/tests/ui/const-generics/mgca/negated-literal.rs b/tests/ui/const-generics/mgca/negated-literal.rs index a7651822b0a83..4c23cc3f73f85 100644 --- a/tests/ui/const-generics/mgca/negated-literal.rs +++ b/tests/ui/const-generics/mgca/negated-literal.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(adt_const_params, min_generic_const_args)] +#![feature(adt_const_params, gca_min_const_items)] #![allow(incomplete_features)] use std::marker::ConstParamTy; diff --git a/tests/ui/const-generics/mgca/non-local-const-without-type_const.rs b/tests/ui/const-generics/mgca/non-local-const-without-type_const.rs index d136668b9f90f..4efceb48c4c3f 100644 --- a/tests/ui/const-generics/mgca/non-local-const-without-type_const.rs +++ b/tests/ui/const-generics/mgca/non-local-const-without-type_const.rs @@ -1,6 +1,6 @@ // Just a test of the error message (it's different for non-local consts) //@ aux-build:non_local_const.rs -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![allow(incomplete_features)] extern crate non_local_const; fn main() { diff --git a/tests/ui/const-generics/mgca/none-as-usize-const-arg.rs b/tests/ui/const-generics/mgca/none-as-usize-const-arg.rs index d691aaaa6cf88..5a0f61463d348 100644 --- a/tests/ui/const-generics/mgca/none-as-usize-const-arg.rs +++ b/tests/ui/const-generics/mgca/none-as-usize-const-arg.rs @@ -1,7 +1,7 @@ // Regression test for https://github.com/rust-lang/rust/issues/150969 #![feature(generic_const_exprs)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/nonsensical-negated-literal.rs b/tests/ui/const-generics/mgca/nonsensical-negated-literal.rs index 80833153bd469..c5f3a6caeb112 100644 --- a/tests/ui/const-generics/mgca/nonsensical-negated-literal.rs +++ b/tests/ui/const-generics/mgca/nonsensical-negated-literal.rs @@ -1,7 +1,7 @@ #![feature( adt_const_params, - min_generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_macroless_args, unsized_const_params )] #![expect(incomplete_features)] diff --git a/tests/ui/const-generics/mgca/opaque-ty-assoc-const-equality-117923.rs b/tests/ui/const-generics/mgca/opaque-ty-assoc-const-equality-117923.rs index 71112d632b5d8..bc8ae3f7b8b7a 100644 --- a/tests/ui/const-generics/mgca/opaque-ty-assoc-const-equality-117923.rs +++ b/tests/ui/const-generics/mgca/opaque-ty-assoc-const-equality-117923.rs @@ -1,6 +1,6 @@ //! Regression test for . //@ check-pass -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![allow(incomplete_features, dead_code)] use std::gca; diff --git a/tests/ui/const-generics/mgca/paren.rs b/tests/ui/const-generics/mgca/paren.rs index df60c06531755..18738c0f515fb 100644 --- a/tests/ui/const-generics/mgca/paren.rs +++ b/tests/ui/const-generics/mgca/paren.rs @@ -1,6 +1,6 @@ //@ check-pass //! See also: tests/ui/const-generics/paren.rs -#![feature(min_generic_const_args, generic_const_items)] +#![feature(gca_min_const_items, generic_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/printing_valtrees_supports_non_values.rs b/tests/ui/const-generics/mgca/printing_valtrees_supports_non_values.rs index 12a1feefeeac0..6888a45c3bd3f 100644 --- a/tests/ui/const-generics/mgca/printing_valtrees_supports_non_values.rs +++ b/tests/ui/const-generics/mgca/printing_valtrees_supports_non_values.rs @@ -2,7 +2,7 @@ //@ edition: 2024 #![allow(incomplete_features)] -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #[derive(Eq, PartialEq, core::marker::ConstParamTy)] struct Foo; diff --git a/tests/ui/const-generics/mgca/projection-const-recursive.rs b/tests/ui/const-generics/mgca/projection-const-recursive.rs index 4a4b0c918e80a..ec0bdffcce16a 100644 --- a/tests/ui/const-generics/mgca/projection-const-recursive.rs +++ b/tests/ui/const-generics/mgca/projection-const-recursive.rs @@ -3,7 +3,7 @@ // Regression test for -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/projection-error.rs b/tests/ui/const-generics/mgca/projection-error.rs index 656416d31a3e1..0c570b983da91 100644 --- a/tests/ui/const-generics/mgca/projection-error.rs +++ b/tests/ui/const-generics/mgca/projection-error.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] // Regression test for #140642. Test that normalizing const aliases diff --git a/tests/ui/const-generics/mgca/resolution-with-inherent-associated-types.rs b/tests/ui/const-generics/mgca/resolution-with-inherent-associated-types.rs index 60d6858e88b27..aeddc7322d2f3 100644 --- a/tests/ui/const-generics/mgca/resolution-with-inherent-associated-types.rs +++ b/tests/ui/const-generics/mgca/resolution-with-inherent-associated-types.rs @@ -4,7 +4,7 @@ //@compile-flags: --crate-type=lib #![expect(incomplete_features)] -#![feature(inherent_associated_types, min_generic_const_args, macroless_generic_const_args)] +#![feature(inherent_associated_types, gca_min_const_items, gca_macroless_args)] trait Trait {} struct Struct; diff --git a/tests/ui/const-generics/mgca/selftyalias-containing-param.rs b/tests/ui/const-generics/mgca/selftyalias-containing-param.rs index 5ab39799078fa..085a7fed0c7a2 100644 --- a/tests/ui/const-generics/mgca/selftyalias-containing-param.rs +++ b/tests/ui/const-generics/mgca/selftyalias-containing-param.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] struct S([(); N]); diff --git a/tests/ui/const-generics/mgca/selftyalias-containing-param.stderr b/tests/ui/const-generics/mgca/selftyalias-containing-param.stderr index 26e7b495b4406..9b1cc7d43d80a 100644 --- a/tests/ui/const-generics/mgca/selftyalias-containing-param.stderr +++ b/tests/ui/const-generics/mgca/selftyalias-containing-param.stderr @@ -9,7 +9,7 @@ note: not a concrete type | LL | impl S { | ^^^^ - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/mgca/selftyparam.rs b/tests/ui/const-generics/mgca/selftyparam.rs index 58433405b8ca0..21215d89e8aa3 100644 --- a/tests/ui/const-generics/mgca/selftyparam.rs +++ b/tests/ui/const-generics/mgca/selftyparam.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] trait Tr { diff --git a/tests/ui/const-generics/mgca/selftyparam.stderr b/tests/ui/const-generics/mgca/selftyparam.stderr index 11e23efb4a127..1235009465f89 100644 --- a/tests/ui/const-generics/mgca/selftyparam.stderr +++ b/tests/ui/const-generics/mgca/selftyparam.stderr @@ -4,7 +4,7 @@ error: generic parameters may not be used in const operations LL | fn foo() -> [(); const { let _: Self; 1 }]; | ^^^^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/mgca/serialized-direct-const-with-anon-const-body.rs b/tests/ui/const-generics/mgca/serialized-direct-const-with-anon-const-body.rs index 985e14fddb676..de742379f4afa 100644 --- a/tests/ui/const-generics/mgca/serialized-direct-const-with-anon-const-body.rs +++ b/tests/ui/const-generics/mgca/serialized-direct-const-with-anon-const-body.rs @@ -8,7 +8,7 @@ //! *another*, unrelated, anon const). This test checks that case, a directly-represented //! fake-anon-const directly containing another anon const. -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(incomplete_features)] extern crate anon_const_def_id_on_const_arg_with_anon; fn main() { diff --git a/tests/ui/const-generics/mgca/size-of-generic-ptr-in-array-len.rs b/tests/ui/const-generics/mgca/size-of-generic-ptr-in-array-len.rs index 706b880680fe2..9a4d4ca05be33 100644 --- a/tests/ui/const-generics/mgca/size-of-generic-ptr-in-array-len.rs +++ b/tests/ui/const-generics/mgca/size-of-generic-ptr-in-array-len.rs @@ -1,6 +1,6 @@ //! regression test for #![expect(incomplete_features)] -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] fn foo() { [0; size_of::<*mut T>()]; diff --git a/tests/ui/const-generics/mgca/size-of-generic-ptr-in-array-len.stderr b/tests/ui/const-generics/mgca/size-of-generic-ptr-in-array-len.stderr index e28cde6f63342..1abfff9518f44 100644 --- a/tests/ui/const-generics/mgca/size-of-generic-ptr-in-array-len.stderr +++ b/tests/ui/const-generics/mgca/size-of-generic-ptr-in-array-len.stderr @@ -16,7 +16,7 @@ error: generic parameters may not be used in const operations LL | [0; const { size_of::<*mut T>() }]; | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 3 previous errors diff --git a/tests/ui/const-generics/mgca/static-const-arg.rs b/tests/ui/const-generics/mgca/static-const-arg.rs index cc97267b4726e..db4518904dff5 100644 --- a/tests/ui/const-generics/mgca/static-const-arg.rs +++ b/tests/ui/const-generics/mgca/static-const-arg.rs @@ -1,8 +1,8 @@ // Regression test for #132986. -// FIXME(min_generic_const_args): using statics as direct const arguments should error instead of +// FIXME(gca_min_const_items): using statics as direct const arguments should error instead of // ICEing until const eval can evaluate statics to valtrees for const generics. -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/struct-ctor-in-array-len.rs b/tests/ui/const-generics/mgca/struct-ctor-in-array-len.rs index e8f4a806e3847..8d3392ea04880 100644 --- a/tests/ui/const-generics/mgca/struct-ctor-in-array-len.rs +++ b/tests/ui/const-generics/mgca/struct-ctor-in-array-len.rs @@ -1,11 +1,11 @@ // Regression test for https://github.com/rust-lang/rust/issues/141738 // // Using a struct constructor as an array repeat count with -// `min_generic_const_args` used to ICE with "unexpected `DefKind` +// `gca_min_const_items` used to ICE with "unexpected `DefKind` // for const alias to resolve to: Ctor(Struct, Const)". // It should now produce a proper type error. -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] struct S; diff --git a/tests/ui/const-generics/mgca/struct_expr_with_macros.rs b/tests/ui/const-generics/mgca/struct_expr_with_macros.rs index b59a730664888..22763dc1b8528 100644 --- a/tests/ui/const-generics/mgca/struct_expr_with_macros.rs +++ b/tests/ui/const-generics/mgca/struct_expr_with_macros.rs @@ -3,7 +3,7 @@ // Test that the def collector makes `AnonConst`s not `InlineConst`s even // when the const block is obscured via macros. -#![feature(min_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, adt_const_params)] #![expect(incomplete_features)] macro_rules! const_block { diff --git a/tests/ui/const-generics/mgca/suggest-direct-const.fixed b/tests/ui/const-generics/mgca/suggest-direct-const.fixed index 044d875f1b4bb..871e76da217cf 100644 --- a/tests/ui/const-generics/mgca/suggest-direct-const.fixed +++ b/tests/ui/const-generics/mgca/suggest-direct-const.fixed @@ -1,6 +1,6 @@ //! Regression test for //@ run-rustfix -#![feature(min_generic_const_args, inherent_associated_types)] +#![feature(gca_min_const_items, inherent_associated_types)] #![allow(dead_code)] mod impl_item { diff --git a/tests/ui/const-generics/mgca/suggest-direct-const.rs b/tests/ui/const-generics/mgca/suggest-direct-const.rs index e4f394e9c18bd..09abdcc7a713d 100644 --- a/tests/ui/const-generics/mgca/suggest-direct-const.rs +++ b/tests/ui/const-generics/mgca/suggest-direct-const.rs @@ -1,6 +1,6 @@ //! Regression test for //@ run-rustfix -#![feature(min_generic_const_args, inherent_associated_types)] +#![feature(gca_min_const_items, inherent_associated_types)] #![allow(dead_code)] mod impl_item { diff --git a/tests/ui/const-generics/mgca/syntactic-type-mismatch.rs b/tests/ui/const-generics/mgca/syntactic-type-mismatch.rs index bb0349ccb604a..f14309f7492f4 100644 --- a/tests/ui/const-generics/mgca/syntactic-type-mismatch.rs +++ b/tests/ui/const-generics/mgca/syntactic-type-mismatch.rs @@ -1,7 +1,7 @@ // This test ensures proper diagnostics emission during HIR ty lowering // See https://github.com/rust-lang/rust/issues/153254 -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/synth-gen-arg-ice-158152.rs b/tests/ui/const-generics/mgca/synth-gen-arg-ice-158152.rs index 62be08195bb2c..e9b4da9eeaa4b 100644 --- a/tests/ui/const-generics/mgca/synth-gen-arg-ice-158152.rs +++ b/tests/ui/const-generics/mgca/synth-gen-arg-ice-158152.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] trait A {} trait Trait {} diff --git a/tests/ui/const-generics/mgca/trait-assoc-fn-as-const-arg.rs b/tests/ui/const-generics/mgca/trait-assoc-fn-as-const-arg.rs index 167f60bf1bbf6..907394cc37769 100644 --- a/tests/ui/const-generics/mgca/trait-assoc-fn-as-const-arg.rs +++ b/tests/ui/const-generics/mgca/trait-assoc-fn-as-const-arg.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] // Regression test for #138088. trait Bar { diff --git a/tests/ui/const-generics/mgca/tuple_ctor_arg_simple.rs b/tests/ui/const-generics/mgca/tuple_ctor_arg_simple.rs index c769ea0dc4d01..da66ce8195d0f 100644 --- a/tests/ui/const-generics/mgca/tuple_ctor_arg_simple.rs +++ b/tests/ui/const-generics/mgca/tuple_ctor_arg_simple.rs @@ -1,5 +1,5 @@ //@ run-pass -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![expect(incomplete_features)] #![allow(dead_code)] diff --git a/tests/ui/const-generics/mgca/tuple_ctor_complex_args.rs b/tests/ui/const-generics/mgca/tuple_ctor_complex_args.rs index bd9d77eee3a85..42ebe44172b05 100644 --- a/tests/ui/const-generics/mgca/tuple_ctor_complex_args.rs +++ b/tests/ui/const-generics/mgca/tuple_ctor_complex_args.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/tuple_ctor_complex_args.stderr b/tests/ui/const-generics/mgca/tuple_ctor_complex_args.stderr index 481afef0ee4e4..925572c27cb0b 100644 --- a/tests/ui/const-generics/mgca/tuple_ctor_complex_args.stderr +++ b/tests/ui/const-generics/mgca/tuple_ctor_complex_args.stderr @@ -10,7 +10,7 @@ error: generic parameters may not be used in const operations LL | with_point::<{ Point(const { N + 1 }, N) }>(); | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 2 previous errors diff --git a/tests/ui/const-generics/mgca/tuple_ctor_erroneous.rs b/tests/ui/const-generics/mgca/tuple_ctor_erroneous.rs index abe225e3f9291..db158f3f38b00 100644 --- a/tests/ui/const-generics/mgca/tuple_ctor_erroneous.rs +++ b/tests/ui/const-generics/mgca/tuple_ctor_erroneous.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/tuple_ctor_in_array_len.rs b/tests/ui/const-generics/mgca/tuple_ctor_in_array_len.rs index 9d4067c08ba18..2f2b2229cf8c5 100644 --- a/tests/ui/const-generics/mgca/tuple_ctor_in_array_len.rs +++ b/tests/ui/const-generics/mgca/tuple_ctor_in_array_len.rs @@ -1,6 +1,6 @@ //! Regression test for -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![expect(incomplete_features)] pub struct S(); diff --git a/tests/ui/const-generics/mgca/tuple_ctor_nested.rs b/tests/ui/const-generics/mgca/tuple_ctor_nested.rs index 97c5b294798a4..096f56d9512a8 100644 --- a/tests/ui/const-generics/mgca/tuple_ctor_nested.rs +++ b/tests/ui/const-generics/mgca/tuple_ctor_nested.rs @@ -1,5 +1,5 @@ //@ run-pass -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![expect(incomplete_features)] use std::marker::ConstParamTy; diff --git a/tests/ui/const-generics/mgca/tuple_ctor_type_relative.rs b/tests/ui/const-generics/mgca/tuple_ctor_type_relative.rs index 4593780c14219..6a5c28bca6898 100644 --- a/tests/ui/const-generics/mgca/tuple_ctor_type_relative.rs +++ b/tests/ui/const-generics/mgca/tuple_ctor_type_relative.rs @@ -1,5 +1,5 @@ //@ run-pass -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![expect(incomplete_features)] use std::marker::ConstParamTy; diff --git a/tests/ui/const-generics/mgca/tuple_expr_arg_bad-issue-151048.rs b/tests/ui/const-generics/mgca/tuple_expr_arg_bad-issue-151048.rs index 3f221db5d6ec5..50abdd97e908f 100644 --- a/tests/ui/const-generics/mgca/tuple_expr_arg_bad-issue-151048.rs +++ b/tests/ui/const-generics/mgca/tuple_expr_arg_bad-issue-151048.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![expect(incomplete_features)] struct Y { diff --git a/tests/ui/const-generics/mgca/tuple_expr_arg_complex.rs b/tests/ui/const-generics/mgca/tuple_expr_arg_complex.rs index ea0edad9e673f..2b39a8b585faf 100644 --- a/tests/ui/const-generics/mgca/tuple_expr_arg_complex.rs +++ b/tests/ui/const-generics/mgca/tuple_expr_arg_complex.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, adt_const_params, unsized_const_params)] +#![feature(gca_min_const_items, adt_const_params, unsized_const_params)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/tuple_expr_arg_complex.stderr b/tests/ui/const-generics/mgca/tuple_expr_arg_complex.stderr index 045b9dd790919..e6f004b2f9d68 100644 --- a/tests/ui/const-generics/mgca/tuple_expr_arg_complex.stderr +++ b/tests/ui/const-generics/mgca/tuple_expr_arg_complex.stderr @@ -22,7 +22,7 @@ error: generic parameters may not be used in const operations LL | takes_nested_tuple::<{ gca!((N, (N, const { N + 1 }))) }>(); | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 4 previous errors diff --git a/tests/ui/const-generics/mgca/tuple_expr_arg_macroless.rs b/tests/ui/const-generics/mgca/tuple_expr_arg_macroless.rs index e684e34792070..2b67665d7281b 100644 --- a/tests/ui/const-generics/mgca/tuple_expr_arg_macroless.rs +++ b/tests/ui/const-generics/mgca/tuple_expr_arg_macroless.rs @@ -1,8 +1,8 @@ //@ check-pass #![feature( - min_generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_macroless_args, adt_const_params, unsized_const_params )] diff --git a/tests/ui/const-generics/mgca/tuple_expr_arg_mismatch_type.rs b/tests/ui/const-generics/mgca/tuple_expr_arg_mismatch_type.rs index 87accb01c2912..780b757c0df1c 100644 --- a/tests/ui/const-generics/mgca/tuple_expr_arg_mismatch_type.rs +++ b/tests/ui/const-generics/mgca/tuple_expr_arg_mismatch_type.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![expect(incomplete_features)] pub fn takes_nested_tuple() { diff --git a/tests/ui/const-generics/mgca/tuple_expr_arg_simple.rs b/tests/ui/const-generics/mgca/tuple_expr_arg_simple.rs index b4e664e1ca680..8c4f64adf34dc 100644 --- a/tests/ui/const-generics/mgca/tuple_expr_arg_simple.rs +++ b/tests/ui/const-generics/mgca/tuple_expr_arg_simple.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(min_generic_const_args, adt_const_params, unsized_const_params)] +#![feature(gca_min_const_items, adt_const_params, unsized_const_params)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/tuple_expr_arg_unbounded_assoc_const.rs b/tests/ui/const-generics/mgca/tuple_expr_arg_unbounded_assoc_const.rs index 753185b35f0b3..7d8a1a1264bd9 100644 --- a/tests/ui/const-generics/mgca/tuple_expr_arg_unbounded_assoc_const.rs +++ b/tests/ui/const-generics/mgca/tuple_expr_arg_unbounded_assoc_const.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] // Regression test for an ICE in privacy checking while walking the `T` qself // of `T::ASSOC` inside a tuple const argument. diff --git a/tests/ui/const-generics/mgca/tuple_expr_type_mismatch.rs b/tests/ui/const-generics/mgca/tuple_expr_type_mismatch.rs index 95b0d836e53fc..e67a5a0a72e54 100644 --- a/tests/ui/const-generics/mgca/tuple_expr_type_mismatch.rs +++ b/tests/ui/const-generics/mgca/tuple_expr_type_mismatch.rs @@ -2,8 +2,8 @@ #![expect(incomplete_features)] #![feature( adt_const_params, - min_generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_macroless_args, unsized_const_params )] fn foo() {} diff --git a/tests/ui/const-generics/mgca/type-const-assoc-const-without-body.rs b/tests/ui/const-generics/mgca/type-const-assoc-const-without-body.rs index d41110e594514..2b178dd7304e1 100644 --- a/tests/ui/const-generics/mgca/type-const-assoc-const-without-body.rs +++ b/tests/ui/const-generics/mgca/type-const-assoc-const-without-body.rs @@ -1,6 +1,6 @@ //@ needs-rustc-debug-assertions -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type-const-associated-default.rs b/tests/ui/const-generics/mgca/type-const-associated-default.rs index f2591248269cc..4f3742450dbdc 100644 --- a/tests/ui/const-generics/mgca/type-const-associated-default.rs +++ b/tests/ui/const-generics/mgca/type-const-associated-default.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] use std::gca; trait Trait { diff --git a/tests/ui/const-generics/mgca/type-const-ctor-148953.rs b/tests/ui/const-generics/mgca/type-const-ctor-148953.rs index 774cab562cb61..67d1b765a9b9a 100644 --- a/tests/ui/const-generics/mgca/type-const-ctor-148953.rs +++ b/tests/ui/const-generics/mgca/type-const-ctor-148953.rs @@ -7,7 +7,7 @@ //@ check-pass -#![feature(min_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, adt_const_params)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type-const-free-anon-const-mismatch.rs b/tests/ui/const-generics/mgca/type-const-free-anon-const-mismatch.rs index 3b76abd2edc3c..79e05a7cdbc1b 100644 --- a/tests/ui/const-generics/mgca/type-const-free-anon-const-mismatch.rs +++ b/tests/ui/const-generics/mgca/type-const-free-anon-const-mismatch.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Zvalidate-mir -Znext-solver -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type-const-free-value-type-mismatch.rs b/tests/ui/const-generics/mgca/type-const-free-value-type-mismatch.rs index f49ac09ea3fcc..4338cae6e14a2 100644 --- a/tests/ui/const-generics/mgca/type-const-free-value-type-mismatch.rs +++ b/tests/ui/const-generics/mgca/type-const-free-value-type-mismatch.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) diff --git a/tests/ui/const-generics/mgca/type-const-free-value-used-in-body.rs b/tests/ui/const-generics/mgca/type-const-free-value-used-in-body.rs index 509bf3debc878..46523341928a2 100644 --- a/tests/ui/const-generics/mgca/type-const-free-value-used-in-body.rs +++ b/tests/ui/const-generics/mgca/type-const-free-value-used-in-body.rs @@ -1,6 +1,6 @@ // Regression test for https://github.com/rust-lang/rust/issues/154748 and https://github.com/rust-lang/rust/issues/154750 -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] //@ compile-flags: --emit=mir diff --git a/tests/ui/const-generics/mgca/type-const-inherent-assoc-const-without-body.rs b/tests/ui/const-generics/mgca/type-const-inherent-assoc-const-without-body.rs index 0b83889ec764d..1f33de65a690f 100644 --- a/tests/ui/const-generics/mgca/type-const-inherent-assoc-const-without-body.rs +++ b/tests/ui/const-generics/mgca/type-const-inherent-assoc-const-without-body.rs @@ -1,6 +1,6 @@ //@ needs-rustc-debug-assertions -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] impl S { //~ ERROR cannot find type `S` in this scope diff --git a/tests/ui/const-generics/mgca/type-const-inherent-value-type-mismatch.rs b/tests/ui/const-generics/mgca/type-const-inherent-value-type-mismatch.rs index 3a0fdd6bfd0ea..d772f36cd12fe 100644 --- a/tests/ui/const-generics/mgca/type-const-inherent-value-type-mismatch.rs +++ b/tests/ui/const-generics/mgca/type-const-inherent-value-type-mismatch.rs @@ -5,7 +5,7 @@ //@[next] compile-flags: -Znext-solver //@ compile-flags: -Zvalidate-mir -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type-const-suggestion.rs b/tests/ui/const-generics/mgca/type-const-suggestion.rs index 036d16b0e529d..64e8f04411cb2 100644 --- a/tests/ui/const-generics/mgca/type-const-suggestion.rs +++ b/tests/ui/const-generics/mgca/type-const-suggestion.rs @@ -1,6 +1,6 @@ //! Regression test for . -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] trait Trait { #[rustc_always_gca] diff --git a/tests/ui/const-generics/mgca/type-const-used-in-trait.rs b/tests/ui/const-generics/mgca/type-const-used-in-trait.rs index 1f921960710c5..1d2edb8bc730b 100644 --- a/tests/ui/const-generics/mgca/type-const-used-in-trait.rs +++ b/tests/ui/const-generics/mgca/type-const-used-in-trait.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type-const-value-type-mismatch.rs b/tests/ui/const-generics/mgca/type-const-value-type-mismatch.rs index 0a9f90e90de7f..b81f672190c6f 100644 --- a/tests/ui/const-generics/mgca/type-const-value-type-mismatch.rs +++ b/tests/ui/const-generics/mgca/type-const-value-type-mismatch.rs @@ -5,7 +5,7 @@ //@[next] compile-flags: -Znext-solver //@ compile-flags: -Zvalidate-mir -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_as_const_in_array_len.rs b/tests/ui/const-generics/mgca/type_as_const_in_array_len.rs index 398bcb16aa621..1c4a15a1880e5 100644 --- a/tests/ui/const-generics/mgca/type_as_const_in_array_len.rs +++ b/tests/ui/const-generics/mgca/type_as_const_in_array_len.rs @@ -1,6 +1,6 @@ //! Regression test for -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] #![expect(incomplete_features)] struct B(Box<[u8; C]>); diff --git a/tests/ui/const-generics/mgca/type_const-adt-expr-missing-field.rs b/tests/ui/const-generics/mgca/type_const-adt-expr-missing-field.rs index 421b6b4cb5993..46c661cfb96ce 100644 --- a/tests/ui/const-generics/mgca/type_const-adt-expr-missing-field.rs +++ b/tests/ui/const-generics/mgca/type_const-adt-expr-missing-field.rs @@ -1,8 +1,8 @@ // Regression test for https://github.com/rust-lang/rust/issues/154632 #![feature(generic_const_exprs)] -#![feature(min_generic_const_args)] -#![feature(macroless_generic_const_args)] +#![feature(gca_min_const_items)] +#![feature(gca_macroless_args)] #![feature(generic_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-array-return.rs b/tests/ui/const-generics/mgca/type_const-array-return.rs index ed27f0df8599b..384b06a3479b6 100644 --- a/tests/ui/const-generics/mgca/type_const-array-return.rs +++ b/tests/ui/const-generics/mgca/type_const-array-return.rs @@ -1,7 +1,7 @@ //@ check-pass // This test should compile without an ICE. #![expect(incomplete_features)] -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-generic-param-in-type.rs b/tests/ui/const-generics/mgca/type_const-generic-param-in-type.rs index d8c1627858257..80293325d8800 100644 --- a/tests/ui/const-generics/mgca/type_const-generic-param-in-type.rs +++ b/tests/ui/const-generics/mgca/type_const-generic-param-in-type.rs @@ -1,7 +1,7 @@ //@ revisions: nogate gate //@ [gate] check-pass #![expect(incomplete_features)] -#![feature(adt_const_params, unsized_const_params, min_generic_const_args, generic_const_items)] +#![feature(adt_const_params, unsized_const_params, gca_min_const_items, generic_const_items)] #![cfg_attr(gate, feature(generic_const_parameter_types))] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-incemental-compile.rs b/tests/ui/const-generics/mgca/type_const-incemental-compile.rs index 7f82050044fad..80fd1e69a8e6c 100644 --- a/tests/ui/const-generics/mgca/type_const-incemental-compile.rs +++ b/tests/ui/const-generics/mgca/type_const-incemental-compile.rs @@ -4,7 +4,7 @@ // This lead to collector.rs to try and evaluate a type_const // which will fail since they do not have bodies. #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-inherent-const-omitted-type.rs b/tests/ui/const-generics/mgca/type_const-inherent-const-omitted-type.rs index 32d052204ee27..16c5006b09ee1 100644 --- a/tests/ui/const-generics/mgca/type_const-inherent-const-omitted-type.rs +++ b/tests/ui/const-generics/mgca/type_const-inherent-const-omitted-type.rs @@ -1,5 +1,5 @@ #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-mismatched-type-incremental.rs b/tests/ui/const-generics/mgca/type_const-mismatched-type-incremental.rs index 620c49cc6fe0f..b1b2b02290c72 100644 --- a/tests/ui/const-generics/mgca/type_const-mismatched-type-incremental.rs +++ b/tests/ui/const-generics/mgca/type_const-mismatched-type-incremental.rs @@ -1,7 +1,7 @@ //! Regression test for //! //@ incremental -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-mismatched-types.rs b/tests/ui/const-generics/mgca/type_const-mismatched-types.rs index d4169868903b2..74ebd058bc2e5 100644 --- a/tests/ui/const-generics/mgca/type_const-mismatched-types.rs +++ b/tests/ui/const-generics/mgca/type_const-mismatched-types.rs @@ -1,5 +1,5 @@ #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-not-constparamty.rs b/tests/ui/const-generics/mgca/type_const-not-constparamty.rs index bc26ee967f573..0df41ed571ff3 100644 --- a/tests/ui/const-generics/mgca/type_const-not-constparamty.rs +++ b/tests/ui/const-generics/mgca/type_const-not-constparamty.rs @@ -1,5 +1,5 @@ #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-on-generic-expr.rs b/tests/ui/const-generics/mgca/type_const-on-generic-expr.rs index ce6ca6cf01bf0..80b687c3f1ff6 100644 --- a/tests/ui/const-generics/mgca/type_const-on-generic-expr.rs +++ b/tests/ui/const-generics/mgca/type_const-on-generic-expr.rs @@ -1,5 +1,5 @@ #![expect(incomplete_features)] -#![feature(min_generic_const_args, generic_const_items)] +#![feature(gca_min_const_items, generic_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-on-generic-expr.stderr b/tests/ui/const-generics/mgca/type_const-on-generic-expr.stderr index 545675ead06a5..290c2da0007a9 100644 --- a/tests/ui/const-generics/mgca/type_const-on-generic-expr.stderr +++ b/tests/ui/const-generics/mgca/type_const-on-generic-expr.stderr @@ -4,7 +4,7 @@ error: generic parameters may not be used in const operations LL | const FREE1: usize = gca!(const { std::mem::size_of::() }); | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/type_const-on-generic-expr.rs:9:51 @@ -12,7 +12,7 @@ error: generic parameters may not be used in const operations LL | const FREE2: usize = gca!(const { I + 1 }); | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 2 previous errors diff --git a/tests/ui/const-generics/mgca/type_const-on-generic_expr-2.rs b/tests/ui/const-generics/mgca/type_const-on-generic_expr-2.rs index 59898c76f4e78..905d180d2d568 100644 --- a/tests/ui/const-generics/mgca/type_const-on-generic_expr-2.rs +++ b/tests/ui/const-generics/mgca/type_const-on-generic_expr-2.rs @@ -1,5 +1,5 @@ #![expect(incomplete_features)] -#![feature(min_generic_const_args, generic_const_items)] +#![feature(gca_min_const_items, generic_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-on-generic_expr-2.stderr b/tests/ui/const-generics/mgca/type_const-on-generic_expr-2.stderr index 4eb207e110fdb..a1bb1578afa4c 100644 --- a/tests/ui/const-generics/mgca/type_const-on-generic_expr-2.stderr +++ b/tests/ui/const-generics/mgca/type_const-on-generic_expr-2.stderr @@ -4,7 +4,7 @@ error: generic parameters may not be used in const operations LL | const N1: usize = gca!(const { std::mem::size_of::() }); | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/type_const-on-generic_expr-2.rs:20:52 @@ -12,7 +12,7 @@ error: generic parameters may not be used in const operations LL | const N2: usize = gca!(const { I + 1 }); | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/type_const-on-generic_expr-2.rs:22:40 @@ -20,7 +20,7 @@ error: generic parameters may not be used in const operations LL | const N3: usize = gca!(const { 2 & X }); | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 3 previous errors diff --git a/tests/ui/const-generics/mgca/type_const-only-in-impl-omitted-type.rs b/tests/ui/const-generics/mgca/type_const-only-in-impl-omitted-type.rs index 5a716807fc3e4..395c7356b73b1 100644 --- a/tests/ui/const-generics/mgca/type_const-only-in-impl-omitted-type.rs +++ b/tests/ui/const-generics/mgca/type_const-only-in-impl-omitted-type.rs @@ -1,5 +1,5 @@ #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-only-in-impl.rs b/tests/ui/const-generics/mgca/type_const-only-in-impl.rs index f536e810348d8..4f728466f0016 100644 --- a/tests/ui/const-generics/mgca/type_const-only-in-impl.rs +++ b/tests/ui/const-generics/mgca/type_const-only-in-impl.rs @@ -1,5 +1,5 @@ #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-only-in-trait.rs b/tests/ui/const-generics/mgca/type_const-only-in-trait.rs index 687adf8371272..ecd4a2ad9acc9 100644 --- a/tests/ui/const-generics/mgca/type_const-only-in-trait.rs +++ b/tests/ui/const-generics/mgca/type_const-only-in-trait.rs @@ -1,5 +1,5 @@ #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-pub.rs b/tests/ui/const-generics/mgca/type_const-pub.rs index 9499e7e952384..d58d22a2d90e7 100644 --- a/tests/ui/const-generics/mgca/type_const-pub.rs +++ b/tests/ui/const-generics/mgca/type_const-pub.rs @@ -3,7 +3,7 @@ // This is because reachability also tried to evaluate the #[type_const] which // requires the item have a body. #[type_const] do not have bodies. #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-recursive.rs b/tests/ui/const-generics/mgca/type_const-recursive.rs index c7178da8f437c..0c3e1563f401e 100644 --- a/tests/ui/const-generics/mgca/type_const-recursive.rs +++ b/tests/ui/const-generics/mgca/type_const-recursive.rs @@ -1,5 +1,5 @@ #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const-use.rs b/tests/ui/const-generics/mgca/type_const-use.rs index e8900e0d4e69e..4b03442210aa1 100644 --- a/tests/ui/const-generics/mgca/type_const-use.rs +++ b/tests/ui/const-generics/mgca/type_const-use.rs @@ -1,7 +1,7 @@ //@ check-pass // This test should compile without an ICE. #![expect(incomplete_features)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/const-generics/mgca/type_const_in_pattern.rs b/tests/ui/const-generics/mgca/type_const_in_pattern.rs index 52d824343c2a6..57ad683978c80 100644 --- a/tests/ui/const-generics/mgca/type_const_in_pattern.rs +++ b/tests/ui/const-generics/mgca/type_const_in_pattern.rs @@ -1,5 +1,5 @@ //@ check-pass -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/const-generics/mgca/type_const_in_pattern_too_generic.rs b/tests/ui/const-generics/mgca/type_const_in_pattern_too_generic.rs index 891e627780d4e..7e5437f7f902c 100644 --- a/tests/ui/const-generics/mgca/type_const_in_pattern_too_generic.rs +++ b/tests/ui/const-generics/mgca/type_const_in_pattern_too_generic.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] trait Trait { diff --git a/tests/ui/const-generics/mgca/unbraced_const_block_const_arg_gated.rs b/tests/ui/const-generics/mgca/unbraced_const_block_const_arg_gated.rs index 9e6370c485a0b..ea884f0d81623 100644 --- a/tests/ui/const-generics/mgca/unbraced_const_block_const_arg_gated.rs +++ b/tests/ui/const-generics/mgca/unbraced_const_block_const_arg_gated.rs @@ -35,7 +35,7 @@ fn generic() { const NON_TYPE_CONST: usize = const { 1 }; const TYPE_CONST: usize = gca!(const { 1 }); -//~^ ERROR: use of unstable library feature `min_generic_const_args` [E0658] +//~^ ERROR: use of unstable library feature `gca_min_const_items` [E0658] //~| ERROR: expected expression, found `gca!()` constant static STATIC: usize = const { 1 }; diff --git a/tests/ui/const-generics/mgca/unbraced_const_block_const_arg_gated.stderr b/tests/ui/const-generics/mgca/unbraced_const_block_const_arg_gated.stderr index 8467c3abdc942..162e54ad08264 100644 --- a/tests/ui/const-generics/mgca/unbraced_const_block_const_arg_gated.stderr +++ b/tests/ui/const-generics/mgca/unbraced_const_block_const_arg_gated.stderr @@ -1,11 +1,11 @@ -error[E0658]: use of unstable library feature `min_generic_const_args` +error[E0658]: use of unstable library feature `gca_min_const_items` --> $DIR/unbraced_const_block_const_arg_gated.rs:37:27 | LL | const TYPE_CONST: usize = gca!(const { 1 }); | ^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: unbraced const blocks as const args are experimental @@ -15,7 +15,7 @@ LL | const PARAM_TY: Inner, | ^^^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: unbraced const blocks as const args are experimental @@ -25,7 +25,7 @@ LL | const DEFAULT: usize = const { 1 }, | ^^^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: unbraced const blocks as const args are experimental @@ -35,7 +35,7 @@ LL | type NormalTy = Inner; | ^^^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: unbraced const blocks as const args are experimental @@ -45,7 +45,7 @@ LL | let _: Inner; | ^^^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: unbraced const blocks as const args are experimental @@ -55,7 +55,7 @@ LL | generic::(); | ^^^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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: expected expression, found `gca!()` constant diff --git a/tests/ui/const-generics/mgca/unconstrained-type-params.rs b/tests/ui/const-generics/mgca/unconstrained-type-params.rs index 7b9688f53818f..f5c64d981ae3a 100644 --- a/tests/ui/const-generics/mgca/unconstrained-type-params.rs +++ b/tests/ui/const-generics/mgca/unconstrained-type-params.rs @@ -1,6 +1,6 @@ //! Regression test for https://github.com/rust-lang/rust/issues/146906 -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] trait Trait {} diff --git a/tests/ui/const-generics/mgca/unexpected-fn-item-in-array.rs b/tests/ui/const-generics/mgca/unexpected-fn-item-in-array.rs index 6260607d8a711..6cc57c7939240 100644 --- a/tests/ui/const-generics/mgca/unexpected-fn-item-in-array.rs +++ b/tests/ui/const-generics/mgca/unexpected-fn-item-in-array.rs @@ -1,6 +1,6 @@ // Make sure we don't ICE when encountering an fn item during lowering in mGCA. -#![feature(min_generic_const_args, macroless_generic_const_args)] +#![feature(gca_min_const_items, gca_macroless_args)] trait A {} diff --git a/tests/ui/const-generics/mgca/unexpected-type-for-constructor.rs b/tests/ui/const-generics/mgca/unexpected-type-for-constructor.rs index 2cf96ac5359dd..fc8ad6067918d 100644 --- a/tests/ui/const-generics/mgca/unexpected-type-for-constructor.rs +++ b/tests/ui/const-generics/mgca/unexpected-type-for-constructor.rs @@ -2,8 +2,8 @@ //@ compile-flags: -Znext-solver=globally //@ check-fail -#![feature(macroless_generic_const_args)] -#![feature(generic_const_args, min_generic_const_args)] +#![feature(gca_macroless_args)] +#![feature(gca_const_items, gca_min_const_items)] const C_INNER: (*const u8, u8) = (None::, None::); //~^ ERROR mismatched types //~| ERROR mismatched types diff --git a/tests/ui/const-generics/mgca/unmarked-free-const.rs b/tests/ui/const-generics/mgca/unmarked-free-const.rs index 04cf63b71ed07..e22470642889c 100644 --- a/tests/ui/const-generics/mgca/unmarked-free-const.rs +++ b/tests/ui/const-generics/mgca/unmarked-free-const.rs @@ -1,6 +1,6 @@ // regression test, used to ICE -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/mgca/unused_speculative_def_id.rs b/tests/ui/const-generics/mgca/unused_speculative_def_id.rs index e617daba24b68..442682e442fdf 100644 --- a/tests/ui/const-generics/mgca/unused_speculative_def_id.rs +++ b/tests/ui/const-generics/mgca/unused_speculative_def_id.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, generic_const_exprs, generic_const_items)] +#![feature(gca_min_const_items, generic_const_exprs, generic_const_items)] #![expect(incomplete_features)] // Previously we would create a `DefId` to represent the const argument to `A` diff --git a/tests/ui/const-generics/mgca/valtree-leaf-const.rs b/tests/ui/const-generics/mgca/valtree-leaf-const.rs index e372e89fe5e50..7760c622539df 100644 --- a/tests/ui/const-generics/mgca/valtree-leaf-const.rs +++ b/tests/ui/const-generics/mgca/valtree-leaf-const.rs @@ -1,8 +1,8 @@ //@ compile-flags: -Znext-solver -#![feature(macroless_generic_const_args)] -#![feature(generic_const_args)] -#![feature(min_generic_const_args)] +#![feature(gca_macroless_args)] +#![feature(gca_const_items)] +#![feature(gca_min_const_items)] const TUPLE: (&'static str, &'static str) = ("a", true); //~^ ERROR mismatched type diff --git a/tests/ui/const-generics/mgca/wrapped_array_elem_type_mismatch.rs b/tests/ui/const-generics/mgca/wrapped_array_elem_type_mismatch.rs index c2414b0fb8648..a80f602fbf96a 100644 --- a/tests/ui/const-generics/mgca/wrapped_array_elem_type_mismatch.rs +++ b/tests/ui/const-generics/mgca/wrapped_array_elem_type_mismatch.rs @@ -1,5 +1,5 @@ #![expect(incomplete_features)] -#![feature(adt_const_params, min_generic_const_args, macroless_generic_const_args)] +#![feature(adt_const_params, gca_min_const_items, gca_macroless_args)] struct ArrWrap; diff --git a/tests/ui/const-generics/mgca/wrong_type_const_arr_diag.rs b/tests/ui/const-generics/mgca/wrong_type_const_arr_diag.rs index d0b6aa5dfab5a..f5d3c06d7bc8e 100644 --- a/tests/ui/const-generics/mgca/wrong_type_const_arr_diag.rs +++ b/tests/ui/const-generics/mgca/wrong_type_const_arr_diag.rs @@ -1,6 +1,6 @@ // This test causes ERROR: mismatched types [E0308] // and makes rustc to print array from const arguments -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![allow(incomplete_features)] struct TakesArr; diff --git a/tests/ui/const-generics/mgca/wrong_type_const_arr_diag_trait.rs b/tests/ui/const-generics/mgca/wrong_type_const_arr_diag_trait.rs index 02268c4e37d7e..225d3ef226cba 100644 --- a/tests/ui/const-generics/mgca/wrong_type_const_arr_diag_trait.rs +++ b/tests/ui/const-generics/mgca/wrong_type_const_arr_diag_trait.rs @@ -1,6 +1,6 @@ // This test causes ERROR: mismatched types [E0308] // and makes rustc to print array from const arguments -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params, trivial_bounds)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params, trivial_bounds)] #![allow(incomplete_features)] trait Trait { diff --git a/tests/ui/const-generics/min_adt_const_params/tuple_with_infer_arg.rs b/tests/ui/const-generics/min_adt_const_params/tuple_with_infer_arg.rs index 081e0db80997c..675cecc68f884 100644 --- a/tests/ui/const-generics/min_adt_const_params/tuple_with_infer_arg.rs +++ b/tests/ui/const-generics/min_adt_const_params/tuple_with_infer_arg.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(min_adt_const_params, min_generic_const_args, macroless_generic_const_args)] +#![feature(min_adt_const_params, gca_min_const_items, gca_macroless_args)] struct S; diff --git a/tests/ui/const-generics/min_const_generics/complex-expression.stderr b/tests/ui/const-generics/min_const_generics/complex-expression.stderr index 96d67fb642a66..2a7d7a35fce9e 100644 --- a/tests/ui/const-generics/min_const_generics/complex-expression.stderr +++ b/tests/ui/const-generics/min_const_generics/complex-expression.stderr @@ -6,7 +6,7 @@ LL | struct Break0([u8; { N + 1 }]); | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/complex-expression.rs:13:40 @@ -16,7 +16,7 @@ LL | struct Break1([u8; { { N } }]); | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/complex-expression.rs:17:17 @@ -26,7 +26,7 @@ LL | let _: [u8; N + 1]; | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/complex-expression.rs:22:17 @@ -36,7 +36,7 @@ LL | let _ = [0; N + 1]; | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/complex-expression.rs:26:45 @@ -46,7 +46,7 @@ LL | struct BreakTy0(T, [u8; { size_of::<*mut T>() }]); | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/complex-expression.rs:29:47 @@ -56,7 +56,7 @@ LL | struct BreakTy1(T, [u8; { { size_of::<*mut T>() } }]); | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/complex-expression.rs:33:32 @@ -66,7 +66,7 @@ LL | let _: [u8; size_of::<*mut T>() + 1]; | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item warning: cannot use constants which depend on generic parameters in types --> $DIR/complex-expression.rs:38:17 diff --git a/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr b/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr index c8def64d8f2a4..7f203f8afb13b 100644 --- a/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr +++ b/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr @@ -6,7 +6,7 @@ LL | test::<{ let _: &'a (); 3 },>(); | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/forbid-non-static-lifetimes.rs:21:16 @@ -16,7 +16,7 @@ LL | [(); (|_: &'a u8| (), 0).1]; | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 2 previous errors diff --git a/tests/ui/const-generics/min_const_generics/forbid-self-no-normalize.stderr b/tests/ui/const-generics/min_const_generics/forbid-self-no-normalize.stderr index d8dd17f0c8ffe..87cac5849df89 100644 --- a/tests/ui/const-generics/min_const_generics/forbid-self-no-normalize.stderr +++ b/tests/ui/const-generics/min_const_generics/forbid-self-no-normalize.stderr @@ -10,7 +10,7 @@ note: not a concrete type LL | impl BindsParam for ::Assoc { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr b/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr index 2350453634541..4e3cf9b6d21fe 100644 --- a/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr +++ b/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr @@ -6,7 +6,7 @@ LL | fn t1() -> [u8; std::mem::size_of::()]; | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic `Self` types are currently not permitted in anonymous constants --> $DIR/self-ty-in-const-1.rs:12:41 @@ -20,7 +20,7 @@ note: not a concrete type LL | impl Bar { | ^^^^^^ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 2 previous errors diff --git a/tests/ui/const-generics/min_const_generics/self-ty-in-const-2.stderr b/tests/ui/const-generics/min_const_generics/self-ty-in-const-2.stderr index a8aa970929d5e..8af5a4bd0d388 100644 --- a/tests/ui/const-generics/min_const_generics/self-ty-in-const-2.stderr +++ b/tests/ui/const-generics/min_const_generics/self-ty-in-const-2.stderr @@ -10,7 +10,7 @@ note: not a concrete type LL | impl Baz for Bar { | ^^^^^^ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/outer-lifetime-in-const-generic-default.stderr b/tests/ui/const-generics/outer-lifetime-in-const-generic-default.stderr index 11212a1b2e4ad..989378cd313aa 100644 --- a/tests/ui/const-generics/outer-lifetime-in-const-generic-default.stderr +++ b/tests/ui/const-generics/outer-lifetime-in-const-generic-default.stderr @@ -6,7 +6,7 @@ LL | let x: &'a (); | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr b/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr index 534e30b7fdab5..0c8aac63dd87f 100644 --- a/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr +++ b/tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr @@ -12,7 +12,7 @@ LL | struct Foo()]>(T, U); | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0128]: generic parameter defaults cannot reference parameters before they are declared --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:8:21 diff --git a/tests/ui/const-generics/paren.stderr b/tests/ui/const-generics/paren.stderr index fafcf126b903a..a0ee4a0683e37 100644 --- a/tests/ui/const-generics/paren.stderr +++ b/tests/ui/const-generics/paren.stderr @@ -6,7 +6,7 @@ LL | let _: [u32; (N)] = [5; _]; | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/paren.rs:14:21 @@ -16,7 +16,7 @@ LL | let _: [u32; { (N) }] = [5; _]; | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/paren.rs:15:22 @@ -26,7 +26,7 @@ LL | let _: [u32; { { N } }] = [5; _]; | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/paren.rs:24:21 @@ -36,7 +36,7 @@ LL | let _: Thing<{ (N) }> = Thing; | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/paren.rs:25:22 @@ -46,7 +46,7 @@ LL | let _: Thing<{ { N } }> = Thing; | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0573]: cannot find type `N` in this scope --> $DIR/paren.rs:21:19 diff --git a/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.stderr b/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.stderr index 9c956d79a7bba..bd6a9911bbcb0 100644 --- a/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.stderr +++ b/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.stderr @@ -5,7 +5,7 @@ LL | impl Foo for Bar { | ^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0229]: associated item constraints are not allowed here diff --git a/tests/ui/const-generics/parser-error-recovery/issue-89013.stderr b/tests/ui/const-generics/parser-error-recovery/issue-89013.stderr index 4a4ff098dc4ba..1b9f771f0bb18 100644 --- a/tests/ui/const-generics/parser-error-recovery/issue-89013.stderr +++ b/tests/ui/const-generics/parser-error-recovery/issue-89013.stderr @@ -17,7 +17,7 @@ LL | impl Foo for Bar { | ^^^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0229]: associated item constraints are not allowed here diff --git a/tests/ui/const-generics/renamed-feature-gates.rs b/tests/ui/const-generics/renamed-feature-gates.rs new file mode 100644 index 0000000000000..2fdad8a19bd24 --- /dev/null +++ b/tests/ui/const-generics/renamed-feature-gates.rs @@ -0,0 +1,21 @@ +#![feature(min_generic_const_args)] +//~^ ERROR feature has been removed +//~| NOTE feature has been removed +//~| NOTE removed in +//~| NOTE renamed to `gca_min_const_items` +#![feature(generic_const_args)] +//~^ ERROR feature has been removed +//~| NOTE feature has been removed +//~| NOTE removed in +//~| NOTE renamed to `gca_const_items` +#![feature(macroless_generic_const_args)] +//~^ ERROR feature has been removed +//~| NOTE feature has been removed +//~| NOTE removed in +//~| NOTE renamed to `gca_macroless_args` +#![feature(macroless_const_item_generic_const_args)] +//~^ ERROR feature has been removed +//~| NOTE feature has been removed +//~| NOTE removed in +//~| NOTE renamed to `gca_macroless_items` +fn main() {} diff --git a/tests/ui/const-generics/renamed-feature-gates.stderr b/tests/ui/const-generics/renamed-feature-gates.stderr new file mode 100644 index 0000000000000..b5478b7412f0e --- /dev/null +++ b/tests/ui/const-generics/renamed-feature-gates.stderr @@ -0,0 +1,39 @@ +error[E0557]: feature has been removed + --> $DIR/renamed-feature-gates.rs:1:12 + | +LL | #![feature(min_generic_const_args)] + | ^^^^^^^^^^^^^^^^^^^^^^ feature has been removed + | + = note: removed in CURRENT_RUSTC_VERSION + = note: renamed to `gca_min_const_items` + +error[E0557]: feature has been removed + --> $DIR/renamed-feature-gates.rs:6:12 + | +LL | #![feature(generic_const_args)] + | ^^^^^^^^^^^^^^^^^^ feature has been removed + | + = note: removed in CURRENT_RUSTC_VERSION + = note: renamed to `gca_const_items` + +error[E0557]: feature has been removed + --> $DIR/renamed-feature-gates.rs:11:12 + | +LL | #![feature(macroless_generic_const_args)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ feature has been removed + | + = note: removed in CURRENT_RUSTC_VERSION + = note: renamed to `gca_macroless_args` + +error[E0557]: feature has been removed + --> $DIR/renamed-feature-gates.rs:16:12 + | +LL | #![feature(macroless_const_item_generic_const_args)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ feature has been removed + | + = note: removed in CURRENT_RUSTC_VERSION + = note: renamed to `gca_macroless_items` + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0557`. diff --git a/tests/ui/const-generics/repeat_expr_hack_gives_right_generics.stderr b/tests/ui/const-generics/repeat_expr_hack_gives_right_generics.stderr index 627ffb15c56a6..a0dc7043a8966 100644 --- a/tests/ui/const-generics/repeat_expr_hack_gives_right_generics.stderr +++ b/tests/ui/const-generics/repeat_expr_hack_gives_right_generics.stderr @@ -6,7 +6,7 @@ LL | bar::<{ [1; N] }>(); | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/repeat_expr_hack_gives_right_generics.rs:22:19 @@ -16,7 +16,7 @@ LL | bar::<{ [1; { N + 1 }] }>(); | = help: const parameters may only be used as standalone arguments here, i.e. `N` = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 2 previous errors diff --git a/tests/ui/const-generics/suggest_const_for_array.generic_const_args.stderr b/tests/ui/const-generics/suggest_const_for_array.gca_const_items.stderr similarity index 100% rename from tests/ui/const-generics/suggest_const_for_array.generic_const_args.stderr rename to tests/ui/const-generics/suggest_const_for_array.gca_const_items.stderr diff --git a/tests/ui/const-generics/suggest_const_for_array.min_generic_const_args.stderr b/tests/ui/const-generics/suggest_const_for_array.gca_min_const_items.stderr similarity index 100% rename from tests/ui/const-generics/suggest_const_for_array.min_generic_const_args.stderr rename to tests/ui/const-generics/suggest_const_for_array.gca_min_const_items.stderr diff --git a/tests/ui/const-generics/suggest_const_for_array.rs b/tests/ui/const-generics/suggest_const_for_array.rs index b85491130c9e8..252917f644ad7 100644 --- a/tests/ui/const-generics/suggest_const_for_array.rs +++ b/tests/ui/const-generics/suggest_const_for_array.rs @@ -1,7 +1,7 @@ -//@revisions: min_generic_const_args generic_const_args regular +//@revisions: gca_min_const_items gca_const_items regular #![crate_type = "lib"] -#![cfg_attr(min_generic_const_args, feature(min_generic_const_args))] -#![cfg_attr(generic_const_args, feature(min_generic_const_args))] +#![cfg_attr(gca_min_const_items, feature(gca_min_const_items))] +#![cfg_attr(gca_const_items, feature(gca_min_const_items))] fn example() {} diff --git a/tests/ui/const-generics/type-const-ice-issue-151631.rs b/tests/ui/const-generics/type-const-ice-issue-151631.rs index 6133feba70a3b..b1f73d619e204 100644 --- a/tests/ui/const-generics/type-const-ice-issue-151631.rs +++ b/tests/ui/const-generics/type-const-ice-issue-151631.rs @@ -1,6 +1,6 @@ // issue: //@ compile-flags: -Znext-solver -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/const-generics/type-relative-path-144547.min.stderr b/tests/ui/const-generics/type-relative-path-144547.min.stderr index 798d377ea4374..28c1ade6ccce7 100644 --- a/tests/ui/const-generics/type-relative-path-144547.min.stderr +++ b/tests/ui/const-generics/type-relative-path-144547.min.stderr @@ -5,7 +5,7 @@ LL | type SupportedArray = [T; ::SUPPORTED_S | ^^^^^^^^^^^^^^ | = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/type-relative-path-144547.rs b/tests/ui/const-generics/type-relative-path-144547.rs index 35722efd17fd4..84e68437aa9b9 100644 --- a/tests/ui/const-generics/type-relative-path-144547.rs +++ b/tests/ui/const-generics/type-relative-path-144547.rs @@ -2,7 +2,7 @@ //@ revisions: min mgca //@[mgca] check-pass -#![cfg_attr(mgca, feature(min_generic_const_args, macroless_generic_const_args))] +#![cfg_attr(mgca, feature(gca_min_const_items, gca_macroless_args))] trait UnderlyingImpl { type InfoType: LevelInfo; diff --git a/tests/ui/consts/const-eval/size-of-t.stderr b/tests/ui/consts/const-eval/size-of-t.stderr index c2183dc99a7db..0265597e4016c 100644 --- a/tests/ui/consts/const-eval/size-of-t.stderr +++ b/tests/ui/consts/const-eval/size-of-t.stderr @@ -6,7 +6,7 @@ LL | let _arr: [u8; size_of::()]; | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/delegation/generics/const-type-ice-154334.rs b/tests/ui/delegation/generics/const-type-ice-154334.rs index 3d2d8ca3ed7fd..77365f4466877 100644 --- a/tests/ui/delegation/generics/const-type-ice-154334.rs +++ b/tests/ui/delegation/generics/const-type-ice-154334.rs @@ -1,7 +1,7 @@ //@ check-pass //@ compile-flags: --crate-type=lib -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![feature(fn_delegation)] #![feature(adt_const_params)] #![feature(unsized_const_params)] diff --git a/tests/ui/delegation/hir-crate-items-before-lowering-ices.rs b/tests/ui/delegation/hir-crate-items-before-lowering-ices.rs index cbe6cdd06df7e..f757c5efa61a6 100644 --- a/tests/ui/delegation/hir-crate-items-before-lowering-ices.rs +++ b/tests/ui/delegation/hir-crate-items-before-lowering-ices.rs @@ -1,7 +1,7 @@ //@ revisions: ice_155125 ice_155127 ice_155128 ice_155164 ice_155202 //@[ice_155202] edition: 2018.. -#![feature(min_generic_const_args, fn_delegation)] +#![feature(gca_min_const_items, fn_delegation)] #[cfg(ice_155125)] mod ice_155125 { diff --git a/tests/ui/delegation/inside-const-body-ice-155300.rs b/tests/ui/delegation/inside-const-body-ice-155300.rs index 224f84845b354..29a926170ca3a 100644 --- a/tests/ui/delegation/inside-const-body-ice-155300.rs +++ b/tests/ui/delegation/inside-const-body-ice-155300.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![feature(fn_delegation)] use std::gca; diff --git a/tests/ui/delegation/wrong-fn-kind-ice-159127.rs b/tests/ui/delegation/wrong-fn-kind-ice-159127.rs index e1cde084600fd..b01cfffb560a6 100644 --- a/tests/ui/delegation/wrong-fn-kind-ice-159127.rs +++ b/tests/ui/delegation/wrong-fn-kind-ice-159127.rs @@ -1,5 +1,5 @@ #![feature(fn_delegation)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; diff --git a/tests/ui/feature-gates/feature-gate-associated_const_equality.stderr b/tests/ui/feature-gates/feature-gate-associated_const_equality.stderr index 096755701931c..aaf92e6dc2e0e 100644 --- a/tests/ui/feature-gates/feature-gate-associated_const_equality.stderr +++ b/tests/ui/feature-gates/feature-gate-associated_const_equality.stderr @@ -5,7 +5,7 @@ LL | fn foo>() {} | ^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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 diff --git a/tests/ui/feature-gates/feature-gate-generic-const-args.rs b/tests/ui/feature-gates/feature-gate-gca-const-items.rs similarity index 63% rename from tests/ui/feature-gates/feature-gate-generic-const-args.rs rename to tests/ui/feature-gates/feature-gate-gca-const-items.rs index e5bc617d96e4d..e1851ee275738 100644 --- a/tests/ui/feature-gates/feature-gate-generic-const-args.rs +++ b/tests/ui/feature-gates/feature-gate-gca-const-items.rs @@ -1,10 +1,10 @@ -#![feature(generic_const_items, min_generic_const_args)] +#![feature(generic_const_items, gca_min_const_items)] #![expect(incomplete_features)] use std::gca; const INC: usize = gca!(const { N + 1 }); //~^ ERROR generic parameters may not be used in const operations -//~| HELP add `#![feature(generic_const_args)]` +//~| HELP add `#![feature(gca_const_items)]` fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-generic-const-args.stderr b/tests/ui/feature-gates/feature-gate-gca-const-items.stderr similarity index 60% rename from tests/ui/feature-gates/feature-gate-generic-const-args.stderr rename to tests/ui/feature-gates/feature-gate-gca-const-items.stderr index 7d4c5a67c56a6..2650908e29de8 100644 --- a/tests/ui/feature-gates/feature-gate-generic-const-args.stderr +++ b/tests/ui/feature-gates/feature-gate-gca-const-items.stderr @@ -1,10 +1,10 @@ error: generic parameters may not be used in const operations - --> $DIR/feature-gate-generic-const-args.rs:6:49 + --> $DIR/feature-gate-gca-const-items.rs:6:49 | LL | const INC: usize = gca!(const { N + 1 }); | ^ | - = help: add `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: add `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-macroless-generic-const-args.rs b/tests/ui/feature-gates/feature-gate-gca-macroless-args.rs similarity index 100% rename from tests/ui/feature-gates/feature-gate-macroless-generic-const-args.rs rename to tests/ui/feature-gates/feature-gate-gca-macroless-args.rs diff --git a/tests/ui/feature-gates/feature-gate-macroless-generic-const-args.stderr b/tests/ui/feature-gates/feature-gate-gca-macroless-args.stderr similarity index 70% rename from tests/ui/feature-gates/feature-gate-macroless-generic-const-args.stderr rename to tests/ui/feature-gates/feature-gate-gca-macroless-args.stderr index 956c983894518..9dbb7108bfb4e 100644 --- a/tests/ui/feature-gates/feature-gate-macroless-generic-const-args.stderr +++ b/tests/ui/feature-gates/feature-gate-gca-macroless-args.stderr @@ -1,21 +1,21 @@ error: generic parameters may not be used in const operations - --> $DIR/feature-gate-macroless-generic-const-args.rs:8:29 + --> $DIR/feature-gate-gca-macroless-args.rs:8:29 | LL | fn foo() -> [u8; ::ASSOC] { | ^ cannot perform const operation using `T` | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0658]: the `rustc_always_gca` attribute is an experimental feature - --> $DIR/feature-gate-macroless-generic-const-args.rs:2:7 + --> $DIR/feature-gate-gca-macroless-args.rs:2:7 | LL | #[rustc_always_gca] | ^^^^^^^^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-macroless_const_item_generic_const_args.macroful.stderr b/tests/ui/feature-gates/feature-gate-gca-macroless-items.macroful.stderr similarity index 84% rename from tests/ui/feature-gates/feature-gate-macroless_const_item_generic_const_args.macroful.stderr rename to tests/ui/feature-gates/feature-gate-gca-macroless-items.macroful.stderr index d49f65acd5a0e..a2e924cb94f76 100644 --- a/tests/ui/feature-gates/feature-gate-macroless_const_item_generic_const_args.macroful.stderr +++ b/tests/ui/feature-gates/feature-gate-gca-macroless-items.macroful.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/feature-gate-macroless_const_item_generic_const_args.rs:24:11 + --> $DIR/feature-gate-gca-macroless-items.rs:24:11 | LL | let a: [(); <() as Trait>::ASSOC::] | ------------------------------- expected due to this diff --git a/tests/ui/feature-gates/feature-gate-macroless_const_item_generic_const_args.rs b/tests/ui/feature-gates/feature-gate-gca-macroless-items.rs similarity index 71% rename from tests/ui/feature-gates/feature-gate-macroless_const_item_generic_const_args.rs rename to tests/ui/feature-gates/feature-gate-gca-macroless-items.rs index a967dffcd39af..6924ea8985ae8 100644 --- a/tests/ui/feature-gates/feature-gate-macroless_const_item_generic_const_args.rs +++ b/tests/ui/feature-gates/feature-gate-gca-macroless-items.rs @@ -3,13 +3,13 @@ //@ compile-flags: -Znext-solver #![feature( - min_generic_const_args, - generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_const_items, + gca_macroless_args, generic_const_items, )] -#![cfg_attr(macroless, feature(macroless_const_item_generic_const_args))] +#![cfg_attr(macroless, feature(gca_macroless_items))] trait Trait { const ASSOC: usize; diff --git a/tests/ui/feature-gates/feature-gate-min-generic-const-args.rs b/tests/ui/feature-gates/feature-gate-gca-min-const-items.rs similarity index 83% rename from tests/ui/feature-gates/feature-gate-min-generic-const-args.rs rename to tests/ui/feature-gates/feature-gate-gca-min-const-items.rs index 07f278f04591a..581c60db02aee 100644 --- a/tests/ui/feature-gates/feature-gate-min-generic-const-args.rs +++ b/tests/ui/feature-gates/feature-gate-gca-min-const-items.rs @@ -7,7 +7,7 @@ trait Trait { // FIXME(mgca): add suggestion for mgca to this error fn foo() -> [u8; std::gca!(::ASSOC)] { //~^ ERROR generic parameters may not be used in const operations - //~| ERROR: use of unstable library feature `min_generic_const_args` [E0658] + //~| ERROR: use of unstable library feature `gca_min_const_items` [E0658] //~| ERROR: expected expression, found `gca!()` loop {} } diff --git a/tests/ui/feature-gates/feature-gate-min-generic-const-args.stderr b/tests/ui/feature-gates/feature-gate-gca-min-const-items.stderr similarity index 69% rename from tests/ui/feature-gates/feature-gate-min-generic-const-args.stderr rename to tests/ui/feature-gates/feature-gate-gca-min-const-items.stderr index f709affb8a819..13f24a86d25ee 100644 --- a/tests/ui/feature-gates/feature-gate-min-generic-const-args.stderr +++ b/tests/ui/feature-gates/feature-gate-gca-min-const-items.stderr @@ -1,35 +1,35 @@ -error[E0658]: use of unstable library feature `min_generic_const_args` - --> $DIR/feature-gate-min-generic-const-args.rs:8:28 +error[E0658]: use of unstable library feature `gca_min_const_items` + --> $DIR/feature-gate-gca-min-const-items.rs:8:28 | LL | fn foo() -> [u8; std::gca!(::ASSOC)] { | ^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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: generic parameters may not be used in const operations - --> $DIR/feature-gate-min-generic-const-args.rs:8:39 + --> $DIR/feature-gate-gca-min-const-items.rs:8:39 | LL | fn foo() -> [u8; std::gca!(::ASSOC)] { | ^ cannot perform const operation using `T` | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0658]: the `rustc_always_gca` attribute is an experimental feature - --> $DIR/feature-gate-min-generic-const-args.rs:2:7 + --> $DIR/feature-gate-gca-min-const-items.rs:2:7 | LL | #[rustc_always_gca] | ^^^^^^^^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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: expected expression, found `gca!()` constant - --> $DIR/feature-gate-min-generic-const-args.rs:8:28 + --> $DIR/feature-gate-gca-min-const-items.rs:8:28 | LL | fn foo() -> [u8; std::gca!(::ASSOC)] { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.rs b/tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.rs index 8da5824d9c49c..3c2c2cb90e52a 100644 --- a/tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.rs +++ b/tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.rs @@ -1,5 +1,5 @@ const FOO: u8 = std::gca!(10); -//~^ ERROR use of unstable library feature `min_generic_const_args` [E0658] +//~^ ERROR use of unstable library feature `gca_min_const_items` [E0658] //~| ERROR expected expression, found `gca!()` constant trait Bar { @@ -10,7 +10,7 @@ trait Bar { impl Bar for bool { const BAR: bool = std::gca!(false); - //~^ ERROR use of unstable library feature `min_generic_const_args` [E0658] + //~^ ERROR use of unstable library feature `gca_min_const_items` [E0658] //~| ERROR expected expression, found `gca!()` constant //~| ERROR implementation of a `#[rustc_always_gca]` must have a `gca!` RHS } diff --git a/tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.stderr b/tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.stderr index 3ee23f4883e05..d8a4682aa0298 100644 --- a/tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.stderr +++ b/tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.stderr @@ -1,21 +1,21 @@ -error[E0658]: use of unstable library feature `min_generic_const_args` +error[E0658]: use of unstable library feature `gca_min_const_items` --> $DIR/feature-gate-mgca-type-const-syntax.rs:1:17 | LL | const FOO: u8 = std::gca!(10); | ^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: use of unstable library feature `min_generic_const_args` +error[E0658]: use of unstable library feature `gca_min_const_items` --> $DIR/feature-gate-mgca-type-const-syntax.rs:12:23 | LL | const BAR: bool = std::gca!(false); | ^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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: expected expression, found `gca!()` constant @@ -31,7 +31,7 @@ LL | #[rustc_always_gca] | ^^^^^^^^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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: expected expression, found `gca!()` constant diff --git a/tests/ui/generic-const-items/assoc-const-bindings.rs b/tests/ui/generic-const-items/assoc-const-bindings.rs index 2e0929a56867c..794dfaba890c0 100644 --- a/tests/ui/generic-const-items/assoc-const-bindings.rs +++ b/tests/ui/generic-const-items/assoc-const-bindings.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(generic_const_items, min_generic_const_args)] +#![feature(generic_const_items, gca_min_const_items)] #![feature(adt_const_params, const_param_ty_trait, generic_const_parameter_types)] #![expect(incomplete_features)] diff --git a/tests/ui/generic-const-items/assoc-const-no-infer-ice-115806.rs b/tests/ui/generic-const-items/assoc-const-no-infer-ice-115806.rs index d1b88db9466ef..e5b09c1440720 100644 --- a/tests/ui/generic-const-items/assoc-const-no-infer-ice-115806.rs +++ b/tests/ui/generic-const-items/assoc-const-no-infer-ice-115806.rs @@ -1,6 +1,6 @@ // ICE: assertion failed: !value.has_infer() // issue: rust-lang/rust#115806 -#![feature(adt_const_params, min_generic_const_args, unsized_const_params)] +#![feature(adt_const_params, gca_min_const_items, unsized_const_params)] #![feature(associated_type_defaults)] #![allow(incomplete_features)] diff --git a/tests/ui/generic-const-items/type-const-nested-assoc-const.rs b/tests/ui/generic-const-items/type-const-nested-assoc-const.rs index 4d91d7edc8f16..574757ddf1e18 100644 --- a/tests/ui/generic-const-items/type-const-nested-assoc-const.rs +++ b/tests/ui/generic-const-items/type-const-nested-assoc-const.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(generic_const_items, min_generic_const_args)] +#![feature(generic_const_items, gca_min_const_items)] #![allow(incomplete_features)] use std::gca; diff --git a/tests/ui/generics/param-in-ct-in-ty-param-default.stderr b/tests/ui/generics/param-in-ct-in-ty-param-default.stderr index 71db114cb8738..9d9c9102cde5b 100644 --- a/tests/ui/generics/param-in-ct-in-ty-param-default.stderr +++ b/tests/ui/generics/param-in-ct-in-ty-param-default.stderr @@ -6,7 +6,7 @@ LL | struct Foo()]>(T, U); | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr b/tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr index 2aef26cf44151..c78c3e9df86de 100644 --- a/tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr +++ b/tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr @@ -6,7 +6,7 @@ LL | beta: [(); foo::<&'a ()>()], | = note: lifetime parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0392]: lifetime parameter `'s` is never used --> $DIR/issue-64173-unused-lifetimes.rs:3:12 @@ -23,7 +23,7 @@ LL | array: [(); size_of::<&Self>()], | ^^^^ | = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error[E0392]: lifetime parameter `'a` is never used --> $DIR/issue-64173-unused-lifetimes.rs:15:12 diff --git a/tests/ui/lowering/no-name-for-DefPath-issue-133426.stderr b/tests/ui/lowering/no-name-for-DefPath-issue-133426.stderr index 3d1233cdd019e..9454fbb60853a 100644 --- a/tests/ui/lowering/no-name-for-DefPath-issue-133426.stderr +++ b/tests/ui/lowering/no-name-for-DefPath-issue-133426.stderr @@ -5,7 +5,7 @@ LL | fn b(_: impl Iterator) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0614]: type `!` cannot be dereferenced diff --git a/tests/ui/object-lifetime/object-lifetime-default-inherent-gac.rs b/tests/ui/object-lifetime/object-lifetime-default-inherent-gac.rs index 8e77c40b113d9..4976961825ca1 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-inherent-gac.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-inherent-gac.rs @@ -5,8 +5,8 @@ // FIXME: Ideally, this test would be check-pass. See below for details. #![feature( - min_generic_const_args, - macroless_generic_const_args, + gca_min_const_items, + gca_macroless_args, inherent_associated_types, generic_const_items )] diff --git a/tests/ui/parallel-rustc/fn-sig-cycle-ice-154056.rs b/tests/ui/parallel-rustc/fn-sig-cycle-ice-154056.rs index fb930ad349e0e..eb6f97855bc6a 100644 --- a/tests/ui/parallel-rustc/fn-sig-cycle-ice-154056.rs +++ b/tests/ui/parallel-rustc/fn-sig-cycle-ice-154056.rs @@ -2,7 +2,7 @@ //@ check-pass -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![feature(return_type_notation)] trait IntFactory { diff --git a/tests/ui/parser/recover/recover-assoc-const-constraint.stderr b/tests/ui/parser/recover/recover-assoc-const-constraint.stderr index 766acd0398d2b..c8fd3e24aab70 100644 --- a/tests/ui/parser/recover/recover-assoc-const-constraint.stderr +++ b/tests/ui/parser/recover/recover-assoc-const-constraint.stderr @@ -5,7 +5,7 @@ LL | bar::(); | ^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0658]: associated const equality is incomplete @@ -15,7 +15,7 @@ LL | bar::(); | ^^^^^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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 2 previous errors diff --git a/tests/ui/resolve/issue-39559.stderr b/tests/ui/resolve/issue-39559.stderr index 71e763820a279..6f9fb8377da79 100644 --- a/tests/ui/resolve/issue-39559.stderr +++ b/tests/ui/resolve/issue-39559.stderr @@ -6,7 +6,7 @@ LL | entries: [T; D::dim()], | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 1 previous error diff --git a/tests/ui/sanitizer/cfi/assoc-const-projection-issue-151878.rs b/tests/ui/sanitizer/cfi/assoc-const-projection-issue-151878.rs index 6db3ebceb1cff..4a1db04ca2560 100644 --- a/tests/ui/sanitizer/cfi/assoc-const-projection-issue-151878.rs +++ b/tests/ui/sanitizer/cfi/assoc-const-projection-issue-151878.rs @@ -4,7 +4,7 @@ //@ build-pass //@ no-prefer-dynamic -#![feature(min_generic_const_args, macroless_generic_const_args, associated_type_defaults)] +#![feature(gca_min_const_items, gca_macroless_args, associated_type_defaults)] #![expect(incomplete_features)] use std::gca; diff --git a/tests/ui/specialization/overlap-due-to-unsatisfied-const-bound.rs b/tests/ui/specialization/overlap-due-to-unsatisfied-const-bound.rs index 33b3aa4cd2430..0fd9673fbbd0c 100644 --- a/tests/ui/specialization/overlap-due-to-unsatisfied-const-bound.rs +++ b/tests/ui/specialization/overlap-due-to-unsatisfied-const-bound.rs @@ -1,6 +1,6 @@ // Regression test for #140571. The compiler used to ICE -#![feature(min_generic_const_args, specialization)] +#![feature(gca_min_const_items, specialization)] use std::gca; diff --git a/tests/ui/supertrait-shadowing/assoc-const.rs b/tests/ui/supertrait-shadowing/assoc-const.rs index 9e49004e7c836..94247f62215c8 100644 --- a/tests/ui/supertrait-shadowing/assoc-const.rs +++ b/tests/ui/supertrait-shadowing/assoc-const.rs @@ -1,7 +1,7 @@ //@ run-pass #![feature(supertrait_item_shadowing)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(dead_code)] use std::gca; diff --git a/tests/ui/supertrait-shadowing/common-ancestor-2.rs b/tests/ui/supertrait-shadowing/common-ancestor-2.rs index 4844b0a43aa89..6ae70524f5623 100644 --- a/tests/ui/supertrait-shadowing/common-ancestor-2.rs +++ b/tests/ui/supertrait-shadowing/common-ancestor-2.rs @@ -1,7 +1,7 @@ //@ run-pass #![feature(supertrait_item_shadowing)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![warn(resolving_to_items_shadowing_supertrait_items)] #![warn(shadowing_supertrait_items)] #![allow(dead_code)] diff --git a/tests/ui/supertrait-shadowing/common-ancestor-3.rs b/tests/ui/supertrait-shadowing/common-ancestor-3.rs index c815919c7e318..b2fc6ca24909c 100644 --- a/tests/ui/supertrait-shadowing/common-ancestor-3.rs +++ b/tests/ui/supertrait-shadowing/common-ancestor-3.rs @@ -1,7 +1,7 @@ //@ run-pass #![feature(supertrait_item_shadowing)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![warn(resolving_to_items_shadowing_supertrait_items)] #![warn(shadowing_supertrait_items)] #![allow(dead_code)] diff --git a/tests/ui/supertrait-shadowing/common-ancestor.rs b/tests/ui/supertrait-shadowing/common-ancestor.rs index e89167c9215fd..eaab705fac807 100644 --- a/tests/ui/supertrait-shadowing/common-ancestor.rs +++ b/tests/ui/supertrait-shadowing/common-ancestor.rs @@ -1,7 +1,7 @@ //@ run-pass #![feature(supertrait_item_shadowing)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![warn(resolving_to_items_shadowing_supertrait_items)] #![warn(shadowing_supertrait_items)] #![allow(dead_code)] diff --git a/tests/ui/supertrait-shadowing/no-common-ancestor-2.rs b/tests/ui/supertrait-shadowing/no-common-ancestor-2.rs index 3462ac4e37d4d..0fd9f2804fde0 100644 --- a/tests/ui/supertrait-shadowing/no-common-ancestor-2.rs +++ b/tests/ui/supertrait-shadowing/no-common-ancestor-2.rs @@ -1,5 +1,5 @@ #![feature(supertrait_item_shadowing)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::gca; use std::mem::size_of; diff --git a/tests/ui/supertrait-shadowing/no-common-ancestor.rs b/tests/ui/supertrait-shadowing/no-common-ancestor.rs index 73209c015f8f5..b66cee7db957c 100644 --- a/tests/ui/supertrait-shadowing/no-common-ancestor.rs +++ b/tests/ui/supertrait-shadowing/no-common-ancestor.rs @@ -1,5 +1,5 @@ #![feature(supertrait_item_shadowing)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::mem::size_of; diff --git a/tests/ui/supertrait-shadowing/out-of-scope.rs b/tests/ui/supertrait-shadowing/out-of-scope.rs index fc967e525dc40..6e69e0e3278ec 100644 --- a/tests/ui/supertrait-shadowing/out-of-scope.rs +++ b/tests/ui/supertrait-shadowing/out-of-scope.rs @@ -1,6 +1,6 @@ //@ run-pass -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![allow(dead_code)] use std::mem::size_of; diff --git a/tests/ui/supertrait-shadowing/type-dependent.rs b/tests/ui/supertrait-shadowing/type-dependent.rs index b2c31b352deee..4b387c5760577 100644 --- a/tests/ui/supertrait-shadowing/type-dependent.rs +++ b/tests/ui/supertrait-shadowing/type-dependent.rs @@ -2,7 +2,7 @@ // Makes sure we can shadow with type-dependent associated item syntax. -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![feature(supertrait_item_shadowing)] #![allow(dead_code)] diff --git a/tests/ui/traits/associated_type_bound/generic-const-args-default.rs b/tests/ui/traits/associated_type_bound/gca-min-const-items-default.rs similarity index 84% rename from tests/ui/traits/associated_type_bound/generic-const-args-default.rs rename to tests/ui/traits/associated_type_bound/gca-min-const-items-default.rs index b53d0bb359c02..b262376c9a2d8 100644 --- a/tests/ui/traits/associated_type_bound/generic-const-args-default.rs +++ b/tests/ui/traits/associated_type_bound/gca-min-const-items-default.rs @@ -1,7 +1,7 @@ //! Regression test for //@ check-pass -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] trait Bar {} diff --git a/tests/ui/traits/final/final-on-assoc-type-const.rs b/tests/ui/traits/final/final-on-assoc-type-const.rs index 5c248fa57a8c2..ac38243609d81 100644 --- a/tests/ui/traits/final/final-on-assoc-type-const.rs +++ b/tests/ui/traits/final/final-on-assoc-type-const.rs @@ -1,6 +1,6 @@ // This is a regression test for . #![feature(final_associated_functions)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] #![expect(incomplete_features)] trait Uwu { final type Ovo; diff --git a/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.stderr b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.stderr index 8334fdae94856..e8c1f597e0cd8 100644 --- a/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.stderr +++ b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.stderr @@ -5,7 +5,7 @@ LL | impl Foo for T where T: Bar {} | ^^^^^^^^^ | = note: see issue #132980 for more information - = help: add `#![feature(min_generic_const_args)]` to the crate attributes to enable + = help: add `#![feature(gca_min_const_items)]` 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[E0119]: conflicting implementations of trait `Foo` for type `()` diff --git a/tests/ui/traits/next-solver/normalize-const-item-type.rs b/tests/ui/traits/next-solver/normalize-const-item-type.rs index 3b70e8718488b..bcf8933dc5d5d 100644 --- a/tests/ui/traits/next-solver/normalize-const-item-type.rs +++ b/tests/ui/traits/next-solver/normalize-const-item-type.rs @@ -1,7 +1,7 @@ //@ compile-flags: -Znext-solver #![feature(generic_const_items)] -#![feature(min_generic_const_args)] -#![feature(generic_const_args)] +#![feature(gca_min_const_items)] +#![feature(gca_const_items)] use std::gca; use std::marker::PhantomData; diff --git a/tests/ui/transmutability/non_scalar_alignment_value.rs b/tests/ui/transmutability/non_scalar_alignment_value.rs index ffc0e186978c1..24e97a2a55356 100644 --- a/tests/ui/transmutability/non_scalar_alignment_value.rs +++ b/tests/ui/transmutability/non_scalar_alignment_value.rs @@ -1,4 +1,4 @@ -#![feature(min_generic_const_args, macroless_generic_const_args, transmutability)] +#![feature(gca_min_const_items, gca_macroless_args, transmutability)] mod assert { use std::mem::{Assume, TransmuteFrom}; diff --git a/tests/ui/transmutability/transmute-from-const-args-ice-150457.rs b/tests/ui/transmutability/transmute-from-const-args-ice-150457.rs index 8c1b709127b06..38dd85638edc0 100644 --- a/tests/ui/transmutability/transmute-from-const-args-ice-150457.rs +++ b/tests/ui/transmutability/transmute-from-const-args-ice-150457.rs @@ -1,4 +1,4 @@ -//! Ensure `TransmuteFrom` with `min_generic_const_args` doesn't ICE +//! Ensure `TransmuteFrom` with `gca_min_const_items` doesn't ICE //! during well-formedness checking. //! //! Regression test for . @@ -6,7 +6,7 @@ //@ check-pass #![feature(transmutability)] -#![feature(min_generic_const_args)] +#![feature(gca_min_const_items)] use std::mem::{Assume, TransmuteFrom}; diff --git a/tests/ui/type-alias/lack-of-wfcheck-gat-generic-const-args.rs b/tests/ui/type-alias/lack-of-wfcheck-gat-generic-const-args.rs index 58bc4daedfcc1..6a6b0d2d6b799 100644 --- a/tests/ui/type-alias/lack-of-wfcheck-gat-generic-const-args.rs +++ b/tests/ui/type-alias/lack-of-wfcheck-gat-generic-const-args.rs @@ -3,7 +3,7 @@ //@ compile-flags: -Znext-solver=globally -#![feature(generic_const_args, min_generic_const_args)] +#![feature(gca_const_items, gca_min_const_items)] #![expect(incomplete_features)] // * dyn incompatible due to GAT diff --git a/tests/ui/type-alias/lack-of-wfcheck-generic-const-args.rs b/tests/ui/type-alias/lack-of-wfcheck-generic-const-args.rs index afca550944ffc..12ceef3932eb1 100644 --- a/tests/ui/type-alias/lack-of-wfcheck-generic-const-args.rs +++ b/tests/ui/type-alias/lack-of-wfcheck-generic-const-args.rs @@ -1,11 +1,11 @@ -// Demonstrate that generic_const_args changes the behavior for dyn trait aliases +// Demonstrate that gca_const_items changes the behavior for dyn trait aliases // with non-type associated consts: the associated const must be specified. //@ revisions: no_gca gca //@ compile-flags: -Znext-solver=globally //@ [no_gca] check-pass -#![cfg_attr(gca, feature(generic_const_args, min_generic_const_args))] +#![cfg_attr(gca, feature(gca_const_items, gca_min_const_items))] #![cfg_attr(gca, expect(incomplete_features))] type UnsatTraitBound0 = [str]; // `str: Sized` unsatisfied diff --git a/tests/ui/type-alias/recursive-lazy-type-alias-ice-152633.rs b/tests/ui/type-alias/recursive-lazy-type-alias-ice-152633.rs index 285dda667792d..b39cc02ea7151 100644 --- a/tests/ui/type-alias/recursive-lazy-type-alias-ice-152633.rs +++ b/tests/ui/type-alias/recursive-lazy-type-alias-ice-152633.rs @@ -1,9 +1,9 @@ -//! Ensure a self-referencing lazy type alias with `min_generic_const_args` +//! Ensure a self-referencing lazy type alias with `gca_min_const_items` //! doesn't ICE during normalization. //! //! Regression test for . -#![feature(checked_type_aliases, min_generic_const_args, macroless_generic_const_args)] +#![feature(checked_type_aliases, gca_min_const_items, gca_macroless_args)] trait Trait { #[rustc_always_gca] diff --git a/tests/ui/type/pattern_types/assoc_const.default.stderr b/tests/ui/type/pattern_types/assoc_const.default.stderr index 678a154659481..088495e408f97 100644 --- a/tests/ui/type/pattern_types/assoc_const.default.stderr +++ b/tests/ui/type/pattern_types/assoc_const.default.stderr @@ -6,7 +6,7 @@ LL | fn foo(_: pattern_type!(u32 is ::START..=::END) | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/assoc_const.rs:17:61 @@ -16,7 +16,7 @@ LL | fn foo(_: pattern_type!(u32 is ::START..=::END) | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/assoc_const.rs:20:40 @@ -26,7 +26,7 @@ LL | fn bar(_: pattern_type!(u32 is T::START..=T::END)) {} | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: generic parameters may not be used in const operations --> $DIR/assoc_const.rs:20:51 @@ -36,7 +36,7 @@ LL | fn bar(_: pattern_type!(u32 is T::START..=T::END)) {} | = note: type parameters may not be used in const expressions = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions - = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item + = help: alternatively, you can use `#![feature(gca_const_items)]` and extract the expression into a `type const` item error: aborting due to 4 previous errors diff --git a/tests/ui/unpretty/struct-exprs-tuple-call-pretty-printing.rs b/tests/ui/unpretty/struct-exprs-tuple-call-pretty-printing.rs index c8ae449d13856..a155d9ade5cf3 100644 --- a/tests/ui/unpretty/struct-exprs-tuple-call-pretty-printing.rs +++ b/tests/ui/unpretty/struct-exprs-tuple-call-pretty-printing.rs @@ -1,7 +1,7 @@ //@ compile-flags: -Zunpretty=hir //@ check-pass -#![feature(min_generic_const_args, macroless_generic_const_args, adt_const_params)] +#![feature(gca_min_const_items, gca_macroless_args, adt_const_params)] #![expect(incomplete_features)] #![allow(dead_code)] diff --git a/tests/ui/unpretty/struct-exprs-tuple-call-pretty-printing.stdout b/tests/ui/unpretty/struct-exprs-tuple-call-pretty-printing.stdout index 974ffd3b9c4e1..c2c79249a6bd4 100644 --- a/tests/ui/unpretty/struct-exprs-tuple-call-pretty-printing.stdout +++ b/tests/ui/unpretty/struct-exprs-tuple-call-pretty-printing.stdout @@ -3,7 +3,7 @@ #![expect(incomplete_features)] #![allow(dead_code)] -#![attr = Feature([min_generic_const_args#0, macroless_generic_const_args#0, +#![attr = Feature([gca_min_const_items#0, gca_macroless_args#0, adt_const_params#0])] extern crate std; #[attr = PreludeImport] diff --git a/tests/ui/use/import_trait_associated_item_bad.rs b/tests/ui/use/import_trait_associated_item_bad.rs index cb45004e4e335..35f57c5f15a1d 100644 --- a/tests/ui/use/import_trait_associated_item_bad.rs +++ b/tests/ui/use/import_trait_associated_item_bad.rs @@ -1,4 +1,4 @@ -#![feature(import_trait_associated_functions, min_generic_const_args, macroless_generic_const_args)] +#![feature(import_trait_associated_functions, gca_min_const_items, gca_macroless_args)] #![allow(incomplete_features)] trait Trait {