From 526787dbbcf037718f6470b458a497447051409d Mon Sep 17 00:00:00 2001 From: Jose Torres Date: Fri, 3 Jul 2026 21:26:32 -0400 Subject: [PATCH] rename from lazy_type_alias to checked_type_aliases Co-authored-by: lcnr --- .../rustc_ast_passes/src/ast_validation.rs | 2 +- compiler/rustc_ast_passes/src/diagnostics.rs | 2 +- compiler/rustc_feature/src/removed.rs | 2 ++ compiler/rustc_feature/src/unstable.rs | 4 ++-- .../rustc_hir_analysis/src/check/check.rs | 2 +- .../rustc_hir_analysis/src/check/wfcheck.rs | 4 ++-- compiler/rustc_hir_analysis/src/collect.rs | 2 +- .../rustc_hir_analysis/src/collect/type_of.rs | 4 ++-- .../src/hir_ty_lowering/errors.rs | 2 +- .../src/hir_ty_lowering/mod.rs | 4 ++-- .../src/outlives/implicit_infer.rs | 2 +- .../rustc_hir_analysis/src/outlives/mod.rs | 2 +- compiler/rustc_lint/src/builtin.rs | 4 ++-- compiler/rustc_lint/src/lints.rs | 2 +- .../src/rmeta/decoder/cstore_impl.rs | 2 +- compiler/rustc_metadata/src/rmeta/encoder.rs | 6 ++--- compiler/rustc_metadata/src/rmeta/mod.rs | 2 +- compiler/rustc_middle/src/queries.rs | 8 +++---- .../src/solve/project_goals/free_alias.rs | 2 +- compiler/rustc_span/src/symbol.rs | 1 + .../src/traits/normalize.rs | 2 +- src/doc/rustc-dev-guide/src/normalization.md | 2 +- src/librustdoc/clean/mod.rs | 2 +- src/librustdoc/html/render/write_shared.rs | 2 +- tests/crashes/114198.rs | 2 +- tests/rustdoc-html/reexport/alias-reexport.rs | 2 +- .../rustdoc-html/reexport/alias-reexport2.rs | 4 ++-- .../reexport/auxiliary/alias-reexport.rs | 2 +- .../reexport/auxiliary/alias-reexport2.rs | 2 +- tests/rustdoc-html/sidebar/top-toc-html.rs | 2 +- tests/rustdoc-html/sidebar/top-toc-idmap.rs | 2 +- .../typedef-inner-variants-lazy_type_alias.rs | 2 +- tests/ui/README.md | 8 +++---- .../multiple-candidates-in-adt-field-3.rs | 2 +- .../type-alias-bounds.stderr | 2 +- .../associated-type-bounds/type-alias.stderr | 24 +++++++++---------- .../auto-trait-impls.rs | 2 +- .../auto-trait-impls.stderr | 0 .../auxiliary/eager.rs | 0 .../auxiliary/lazy.rs | 2 +- .../bad-lazy-type-alias.rs | 2 +- .../bad-lazy-type-alias.stderr | 0 .../coerce-behind-lazy.rs | 2 +- .../constrained-late-bound-regions.rs | 2 +- .../constrained-params-in-impl.rs | 2 +- .../deep-expansion.rs | 2 +- .../def-site-body-wf.rs | 2 +- .../def-site-body-wf.stderr | 0 .../def-site-param-defaults-wf.rs | 2 +- .../def-site-param-defaults-wf.stderr | 0 .../def-site-predicates-wf.rs | 2 +- .../def-site-predicates-wf.stderr | 0 .../enum-variant.rs | 2 +- .../extern-crate-has-eager-type-aliases.rs | 13 +++++----- ...has-lazy-type-aliases.locally_eager.stderr | 0 ...-has-lazy-type-aliases.locally_lazy.stderr | 0 .../extern-crate-has-lazy-type-aliases.rs | 4 ++-- .../implied-outlives-bounds.neg.stderr | 0 .../implied-outlives-bounds.rs | 2 +- .../inherent-impls-conflicting.rs | 2 +- .../inherent-impls-conflicting.stderr | 0 .../inherent-impls-not-nominal.rs | 2 +- .../inherent-impls-not-nominal.stderr | 0 .../inherent-impls-overflow.current.stderr | 0 .../inherent-impls-overflow.next.stderr | 0 .../inherent-impls-overflow.rs | 2 +- .../inherent-impls.rs | 2 +- .../leading-where-clause.fixed | 2 +- .../leading-where-clause.rs | 2 +- .../leading-where-clause.stderr | 0 .../opaq-ty-collection-infinite-recur.rs | 2 +- .../opaq-ty-collection-infinite-recur.stderr | 0 .../trailing-where-clause.rs | 2 +- .../trailing-where-clause.stderr | 0 .../type-alias-bounds-are-enforced.rs | 4 ++-- .../unconstrained-late-bound-regions.rs | 2 +- .../unconstrained-late-bound-regions.stderr | 0 ...strained-params-in-impl-due-to-overflow.rs | 2 +- ...ined-params-in-impl-due-to-overflow.stderr | 0 .../unconstrained-params-in-impl.rs | 2 +- .../unconstrained-params-in-impl.stderr | 0 ...-arguments-not-wfchecked.next-fixed.stderr | 0 .../unused-generic-arguments-not-wfchecked.rs | 8 +++---- .../unused-generic-parameters.fail.stderr | 0 .../unused-generic-parameters.rs | 8 +++---- .../use-site-wf.rs | 2 +- .../use-site-wf.stderr | 0 .../variance-0.rs | 4 ++-- .../variance-1.rs | 4 ++-- .../variance-1.stderr | 0 .../variance-overflow.rs | 2 +- .../variance-overflow.stderr | 0 .../orphan-check-weak-aliases-covering.rs | 2 +- .../orphan-check-weak-aliases-not-covering.rs | 2 +- .../alias_const_param_ty-1.rs | 2 +- .../check_const_arg_type_in_free_alias.rs | 2 +- .../in-trait/alias-bounds-when-not-wf.rs | 2 +- .../infinite-type-alias-mutual-recursion.rs | 2 +- .../infinite/infinite-vec-type-recursion.rs | 2 +- .../impl-debug-for-alias-type.rs | 2 +- .../ui/privacy/private-in-public-warn.stderr | 4 ++-- .../privacy/reach-type-alias-issue-156778.rs | 2 +- .../next-solver/issue-118950-root-region.rs | 2 +- .../dont-ice-on-normalization-failure.rs | 2 +- ...rmalize-self-type-constrains-trait-args.rs | 4 ++-- .../coherence-alias-hang-with-region.rs | 2 +- .../overflow/coherence-alias-hang.rs | 2 +- .../type-alias-normalization.rs | 2 +- .../trivial-bounds-inconsistent.stderr | 2 +- .../recursive-lazy-type-alias-ice-152633.rs | 2 +- .../unresolved-assoc-ty-suggest-trait.rs | 2 +- ...0-type-alias-bound-diagnostic-crash.stderr | 2 +- tests/ui/type/type-alias-bounds.stderr | 18 +++++++------- .../where-clauses/cfg-attr-issue-138010-2.rs | 2 +- .../where-clause-placement-type-alias.stderr | 4 ++-- 115 files changed, 144 insertions(+), 140 deletions(-) rename tests/ui/{lazy-type-alias => checked-type-alias}/auto-trait-impls.rs (96%) rename tests/ui/{lazy-type-alias => checked-type-alias}/auto-trait-impls.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/auxiliary/eager.rs (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/auxiliary/lazy.rs (52%) rename tests/ui/{lazy-type-alias => checked-type-alias}/bad-lazy-type-alias.rs (89%) rename tests/ui/{lazy-type-alias => checked-type-alias}/bad-lazy-type-alias.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/coerce-behind-lazy.rs (87%) rename tests/ui/{lazy-type-alias => checked-type-alias}/constrained-late-bound-regions.rs (91%) rename tests/ui/{lazy-type-alias => checked-type-alias}/constrained-params-in-impl.rs (92%) rename tests/ui/{lazy-type-alias => checked-type-alias}/deep-expansion.rs (94%) rename tests/ui/{lazy-type-alias => checked-type-alias}/def-site-body-wf.rs (95%) rename tests/ui/{lazy-type-alias => checked-type-alias}/def-site-body-wf.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/def-site-param-defaults-wf.rs (91%) rename tests/ui/{lazy-type-alias => checked-type-alias}/def-site-param-defaults-wf.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/def-site-predicates-wf.rs (91%) rename tests/ui/{lazy-type-alias => checked-type-alias}/def-site-predicates-wf.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/enum-variant.rs (87%) rename tests/ui/{lazy-type-alias => checked-type-alias}/extern-crate-has-eager-type-aliases.rs (57%) rename tests/ui/{lazy-type-alias => checked-type-alias}/extern-crate-has-lazy-type-aliases.locally_eager.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/extern-crate-has-lazy-type-aliases.locally_lazy.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/extern-crate-has-lazy-type-aliases.rs (80%) rename tests/ui/{lazy-type-alias => checked-type-alias}/implied-outlives-bounds.neg.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/implied-outlives-bounds.rs (96%) rename tests/ui/{lazy-type-alias => checked-type-alias}/inherent-impls-conflicting.rs (84%) rename tests/ui/{lazy-type-alias => checked-type-alias}/inherent-impls-conflicting.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/inherent-impls-not-nominal.rs (87%) rename tests/ui/{lazy-type-alias => checked-type-alias}/inherent-impls-not-nominal.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/inherent-impls-overflow.current.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/inherent-impls-overflow.next.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/inherent-impls-overflow.rs (97%) rename tests/ui/{lazy-type-alias => checked-type-alias}/inherent-impls.rs (87%) rename tests/ui/{lazy-type-alias => checked-type-alias}/leading-where-clause.fixed (93%) rename tests/ui/{lazy-type-alias => checked-type-alias}/leading-where-clause.rs (95%) rename tests/ui/{lazy-type-alias => checked-type-alias}/leading-where-clause.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/opaq-ty-collection-infinite-recur.rs (96%) rename tests/ui/{lazy-type-alias => checked-type-alias}/opaq-ty-collection-infinite-recur.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/trailing-where-clause.rs (89%) rename tests/ui/{lazy-type-alias => checked-type-alias}/trailing-where-clause.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/type-alias-bounds-are-enforced.rs (69%) rename tests/ui/{lazy-type-alias => checked-type-alias}/unconstrained-late-bound-regions.rs (95%) rename tests/ui/{lazy-type-alias => checked-type-alias}/unconstrained-late-bound-regions.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/unconstrained-params-in-impl-due-to-overflow.rs (82%) rename tests/ui/{lazy-type-alias => checked-type-alias}/unconstrained-params-in-impl-due-to-overflow.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/unconstrained-params-in-impl.rs (89%) rename tests/ui/{lazy-type-alias => checked-type-alias}/unconstrained-params-in-impl.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/unused-generic-arguments-not-wfchecked.next-fixed.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/unused-generic-arguments-not-wfchecked.rs (77%) rename tests/ui/{lazy-type-alias => checked-type-alias}/unused-generic-parameters.fail.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/unused-generic-parameters.rs (80%) rename tests/ui/{lazy-type-alias => checked-type-alias}/use-site-wf.rs (92%) rename tests/ui/{lazy-type-alias => checked-type-alias}/use-site-wf.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/variance-0.rs (93%) rename tests/ui/{lazy-type-alias => checked-type-alias}/variance-1.rs (92%) rename tests/ui/{lazy-type-alias => checked-type-alias}/variance-1.stderr (100%) rename tests/ui/{lazy-type-alias => checked-type-alias}/variance-overflow.rs (96%) rename tests/ui/{lazy-type-alias => checked-type-alias}/variance-overflow.stderr (100%) diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs index 8b776edad4d6e..2b5e49794244d 100644 --- a/compiler/rustc_ast_passes/src/ast_validation.rs +++ b/compiler/rustc_ast_passes/src/ast_validation.rs @@ -1595,7 +1595,7 @@ impl Visitor<'_> for AstValidator<'_> { } self.check_type_no_bounds(bounds, "this context"); - if self.features.lazy_type_alias() { + if self.features.checked_type_aliases() { if let Err(err) = self.check_type_alias_where_clause_location(ty_alias) { self.dcx().emit_err(err); } diff --git a/compiler/rustc_ast_passes/src/diagnostics.rs b/compiler/rustc_ast_passes/src/diagnostics.rs index affe69bd7c5e8..0cf7ef5c1de19 100644 --- a/compiler/rustc_ast_passes/src/diagnostics.rs +++ b/compiler/rustc_ast_passes/src/diagnostics.rs @@ -743,7 +743,7 @@ pub(crate) struct FieldlessUnion { pub(crate) struct WhereClauseAfterTypeAlias { #[primary_span] pub span: Span, - #[help("add `#![feature(lazy_type_alias)]` to the crate attributes to enable")] + #[help("add `#![feature(checked_type_aliases)]` to the crate attributes to enable")] pub help: bool, } diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index 5320f46c8c314..6191269b24857 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -179,6 +179,8 @@ declare_features! ( (removed, issue_5723_bootstrap, "1.95.0", None, None), /// Lazily evaluate constants. This allows constants to depend on type parameters. (removed, lazy_normalization_consts, "1.56.0", Some(72219), Some("superseded by `generic_const_exprs`"), 88369), + /// Allow to have type alias types for inter-crate use. + (removed, lazy_type_alias, "1.72.0", Some(112792), Some("renamed to `checked_type_aliases`"), 158758), /// Changes `impl Trait` to capture all lifetimes in scope. (removed, lifetime_capture_rules_2024, "1.87.0", None, Some("unnecessary -- use edition 2024 instead"), 136787), /// Allows using the `#[link_args]` attribute. diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index 056ea889afe7b..6c74612fe50e3 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -456,6 +456,8 @@ declare_features! ( (unstable, cfg_version, "1.45.0", Some(64796)), /// Allows to use the `#[cfi_encoding = ""]` attribute. (unstable, cfi_encoding, "1.71.0", Some(89653)), + /// Allow to have type alias types for inter-crate use. + (incomplete, checked_type_aliases, "CURRENT_RUSTC_VERSION", Some(112792)), /// The `clflushopt` target feature on x86. (unstable, clflushopt_target_feature, "1.98.0", Some(157096)), /// Allows `for<...>` on closures and coroutines. @@ -609,8 +611,6 @@ declare_features! ( (unstable, lahfsahf_target_feature, "1.78.0", Some(150251)), /// Allows setting the threshold for the `large_assignments` lint. (unstable, large_assignments, "1.52.0", Some(83518)), - /// Allow to have type alias types for inter-crate use. - (incomplete, lazy_type_alias, "1.72.0", Some(112792)), /// Allows using `#[link(kind = "link-arg", name = "...")]` /// to pass custom arguments to the linker. (unstable, link_arg_attribute, "1.76.0", Some(99427)), diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index 574a2ad6d47f4..626529cb6fc5b 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -976,7 +976,7 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(), tcx.ensure_ok().predicates_of(def_id); let ty = tcx.type_of(def_id).instantiate_identity(); let span = tcx.def_span(def_id); - if tcx.type_alias_is_lazy(def_id) { + if tcx.type_alias_is_checked(def_id) { res = res.and(enter_wf_checking_ctxt(tcx, def_id, |wfcx| { let item_ty = wfcx.deeply_normalize(span, Some(WellFormedLoc::Ty(def_id)), ty); wfcx.register_wf_obligation( diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index c02db15d744de..77677d3f8d8a4 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -167,10 +167,10 @@ where let mut wfcx = WfCheckingCtxt { ocx, body_def_id, param_env }; - // As of now, bounds are only checked on lazy type aliases, they're ignored for most type + // As of now, bounds are only enforced on checked type aliases, they're ignored for most type // aliases. So, only check for false global bounds if we're not ignoring bounds altogether. let ignore_bounds = - tcx.def_kind(body_def_id) == DefKind::TyAlias && !tcx.type_alias_is_lazy(body_def_id); + tcx.def_kind(body_def_id) == DefKind::TyAlias && !tcx.type_alias_is_checked(body_def_id); if !ignore_bounds && !tcx.features().trivial_bounds() { wfcx.check_false_global_bounds() diff --git a/compiler/rustc_hir_analysis/src/collect.rs b/compiler/rustc_hir_analysis/src/collect.rs index 376fa8ee621f3..2c048c16baf13 100644 --- a/compiler/rustc_hir_analysis/src/collect.rs +++ b/compiler/rustc_hir_analysis/src/collect.rs @@ -63,7 +63,7 @@ pub(crate) fn provide(providers: &mut Providers) { type_of: type_of::type_of, type_of_opaque: type_of::type_of_opaque, type_of_opaque_hir_typeck: type_of::type_of_opaque_hir_typeck, - type_alias_is_lazy: type_of::type_alias_is_lazy, + type_alias_is_checked: type_of::type_alias_is_checked, item_bounds: item_bounds::item_bounds, explicit_item_bounds: item_bounds::explicit_item_bounds, item_self_bounds: item_bounds::item_self_bounds, diff --git a/compiler/rustc_hir_analysis/src/collect/type_of.rs b/compiler/rustc_hir_analysis/src/collect/type_of.rs index 59e1a2fc1aa43..68b7d50c2ee9b 100644 --- a/compiler/rustc_hir_analysis/src/collect/type_of.rs +++ b/compiler/rustc_hir_analysis/src/collect/type_of.rs @@ -539,9 +539,9 @@ fn check_feature_inherent_assoc_ty(tcx: TyCtxt<'_>, span: Span) { } } -pub(crate) fn type_alias_is_lazy<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> bool { +pub(crate) fn type_alias_is_checked<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> bool { use hir::intravisit::Visitor; - if tcx.features().lazy_type_alias() { + if tcx.features().checked_type_aliases() { return true; } struct HasTait; 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 71858951731e6..460ef9d56dee5 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs @@ -281,7 +281,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { let identically_named = suggested_name == assoc_ident.name; if let DefKind::TyAlias = tcx.def_kind(item_def_id) - && !tcx.type_alias_is_lazy(item_def_id) + && !tcx.type_alias_is_checked(item_def_id) { err.sugg = Some(diagnostics::AssocItemNotFoundSugg::SimilarInOtherTraitQPath { 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 5778a0f932374..d5ed9012fcaf3 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs @@ -1214,10 +1214,10 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { let args = self.lower_generic_args_of_path_segment(span, def_id, item_segment); if let DefKind::TyAlias = tcx.def_kind(def_id) - && tcx.type_alias_is_lazy(def_id) + && tcx.type_alias_is_checked(def_id) { // Type aliases defined in crates that have the - // feature `lazy_type_alias` enabled get encoded as a type alias that normalization will + // feature `checked_type_alias` enabled get encoded as a type alias that normalization will // then actually instantiate the where bounds of. let alias_ty = ty::AliasTy::new_from_args(tcx, ty::Free { def_id }, args); Ty::new_alias(tcx, ty::IsRigid::No, alias_ty) diff --git a/compiler/rustc_hir_analysis/src/outlives/implicit_infer.rs b/compiler/rustc_hir_analysis/src/outlives/implicit_infer.rs index b2deea63dfd16..239a900afb4cf 100644 --- a/compiler/rustc_hir_analysis/src/outlives/implicit_infer.rs +++ b/compiler/rustc_hir_analysis/src/outlives/implicit_infer.rs @@ -56,7 +56,7 @@ pub(super) fn infer_predicates( } } - DefKind::TyAlias if tcx.type_alias_is_lazy(item_did) => { + DefKind::TyAlias if tcx.type_alias_is_checked(item_did) => { insert_required_predicates_to_be_wf( tcx, tcx.type_of(item_did).instantiate_identity().skip_norm_wip(), diff --git a/compiler/rustc_hir_analysis/src/outlives/mod.rs b/compiler/rustc_hir_analysis/src/outlives/mod.rs index d155f4f98ad79..6cec89afde2fa 100644 --- a/compiler/rustc_hir_analysis/src/outlives/mod.rs +++ b/compiler/rustc_hir_analysis/src/outlives/mod.rs @@ -17,7 +17,7 @@ pub(super) fn inferred_outlives_of( let crate_map = tcx.inferred_outlives_crate(()); crate_map.predicates.get(&item_def_id.to_def_id()).copied().unwrap_or(&[]) } - DefKind::TyAlias if tcx.type_alias_is_lazy(item_def_id) => { + DefKind::TyAlias if tcx.type_alias_is_checked(item_def_id) => { let crate_map = tcx.inferred_outlives_crate(()); crate_map.predicates.get(&item_def_id.to_def_id()).copied().unwrap_or(&[]) } diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index ea0f8f22ab187..e21e306723d3e 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -1317,8 +1317,8 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds { return; } - // Bounds of lazy type aliases and TAITs are respected. - if cx.tcx.type_alias_is_lazy(item.owner_id) { + // Bounds of checked type aliases and TAITs are respected. + if cx.tcx.type_alias_is_checked(item.owner_id) { return; } diff --git a/compiler/rustc_lint/src/lints.rs b/compiler/rustc_lint/src/lints.rs index a9d67ff4a1d4e..7ea5635034a27 100644 --- a/compiler/rustc_lint/src/lints.rs +++ b/compiler/rustc_lint/src/lints.rs @@ -319,7 +319,7 @@ impl<'a> Diagnostic<'a, ()> for BuiltinTypeAliasBounds<'_> { see issue #112792 for more information" )); if self.enable_feat_help { - diag.help(msg!("add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics")); + diag.help(msg!("add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics")); } // We perform the walk in here instead of in `` to diff --git a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs index 798709d69d76e..a8c95ed943b9e 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs @@ -228,7 +228,7 @@ provide! { tcx, def_id, other, cdata, explicit_super_predicates_of => { table_defaulted_array } explicit_implied_predicates_of => { table_defaulted_array } type_of => { table } - type_alias_is_lazy => { table_direct } + type_alias_is_checked => { table_direct } variances_of => { table } fn_sig => { table } codegen_fn_attrs => { table } diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index cd5e343e08d1a..c1c16bf2dcd19 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -1579,9 +1579,9 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { } if let DefKind::TyAlias = def_kind { self.tables - .type_alias_is_lazy - .set(def_id.index, self.tcx.type_alias_is_lazy(def_id)); - if self.tcx.type_alias_is_lazy(def_id) { + .type_alias_is_checked + .set(def_id.index, self.tcx.type_alias_is_checked(def_id)); + if self.tcx.type_alias_is_checked(def_id) { record!(self.tables.args_known_to_outlive_alias_params[def_id] <- tcx.args_known_to_outlive_alias_params(def_id)); } } diff --git a/compiler/rustc_metadata/src/rmeta/mod.rs b/compiler/rustc_metadata/src/rmeta/mod.rs index cccd613aa8ac1..05d8c8e9077e3 100644 --- a/compiler/rustc_metadata/src/rmeta/mod.rs +++ b/compiler/rustc_metadata/src/rmeta/mod.rs @@ -385,7 +385,7 @@ define_tables! { - defaulted: intrinsic: Table>>, is_macro_rules: Table, - type_alias_is_lazy: Table, + type_alias_is_checked: Table, attr_flags: Table, // The u64 is the crate-local part of the DefPathHash. All hashes in this crate have the same // StableCrateId, so we omit encoding those into the table. diff --git a/compiler/rustc_middle/src/queries.rs b/compiler/rustc_middle/src/queries.rs index 05eb8727bafbd..41f267efb1d96 100644 --- a/compiler/rustc_middle/src/queries.rs +++ b/compiler/rustc_middle/src/queries.rs @@ -332,12 +332,12 @@ rustc_queries! { } } - /// Returns whether the type alias given by `DefId` is lazy. + /// Returns whether the type alias given by `DefId` is checked. /// /// I.e., if the type alias expands / ought to expand to a [free] [alias type] /// instead of the underlying aliased type. /// - /// Relevant for features `lazy_type_alias` and `type_alias_impl_trait`. + /// Relevant for features `checked_type_aliases` and `type_alias_impl_trait`. /// /// # Panics /// @@ -345,9 +345,9 @@ rustc_queries! { /// /// [free]: rustc_middle::ty::Free /// [alias type]: rustc_middle::ty::AliasTy - query type_alias_is_lazy(key: DefId) -> bool { + query type_alias_is_checked(key: DefId) -> bool { desc { - "computing whether the type alias `{path}` is lazy", + "computing whether the type alias `{path}` is checked", path = tcx.def_path_str(key), } separate_provide_extern diff --git a/compiler/rustc_next_trait_solver/src/solve/project_goals/free_alias.rs b/compiler/rustc_next_trait_solver/src/solve/project_goals/free_alias.rs index f96b794a64e31..c1867a224ac84 100644 --- a/compiler/rustc_next_trait_solver/src/solve/project_goals/free_alias.rs +++ b/compiler/rustc_next_trait_solver/src/solve/project_goals/free_alias.rs @@ -1,5 +1,5 @@ //! Computes a projection goal for inherent associated types, -//! `#![feature(lazy_type_alias)]` and `#![feature(type_alias_impl_trait)]`. +//! `#![feature(checked_type_aliases)]` and `#![feature(type_alias_impl_trait)]`. //! //! Since a free alias is never ambiguous, this just computes the `type_of` of //! the alias and registers the where-clauses of the type alias. diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 3b44015b4f452..8b30f63231ac1 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -608,6 +608,7 @@ symbols! { cfi, cfi_encoding, char, + checked_type_aliases, clflushopt_target_feature, client, clippy, diff --git a/compiler/rustc_trait_selection/src/traits/normalize.rs b/compiler/rustc_trait_selection/src/traits/normalize.rs index 2a28fab776a12..f2653cb9902e8 100644 --- a/compiler/rustc_trait_selection/src/traits/normalize.rs +++ b/compiler/rustc_trait_selection/src/traits/normalize.rs @@ -315,7 +315,7 @@ impl<'a, 'b, 'tcx> AssocTypeNormalizer<'a, 'b, 'tcx> { // placeholders as the trait solver does not expect to encounter escaping bound // vars in obligations. // - // FIXME(lazy_type_alias): Check how much this actually matters for perf before + // FIXME(checked_type_alias): Check how much this actually matters for perf before // stabilization. This is a bit weird and generally not how we handle binders in // the compiler so ideally we'd do the same boundvar->placeholder->boundvar dance // that other kinds of normalization do. diff --git a/src/doc/rustc-dev-guide/src/normalization.md b/src/doc/rustc-dev-guide/src/normalization.md index 6e98ff8f4b8a3..0a79d98c5db04 100644 --- a/src/doc/rustc-dev-guide/src/normalization.md +++ b/src/doc/rustc-dev-guide/src/normalization.md @@ -189,7 +189,7 @@ Secondly, instead of having normalization directly return the type specified in We do this so that normalization is idempotent/callers do not need to run it in a loop. ```rust -#![feature(lazy_type_alias)] +#![feature(checked_type_alias)] type Foo = Bar; type Bar = ::Item; diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index c7387bf157d10..02ff95dc313ea 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -2322,7 +2322,7 @@ pub(crate) fn clean_middle_ty<'tcx>( } ty::Alias(_, ty::AliasTy { kind: ty::Free { def_id }, args, .. }) => { - if cx.tcx.features().lazy_type_alias() { + if cx.tcx.features().checked_type_aliases() { // Free type alias `data` represents the `type X` in `type X = Y`. If we need `Y`, // we need to use `type_of`. let path = diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs index ad8c6588e521f..ad3c41bdd2180 100644 --- a/src/librustdoc/html/render/write_shared.rs +++ b/src/librustdoc/html/render/write_shared.rs @@ -887,7 +887,7 @@ impl<'item> DocVisitor<'item> for TypeImplCollector<'_, '_, 'item> { // Only include this impl if it actually unifies with this alias. // Synthetic impls are not included; those are also included in the HTML. // - // FIXME(lazy_type_alias): Once the feature is complete or stable, rewrite this + // FIXME(checked_type_alias): Once the feature is complete or stable, rewrite this // to use type unification. // Be aware of `tests/rustdoc-html/type-alias/deeply-nested-112515.rs` which might // regress. diff --git a/tests/crashes/114198.rs b/tests/crashes/114198.rs index 0f479b3615fb0..867439906d1ac 100644 --- a/tests/crashes/114198.rs +++ b/tests/crashes/114198.rs @@ -1,7 +1,7 @@ //@ known-bug: #114198 //@ compile-flags: -Zprint-mono-items -Clink-dead-code -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] impl Trait for Struct {} trait Trait { diff --git a/tests/rustdoc-html/reexport/alias-reexport.rs b/tests/rustdoc-html/reexport/alias-reexport.rs index 41f1f8df0f692..00459f0cc4513 100644 --- a/tests/rustdoc-html/reexport/alias-reexport.rs +++ b/tests/rustdoc-html/reexport/alias-reexport.rs @@ -2,7 +2,7 @@ //@ aux-build:alias-reexport2.rs #![crate_name = "foo"] -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] extern crate alias_reexport2; diff --git a/tests/rustdoc-html/reexport/alias-reexport2.rs b/tests/rustdoc-html/reexport/alias-reexport2.rs index 2fb69b922c8b3..7eb5b2f093976 100644 --- a/tests/rustdoc-html/reexport/alias-reexport2.rs +++ b/tests/rustdoc-html/reexport/alias-reexport2.rs @@ -1,8 +1,8 @@ -// gate-test-lazy_type_alias +// gate-test-checked_type_aliases //@ aux-build:alias-reexport.rs #![crate_name = "foo"] -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] extern crate alias_reexport; diff --git a/tests/rustdoc-html/reexport/auxiliary/alias-reexport.rs b/tests/rustdoc-html/reexport/auxiliary/alias-reexport.rs index 14fafc02d3661..b565a18f0557e 100644 --- a/tests/rustdoc-html/reexport/auxiliary/alias-reexport.rs +++ b/tests/rustdoc-html/reexport/auxiliary/alias-reexport.rs @@ -1,3 +1,3 @@ -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] pub type Reexported = u8; diff --git a/tests/rustdoc-html/reexport/auxiliary/alias-reexport2.rs b/tests/rustdoc-html/reexport/auxiliary/alias-reexport2.rs index ee1f242c1d4ca..af1778c1d3e08 100644 --- a/tests/rustdoc-html/reexport/auxiliary/alias-reexport2.rs +++ b/tests/rustdoc-html/reexport/auxiliary/alias-reexport2.rs @@ -1,4 +1,4 @@ -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] extern crate alias_reexport; diff --git a/tests/rustdoc-html/sidebar/top-toc-html.rs b/tests/rustdoc-html/sidebar/top-toc-html.rs index 0f60396043475..d3433467c8e12 100644 --- a/tests/rustdoc-html/sidebar/top-toc-html.rs +++ b/tests/rustdoc-html/sidebar/top-toc-html.rs @@ -1,7 +1,7 @@ // ignore-tidy-linelength #![crate_name = "foo"] -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] //! # Basic [link](https://example.com), *emphasis*, **_very emphasis_** and `code` diff --git a/tests/rustdoc-html/sidebar/top-toc-idmap.rs b/tests/rustdoc-html/sidebar/top-toc-idmap.rs index af07cb4179b1f..8eaa03a221a70 100644 --- a/tests/rustdoc-html/sidebar/top-toc-idmap.rs +++ b/tests/rustdoc-html/sidebar/top-toc-idmap.rs @@ -1,5 +1,5 @@ #![crate_name = "foo"] -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] //! # Structs diff --git a/tests/rustdoc-html/typedef-inner-variants-lazy_type_alias.rs b/tests/rustdoc-html/typedef-inner-variants-lazy_type_alias.rs index c6bfe495bb0cc..53203504fd225 100644 --- a/tests/rustdoc-html/typedef-inner-variants-lazy_type_alias.rs +++ b/tests/rustdoc-html/typedef-inner-variants-lazy_type_alias.rs @@ -1,6 +1,6 @@ #![crate_name = "inner_types_lazy"] -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] //@ has 'inner_types_lazy/struct.Pair.html' diff --git a/tests/ui/README.md b/tests/ui/README.md index 85a5e6e0cbe1c..b0100dc3ac6b2 100644 --- a/tests/ui/README.md +++ b/tests/ui/README.md @@ -216,6 +216,10 @@ Tests for the `--check-cfg` compiler mechanism for checking cfg configurations, See [Checking conditional configurations | The rustc book](https://doc.rust-lang.org/rustc/check-cfg.html). +## `tests/ui/checked-type-alias/` + +Tests for `#![feature(checked_type_aliases)]`. See [Tracking issue for checked type aliases](https://github.com/rust-lang/rust/issues/112792). + ## `tests/ui/closure-expected-type/`: Closure type inference Tests targeted at how we deduce the types of closure arguments. This process is a result of some heuristics which take into account the *expected type* we have alongside the *actual types* that we get from inputs. @@ -800,10 +804,6 @@ See [Early vs Late bound parameters | rustc-dev-guide](https://rustc-dev-guide.r See [Type Layout | Reference](https://doc.rust-lang.org/reference/type-layout.html). -## `tests/ui/lazy-type-alias/` - -Tests for `#![feature(lazy_type_alias)]`. See [Tracking issue for lazy type aliases #112792](https://github.com/rust-lang/rust/issues/112792). - ## `tests/ui/lazy-type-alias-impl-trait/` This feature allows use of an `impl Trait` in multiple locations while actually using the same concrete type (`type Alias = impl Trait;`) everywhere, keeping the original `impl Trait` hidden. diff --git a/tests/ui/associated-inherent-types/multiple-candidates-in-adt-field-3.rs b/tests/ui/associated-inherent-types/multiple-candidates-in-adt-field-3.rs index 4c5b382463d54..49ef0061631d6 100644 --- a/tests/ui/associated-inherent-types/multiple-candidates-in-adt-field-3.rs +++ b/tests/ui/associated-inherent-types/multiple-candidates-in-adt-field-3.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(inherent_associated_types, lazy_type_alias)] +#![feature(inherent_associated_types, checked_type_aliases)] #![expect(incomplete_features)] // Test that we *do* normalize free aliases in order to resolve diff --git a/tests/ui/associated-inherent-types/type-alias-bounds.stderr b/tests/ui/associated-inherent-types/type-alias-bounds.stderr index 7a74f7bb18fc8..2173a2a2e3497 100644 --- a/tests/ui/associated-inherent-types/type-alias-bounds.stderr +++ b/tests/ui/associated-inherent-types/type-alias-bounds.stderr @@ -6,7 +6,7 @@ LL | pub type Alias = (Source::Assoc,); | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics = note: `#[warn(type_alias_bounds)]` on by default help: remove this bound | diff --git a/tests/ui/associated-type-bounds/type-alias.stderr b/tests/ui/associated-type-bounds/type-alias.stderr index 3e9b593a6b9e6..a274bca5b6ae5 100644 --- a/tests/ui/associated-type-bounds/type-alias.stderr +++ b/tests/ui/associated-type-bounds/type-alias.stderr @@ -6,7 +6,7 @@ LL | type _TaWhere1 where T: Iterator = T; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics = note: `#[warn(type_alias_bounds)]` on by default help: remove this where clause | @@ -22,7 +22,7 @@ LL | type _TaWhere2 where T: Iterator = T; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this where clause | LL - type _TaWhere2 where T: Iterator = T; @@ -37,7 +37,7 @@ LL | type _TaWhere3 where T: Iterator = T; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this where clause | LL - type _TaWhere3 where T: Iterator = T; @@ -52,7 +52,7 @@ LL | type _TaWhere4 where T: Iterator = T; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this where clause | LL - type _TaWhere4 where T: Iterator = T; @@ -67,7 +67,7 @@ LL | type _TaWhere5 where T: Iterator Into<&'a u8>> = T; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this where clause | LL - type _TaWhere5 where T: Iterator Into<&'a u8>> = T; @@ -82,7 +82,7 @@ LL | type _TaWhere6 where T: Iterator> = T; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this where clause | LL - type _TaWhere6 where T: Iterator> = T; @@ -97,7 +97,7 @@ LL | type _TaInline1> = T; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this bound | LL - type _TaInline1> = T; @@ -112,7 +112,7 @@ LL | type _TaInline2> = T; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this bound | LL - type _TaInline2> = T; @@ -127,7 +127,7 @@ LL | type _TaInline3> = T; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this bound | LL - type _TaInline3> = T; @@ -142,7 +142,7 @@ LL | type _TaInline4> = T; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this bound | LL - type _TaInline4> = T; @@ -157,7 +157,7 @@ LL | type _TaInline5 Into<&'a u8>>> = T; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this bound | LL - type _TaInline5 Into<&'a u8>>> = T; @@ -172,7 +172,7 @@ LL | type _TaInline6>> = T; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this bound | LL - type _TaInline6>> = T; diff --git a/tests/ui/lazy-type-alias/auto-trait-impls.rs b/tests/ui/checked-type-alias/auto-trait-impls.rs similarity index 96% rename from tests/ui/lazy-type-alias/auto-trait-impls.rs rename to tests/ui/checked-type-alias/auto-trait-impls.rs index e5d9c988f0d5f..978143ef7cf56 100644 --- a/tests/ui/lazy-type-alias/auto-trait-impls.rs +++ b/tests/ui/checked-type-alias/auto-trait-impls.rs @@ -5,7 +5,7 @@ //! //! Regression test for . -#![feature(lazy_type_alias, auto_traits, negative_impls)] +#![feature(checked_type_aliases, auto_traits, negative_impls)] #![allow(incomplete_features)] struct Local; diff --git a/tests/ui/lazy-type-alias/auto-trait-impls.stderr b/tests/ui/checked-type-alias/auto-trait-impls.stderr similarity index 100% rename from tests/ui/lazy-type-alias/auto-trait-impls.stderr rename to tests/ui/checked-type-alias/auto-trait-impls.stderr diff --git a/tests/ui/lazy-type-alias/auxiliary/eager.rs b/tests/ui/checked-type-alias/auxiliary/eager.rs similarity index 100% rename from tests/ui/lazy-type-alias/auxiliary/eager.rs rename to tests/ui/checked-type-alias/auxiliary/eager.rs diff --git a/tests/ui/lazy-type-alias/auxiliary/lazy.rs b/tests/ui/checked-type-alias/auxiliary/lazy.rs similarity index 52% rename from tests/ui/lazy-type-alias/auxiliary/lazy.rs rename to tests/ui/checked-type-alias/auxiliary/lazy.rs index 2b678226a8ac8..21d768ae0e53a 100644 --- a/tests/ui/lazy-type-alias/auxiliary/lazy.rs +++ b/tests/ui/checked-type-alias/auxiliary/lazy.rs @@ -1,3 +1,3 @@ -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] pub type Alias = Option; diff --git a/tests/ui/lazy-type-alias/bad-lazy-type-alias.rs b/tests/ui/checked-type-alias/bad-lazy-type-alias.rs similarity index 89% rename from tests/ui/lazy-type-alias/bad-lazy-type-alias.rs rename to tests/ui/checked-type-alias/bad-lazy-type-alias.rs index e9e7de84a7a46..2031a9a84d68f 100644 --- a/tests/ui/lazy-type-alias/bad-lazy-type-alias.rs +++ b/tests/ui/checked-type-alias/bad-lazy-type-alias.rs @@ -1,6 +1,6 @@ // regression test for #127351 -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] type ExplicitTypeOutlives = T; diff --git a/tests/ui/lazy-type-alias/bad-lazy-type-alias.stderr b/tests/ui/checked-type-alias/bad-lazy-type-alias.stderr similarity index 100% rename from tests/ui/lazy-type-alias/bad-lazy-type-alias.stderr rename to tests/ui/checked-type-alias/bad-lazy-type-alias.stderr diff --git a/tests/ui/lazy-type-alias/coerce-behind-lazy.rs b/tests/ui/checked-type-alias/coerce-behind-lazy.rs similarity index 87% rename from tests/ui/lazy-type-alias/coerce-behind-lazy.rs rename to tests/ui/checked-type-alias/coerce-behind-lazy.rs index a69e39b02b32f..80b92b980008e 100644 --- a/tests/ui/lazy-type-alias/coerce-behind-lazy.rs +++ b/tests/ui/checked-type-alias/coerce-behind-lazy.rs @@ -3,7 +3,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] use std::any::Any; diff --git a/tests/ui/lazy-type-alias/constrained-late-bound-regions.rs b/tests/ui/checked-type-alias/constrained-late-bound-regions.rs similarity index 91% rename from tests/ui/lazy-type-alias/constrained-late-bound-regions.rs rename to tests/ui/checked-type-alias/constrained-late-bound-regions.rs index e759e72d745a1..140cfbdc8c1c0 100644 --- a/tests/ui/lazy-type-alias/constrained-late-bound-regions.rs +++ b/tests/ui/checked-type-alias/constrained-late-bound-regions.rs @@ -1,7 +1,7 @@ //@ check-pass // Weak alias types constrain late-bound regions if their normalized form constrains them. -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] type Ref<'a> = &'a (); diff --git a/tests/ui/lazy-type-alias/constrained-params-in-impl.rs b/tests/ui/checked-type-alias/constrained-params-in-impl.rs similarity index 92% rename from tests/ui/lazy-type-alias/constrained-params-in-impl.rs rename to tests/ui/checked-type-alias/constrained-params-in-impl.rs index 59693dd5461e9..cd7a4a60fa46a 100644 --- a/tests/ui/lazy-type-alias/constrained-params-in-impl.rs +++ b/tests/ui/checked-type-alias/constrained-params-in-impl.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] type Injective = Local; diff --git a/tests/ui/lazy-type-alias/deep-expansion.rs b/tests/ui/checked-type-alias/deep-expansion.rs similarity index 94% rename from tests/ui/lazy-type-alias/deep-expansion.rs rename to tests/ui/checked-type-alias/deep-expansion.rs index c4461abdb8143..730edcbe1d566 100644 --- a/tests/ui/lazy-type-alias/deep-expansion.rs +++ b/tests/ui/checked-type-alias/deep-expansion.rs @@ -4,7 +4,7 @@ // // issue: //@ check-pass -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![expect(incomplete_features)] type T0 = (T1, T1, T1, T1); diff --git a/tests/ui/lazy-type-alias/def-site-body-wf.rs b/tests/ui/checked-type-alias/def-site-body-wf.rs similarity index 95% rename from tests/ui/lazy-type-alias/def-site-body-wf.rs rename to tests/ui/checked-type-alias/def-site-body-wf.rs index 9287cb461195a..853080e3564b3 100644 --- a/tests/ui/lazy-type-alias/def-site-body-wf.rs +++ b/tests/ui/checked-type-alias/def-site-body-wf.rs @@ -1,7 +1,7 @@ // Test that we check the body at the definition site for well-formedness. // Compare with `tests/ui/type-alias/lack-of-wfcheck.rs`. -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] // unsatisified trait bounds type _A = ::Output; //~ ERROR cannot multiply `T` by `T` diff --git a/tests/ui/lazy-type-alias/def-site-body-wf.stderr b/tests/ui/checked-type-alias/def-site-body-wf.stderr similarity index 100% rename from tests/ui/lazy-type-alias/def-site-body-wf.stderr rename to tests/ui/checked-type-alias/def-site-body-wf.stderr diff --git a/tests/ui/lazy-type-alias/def-site-param-defaults-wf.rs b/tests/ui/checked-type-alias/def-site-param-defaults-wf.rs similarity index 91% rename from tests/ui/lazy-type-alias/def-site-param-defaults-wf.rs rename to tests/ui/checked-type-alias/def-site-param-defaults-wf.rs index 7f417de5fd33d..7eb5c0f44ff84 100644 --- a/tests/ui/lazy-type-alias/def-site-param-defaults-wf.rs +++ b/tests/ui/checked-type-alias/def-site-param-defaults-wf.rs @@ -1,5 +1,5 @@ //! Ensure that we check generic parameter defaults for well-formedness at the definition site. -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] type Alias, const N: usize = { 0 - 1 }> = T; diff --git a/tests/ui/lazy-type-alias/def-site-param-defaults-wf.stderr b/tests/ui/checked-type-alias/def-site-param-defaults-wf.stderr similarity index 100% rename from tests/ui/lazy-type-alias/def-site-param-defaults-wf.stderr rename to tests/ui/checked-type-alias/def-site-param-defaults-wf.stderr diff --git a/tests/ui/lazy-type-alias/def-site-predicates-wf.rs b/tests/ui/checked-type-alias/def-site-predicates-wf.rs similarity index 91% rename from tests/ui/lazy-type-alias/def-site-predicates-wf.rs rename to tests/ui/checked-type-alias/def-site-predicates-wf.rs index 5d9235347cb82..2f1f939459856 100644 --- a/tests/ui/lazy-type-alias/def-site-predicates-wf.rs +++ b/tests/ui/checked-type-alias/def-site-predicates-wf.rs @@ -1,5 +1,5 @@ //! Ensure that we check the predicates at the definition site for well-formedness. -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] type Alias0 = () diff --git a/tests/ui/lazy-type-alias/def-site-predicates-wf.stderr b/tests/ui/checked-type-alias/def-site-predicates-wf.stderr similarity index 100% rename from tests/ui/lazy-type-alias/def-site-predicates-wf.stderr rename to tests/ui/checked-type-alias/def-site-predicates-wf.stderr diff --git a/tests/ui/lazy-type-alias/enum-variant.rs b/tests/ui/checked-type-alias/enum-variant.rs similarity index 87% rename from tests/ui/lazy-type-alias/enum-variant.rs rename to tests/ui/checked-type-alias/enum-variant.rs index 236e1933a8a93..6d4d0c0b70976 100644 --- a/tests/ui/lazy-type-alias/enum-variant.rs +++ b/tests/ui/checked-type-alias/enum-variant.rs @@ -1,7 +1,7 @@ // Regression test for issue #113736. //@ check-pass -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] enum Enum { Unit, diff --git a/tests/ui/lazy-type-alias/extern-crate-has-eager-type-aliases.rs b/tests/ui/checked-type-alias/extern-crate-has-eager-type-aliases.rs similarity index 57% rename from tests/ui/lazy-type-alias/extern-crate-has-eager-type-aliases.rs rename to tests/ui/checked-type-alias/extern-crate-has-eager-type-aliases.rs index 3384698776056..52e1736975f46 100644 --- a/tests/ui/lazy-type-alias/extern-crate-has-eager-type-aliases.rs +++ b/tests/ui/checked-type-alias/extern-crate-has-eager-type-aliases.rs @@ -1,18 +1,19 @@ // This test serves as a regression test for issue #114468 and it also ensures that we consider -// type aliases from external crates that don't have `lazy_type_alias` enabled to be eager. +// type aliases from external crates that don't have `checked_type_aliases` +// enabled to be eager. //@ aux-crate:eager=eager.rs //@ edition: 2021 //@ check-pass -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] // This used to crash when we were computing the variances of `Struct` since we would convert -// `eager::Alias` to a weak alias due to the presence of `#![feature(lazy_type_alias)]` in -// this (!) crate and subsequently attempt to obtain the variances of the type alias associated with -// the weak alias which would panic because we don't compute this information for eager type -// aliases at all. +// `eager::Alias` to a weak alias due to the presence of +// `#![feature(checked_type_aliases)]` in this (!) crate and subsequently attempt to +// obtain the variances of the type alias associated with the weak alias which would +// panic because we don't compute this information for eager type aliases at all. struct Struct(eager::Alias); fn main() { diff --git a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_eager.stderr b/tests/ui/checked-type-alias/extern-crate-has-lazy-type-aliases.locally_eager.stderr similarity index 100% rename from tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_eager.stderr rename to tests/ui/checked-type-alias/extern-crate-has-lazy-type-aliases.locally_eager.stderr diff --git a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_lazy.stderr b/tests/ui/checked-type-alias/extern-crate-has-lazy-type-aliases.locally_lazy.stderr similarity index 100% rename from tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_lazy.stderr rename to tests/ui/checked-type-alias/extern-crate-has-lazy-type-aliases.locally_lazy.stderr diff --git a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs b/tests/ui/checked-type-alias/extern-crate-has-lazy-type-aliases.rs similarity index 80% rename from tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs rename to tests/ui/checked-type-alias/extern-crate-has-lazy-type-aliases.rs index 07490ad45e001..d8bf559690747 100644 --- a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs +++ b/tests/ui/checked-type-alias/extern-crate-has-lazy-type-aliases.rs @@ -3,11 +3,11 @@ //@ edition: 2021 // Test that we treat lazy type aliases from external crates as lazy independently of whether the -// local crate enables `lazy_type_alias` or not. +// local crate enables `checked_type_aliases` or not. #![cfg_attr( locally_lazy, - feature(lazy_type_alias), + feature(checked_type_aliases), allow(incomplete_features) )] diff --git a/tests/ui/lazy-type-alias/implied-outlives-bounds.neg.stderr b/tests/ui/checked-type-alias/implied-outlives-bounds.neg.stderr similarity index 100% rename from tests/ui/lazy-type-alias/implied-outlives-bounds.neg.stderr rename to tests/ui/checked-type-alias/implied-outlives-bounds.neg.stderr diff --git a/tests/ui/lazy-type-alias/implied-outlives-bounds.rs b/tests/ui/checked-type-alias/implied-outlives-bounds.rs similarity index 96% rename from tests/ui/lazy-type-alias/implied-outlives-bounds.rs rename to tests/ui/checked-type-alias/implied-outlives-bounds.rs index 804801ed591b4..50cbb136411ee 100644 --- a/tests/ui/lazy-type-alias/implied-outlives-bounds.rs +++ b/tests/ui/checked-type-alias/implied-outlives-bounds.rs @@ -3,7 +3,7 @@ //@ revisions: pos neg //@[pos] check-pass -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] type TypeOutlives<'a, T> = &'a T; diff --git a/tests/ui/lazy-type-alias/inherent-impls-conflicting.rs b/tests/ui/checked-type-alias/inherent-impls-conflicting.rs similarity index 84% rename from tests/ui/lazy-type-alias/inherent-impls-conflicting.rs rename to tests/ui/checked-type-alias/inherent-impls-conflicting.rs index 2adb04839ae2e..0680b846d97a0 100644 --- a/tests/ui/lazy-type-alias/inherent-impls-conflicting.rs +++ b/tests/ui/checked-type-alias/inherent-impls-conflicting.rs @@ -1,4 +1,4 @@ -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] type Alias = Local; diff --git a/tests/ui/lazy-type-alias/inherent-impls-conflicting.stderr b/tests/ui/checked-type-alias/inherent-impls-conflicting.stderr similarity index 100% rename from tests/ui/lazy-type-alias/inherent-impls-conflicting.stderr rename to tests/ui/checked-type-alias/inherent-impls-conflicting.stderr diff --git a/tests/ui/lazy-type-alias/inherent-impls-not-nominal.rs b/tests/ui/checked-type-alias/inherent-impls-not-nominal.rs similarity index 87% rename from tests/ui/lazy-type-alias/inherent-impls-not-nominal.rs rename to tests/ui/checked-type-alias/inherent-impls-not-nominal.rs index 0ec23bb7fb757..355b55b646f5c 100644 --- a/tests/ui/lazy-type-alias/inherent-impls-not-nominal.rs +++ b/tests/ui/checked-type-alias/inherent-impls-not-nominal.rs @@ -1,4 +1,4 @@ -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] type Alias = <() as Trait>::Out; diff --git a/tests/ui/lazy-type-alias/inherent-impls-not-nominal.stderr b/tests/ui/checked-type-alias/inherent-impls-not-nominal.stderr similarity index 100% rename from tests/ui/lazy-type-alias/inherent-impls-not-nominal.stderr rename to tests/ui/checked-type-alias/inherent-impls-not-nominal.stderr diff --git a/tests/ui/lazy-type-alias/inherent-impls-overflow.current.stderr b/tests/ui/checked-type-alias/inherent-impls-overflow.current.stderr similarity index 100% rename from tests/ui/lazy-type-alias/inherent-impls-overflow.current.stderr rename to tests/ui/checked-type-alias/inherent-impls-overflow.current.stderr diff --git a/tests/ui/lazy-type-alias/inherent-impls-overflow.next.stderr b/tests/ui/checked-type-alias/inherent-impls-overflow.next.stderr similarity index 100% rename from tests/ui/lazy-type-alias/inherent-impls-overflow.next.stderr rename to tests/ui/checked-type-alias/inherent-impls-overflow.next.stderr diff --git a/tests/ui/lazy-type-alias/inherent-impls-overflow.rs b/tests/ui/checked-type-alias/inherent-impls-overflow.rs similarity index 97% rename from tests/ui/lazy-type-alias/inherent-impls-overflow.rs rename to tests/ui/checked-type-alias/inherent-impls-overflow.rs index 6ee4f6b943a22..bb61bea5a5a7d 100644 --- a/tests/ui/lazy-type-alias/inherent-impls-overflow.rs +++ b/tests/ui/checked-type-alias/inherent-impls-overflow.rs @@ -2,7 +2,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] type Loop = Loop; diff --git a/tests/ui/lazy-type-alias/inherent-impls.rs b/tests/ui/checked-type-alias/inherent-impls.rs similarity index 87% rename from tests/ui/lazy-type-alias/inherent-impls.rs rename to tests/ui/checked-type-alias/inherent-impls.rs index 835b70bf67a21..d656a25018923 100644 --- a/tests/ui/lazy-type-alias/inherent-impls.rs +++ b/tests/ui/checked-type-alias/inherent-impls.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] type Alias = Local; diff --git a/tests/ui/lazy-type-alias/leading-where-clause.fixed b/tests/ui/checked-type-alias/leading-where-clause.fixed similarity index 93% rename from tests/ui/lazy-type-alias/leading-where-clause.fixed rename to tests/ui/checked-type-alias/leading-where-clause.fixed index 003eaa6c54e24..8b681d3bee09d 100644 --- a/tests/ui/lazy-type-alias/leading-where-clause.fixed +++ b/tests/ui/checked-type-alias/leading-where-clause.fixed @@ -1,6 +1,6 @@ //@ run-rustfix -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] #![crate_type = "lib"] diff --git a/tests/ui/lazy-type-alias/leading-where-clause.rs b/tests/ui/checked-type-alias/leading-where-clause.rs similarity index 95% rename from tests/ui/lazy-type-alias/leading-where-clause.rs rename to tests/ui/checked-type-alias/leading-where-clause.rs index 460f7e3a9994d..98aa8066c2ea1 100644 --- a/tests/ui/lazy-type-alias/leading-where-clause.rs +++ b/tests/ui/checked-type-alias/leading-where-clause.rs @@ -1,6 +1,6 @@ //@ run-rustfix -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] #![crate_type = "lib"] diff --git a/tests/ui/lazy-type-alias/leading-where-clause.stderr b/tests/ui/checked-type-alias/leading-where-clause.stderr similarity index 100% rename from tests/ui/lazy-type-alias/leading-where-clause.stderr rename to tests/ui/checked-type-alias/leading-where-clause.stderr diff --git a/tests/ui/lazy-type-alias/opaq-ty-collection-infinite-recur.rs b/tests/ui/checked-type-alias/opaq-ty-collection-infinite-recur.rs similarity index 96% rename from tests/ui/lazy-type-alias/opaq-ty-collection-infinite-recur.rs rename to tests/ui/checked-type-alias/opaq-ty-collection-infinite-recur.rs index 34803c8c1034b..79ed8e555eb06 100644 --- a/tests/ui/lazy-type-alias/opaq-ty-collection-infinite-recur.rs +++ b/tests/ui/checked-type-alias/opaq-ty-collection-infinite-recur.rs @@ -10,7 +10,7 @@ // meaning we get there before we wfcheck `Recur`. // // issue: -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![expect(incomplete_features)] struct Hold([(); { type Recur = Recur; 0 }]); //~ ERROR overflow normalizing the type alias `Recur` diff --git a/tests/ui/lazy-type-alias/opaq-ty-collection-infinite-recur.stderr b/tests/ui/checked-type-alias/opaq-ty-collection-infinite-recur.stderr similarity index 100% rename from tests/ui/lazy-type-alias/opaq-ty-collection-infinite-recur.stderr rename to tests/ui/checked-type-alias/opaq-ty-collection-infinite-recur.stderr diff --git a/tests/ui/lazy-type-alias/trailing-where-clause.rs b/tests/ui/checked-type-alias/trailing-where-clause.rs similarity index 89% rename from tests/ui/lazy-type-alias/trailing-where-clause.rs rename to tests/ui/checked-type-alias/trailing-where-clause.rs index ac9598fe5f6aa..08e558306a02b 100644 --- a/tests/ui/lazy-type-alias/trailing-where-clause.rs +++ b/tests/ui/checked-type-alias/trailing-where-clause.rs @@ -1,4 +1,4 @@ -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] // Check that we allow & respect trailing where-clauses on lazy type aliases. diff --git a/tests/ui/lazy-type-alias/trailing-where-clause.stderr b/tests/ui/checked-type-alias/trailing-where-clause.stderr similarity index 100% rename from tests/ui/lazy-type-alias/trailing-where-clause.stderr rename to tests/ui/checked-type-alias/trailing-where-clause.stderr diff --git a/tests/ui/lazy-type-alias/type-alias-bounds-are-enforced.rs b/tests/ui/checked-type-alias/type-alias-bounds-are-enforced.rs similarity index 69% rename from tests/ui/lazy-type-alias/type-alias-bounds-are-enforced.rs rename to tests/ui/checked-type-alias/type-alias-bounds-are-enforced.rs index f42ed64684f70..061ca36089f35 100644 --- a/tests/ui/lazy-type-alias/type-alias-bounds-are-enforced.rs +++ b/tests/ui/checked-type-alias/type-alias-bounds-are-enforced.rs @@ -1,9 +1,9 @@ // Check that we don't issue the lint `type_alias_bounds` for -// lazy type aliases since the bounds are indeed enforced. +// free type aliases since the bounds are indeed enforced. //@ check-pass -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] #![deny(type_alias_bounds)] diff --git a/tests/ui/lazy-type-alias/unconstrained-late-bound-regions.rs b/tests/ui/checked-type-alias/unconstrained-late-bound-regions.rs similarity index 95% rename from tests/ui/lazy-type-alias/unconstrained-late-bound-regions.rs rename to tests/ui/checked-type-alias/unconstrained-late-bound-regions.rs index 844570e22d275..ac3b56a542825 100644 --- a/tests/ui/lazy-type-alias/unconstrained-late-bound-regions.rs +++ b/tests/ui/checked-type-alias/unconstrained-late-bound-regions.rs @@ -1,6 +1,6 @@ // Weak alias types only constrain late-bound regions if their normalized form constrains them. -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] type NotInjective<'a> = <() as Discard>::Output<'a>; diff --git a/tests/ui/lazy-type-alias/unconstrained-late-bound-regions.stderr b/tests/ui/checked-type-alias/unconstrained-late-bound-regions.stderr similarity index 100% rename from tests/ui/lazy-type-alias/unconstrained-late-bound-regions.stderr rename to tests/ui/checked-type-alias/unconstrained-late-bound-regions.stderr diff --git a/tests/ui/lazy-type-alias/unconstrained-params-in-impl-due-to-overflow.rs b/tests/ui/checked-type-alias/unconstrained-params-in-impl-due-to-overflow.rs similarity index 82% rename from tests/ui/lazy-type-alias/unconstrained-params-in-impl-due-to-overflow.rs rename to tests/ui/checked-type-alias/unconstrained-params-in-impl-due-to-overflow.rs index 7bc91ef426b6c..41ffb76672f99 100644 --- a/tests/ui/lazy-type-alias/unconstrained-params-in-impl-due-to-overflow.rs +++ b/tests/ui/checked-type-alias/unconstrained-params-in-impl-due-to-overflow.rs @@ -1,4 +1,4 @@ -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] impl Loop {} //~ ERROR the type parameter `T` is not constrained diff --git a/tests/ui/lazy-type-alias/unconstrained-params-in-impl-due-to-overflow.stderr b/tests/ui/checked-type-alias/unconstrained-params-in-impl-due-to-overflow.stderr similarity index 100% rename from tests/ui/lazy-type-alias/unconstrained-params-in-impl-due-to-overflow.stderr rename to tests/ui/checked-type-alias/unconstrained-params-in-impl-due-to-overflow.stderr diff --git a/tests/ui/lazy-type-alias/unconstrained-params-in-impl.rs b/tests/ui/checked-type-alias/unconstrained-params-in-impl.rs similarity index 89% rename from tests/ui/lazy-type-alias/unconstrained-params-in-impl.rs rename to tests/ui/checked-type-alias/unconstrained-params-in-impl.rs index d58938b30701c..9f40ac11220c0 100644 --- a/tests/ui/lazy-type-alias/unconstrained-params-in-impl.rs +++ b/tests/ui/checked-type-alias/unconstrained-params-in-impl.rs @@ -1,4 +1,4 @@ -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] impl NotInjective {} //~ ERROR the type parameter `T` is not constrained diff --git a/tests/ui/lazy-type-alias/unconstrained-params-in-impl.stderr b/tests/ui/checked-type-alias/unconstrained-params-in-impl.stderr similarity index 100% rename from tests/ui/lazy-type-alias/unconstrained-params-in-impl.stderr rename to tests/ui/checked-type-alias/unconstrained-params-in-impl.stderr diff --git a/tests/ui/lazy-type-alias/unused-generic-arguments-not-wfchecked.next-fixed.stderr b/tests/ui/checked-type-alias/unused-generic-arguments-not-wfchecked.next-fixed.stderr similarity index 100% rename from tests/ui/lazy-type-alias/unused-generic-arguments-not-wfchecked.next-fixed.stderr rename to tests/ui/checked-type-alias/unused-generic-arguments-not-wfchecked.next-fixed.stderr diff --git a/tests/ui/lazy-type-alias/unused-generic-arguments-not-wfchecked.rs b/tests/ui/checked-type-alias/unused-generic-arguments-not-wfchecked.rs similarity index 77% rename from tests/ui/lazy-type-alias/unused-generic-arguments-not-wfchecked.rs rename to tests/ui/checked-type-alias/unused-generic-arguments-not-wfchecked.rs index eeabe85d82734..393f8dfab2077 100644 --- a/tests/ui/lazy-type-alias/unused-generic-arguments-not-wfchecked.rs +++ b/tests/ui/checked-type-alias/unused-generic-arguments-not-wfchecked.rs @@ -4,9 +4,9 @@ // // (We do still check predicates that reference unused parameters, of course.) // -// FIXME(lazy_type_alias): I consider #100041 to be a stabilization-blocking concern for the checked -// version of LTA! The *entire premise* of checked_LTA is wfchecking; -// we can't have such obvious holes in it! +// FIXME(checked_type_aliases): I consider #100041 to be a stabilization-blocking concern for +// the checked version of LTA! The *entire premise* of checked_LTA +// is wfchecking; we can't have such obvious holes in it! // //@ revisions: current-bugged next-bugged next-fixed // @@ -19,7 +19,7 @@ //@[next-bugged] known-bug: #100041 //@[next-bugged] check-pass -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] type A = (); diff --git a/tests/ui/lazy-type-alias/unused-generic-parameters.fail.stderr b/tests/ui/checked-type-alias/unused-generic-parameters.fail.stderr similarity index 100% rename from tests/ui/lazy-type-alias/unused-generic-parameters.fail.stderr rename to tests/ui/checked-type-alias/unused-generic-parameters.fail.stderr diff --git a/tests/ui/lazy-type-alias/unused-generic-parameters.rs b/tests/ui/checked-type-alias/unused-generic-parameters.rs similarity index 80% rename from tests/ui/lazy-type-alias/unused-generic-parameters.rs rename to tests/ui/checked-type-alias/unused-generic-parameters.rs index 3482512671226..18a65043ef61a 100644 --- a/tests/ui/lazy-type-alias/unused-generic-parameters.rs +++ b/tests/ui/checked-type-alias/unused-generic-parameters.rs @@ -4,9 +4,9 @@ // As long as we check well-formedness before normalization there shouldn't be anything wrong with // such parameters since we know that the corresponding arguments will get wfchecked regardless. // -// FIXME(lazy_type_alias, #100041): At the time of writing however, that's not the case. I consider -// this to be stabilization-blocking concern for the strong / -// checked version of LTA! +// FIXME(checked_type_aliases, #100041): At the time of writing however, that's not the case. +// I consider this to be stabilization-blocking concern for the +// strong checked version of LTA! // See also `unused-generic-arguments-not-wfchecked.rs`. // // (We *do* ofc still detect unsatisfied predicates even if they @@ -17,7 +17,7 @@ //@ revisions: pass fail //@[pass] check-pass -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] type A<'a: 'static> = (); const _: A<'static> = (); diff --git a/tests/ui/lazy-type-alias/use-site-wf.rs b/tests/ui/checked-type-alias/use-site-wf.rs similarity index 92% rename from tests/ui/lazy-type-alias/use-site-wf.rs rename to tests/ui/checked-type-alias/use-site-wf.rs index a44ff3e3493d7..cd10a6c8330d2 100644 --- a/tests/ui/lazy-type-alias/use-site-wf.rs +++ b/tests/ui/checked-type-alias/use-site-wf.rs @@ -1,7 +1,7 @@ // Test that we check usage sites of lazy type aliases, aka free alias types, for well-formedness. // We check trailing where-clauses separately in `trailing-where-clause.rs`. -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] type B = T; diff --git a/tests/ui/lazy-type-alias/use-site-wf.stderr b/tests/ui/checked-type-alias/use-site-wf.stderr similarity index 100% rename from tests/ui/lazy-type-alias/use-site-wf.stderr rename to tests/ui/checked-type-alias/use-site-wf.stderr diff --git a/tests/ui/lazy-type-alias/variance-0.rs b/tests/ui/checked-type-alias/variance-0.rs similarity index 93% rename from tests/ui/lazy-type-alias/variance-0.rs rename to tests/ui/checked-type-alias/variance-0.rs index 1cecdff2977b3..ae55e8ea717e1 100644 --- a/tests/ui/lazy-type-alias/variance-0.rs +++ b/tests/ui/checked-type-alias/variance-0.rs @@ -13,11 +13,11 @@ // //@ check-pass -// FIXME(lazy_type_alias): Revisit this before stabilization (it's not blocking tho): +// FIXME(checked_type_aliases): Revisit this before stabilization (it's not blocking tho): // We might want to compute variances for free alias types again // with a special rule. See `variance-1.rs` for details. -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] // `Co` is covariant over `'a` since we expand `A` to `&'a ()`. struct Co<'a>(A<'a>); diff --git a/tests/ui/lazy-type-alias/variance-1.rs b/tests/ui/checked-type-alias/variance-1.rs similarity index 92% rename from tests/ui/lazy-type-alias/variance-1.rs rename to tests/ui/checked-type-alias/variance-1.rs index 51480d271b439..3fb857b8f91bf 100644 --- a/tests/ui/lazy-type-alias/variance-1.rs +++ b/tests/ui/checked-type-alias/variance-1.rs @@ -3,13 +3,13 @@ // eagerly expand them during variance computation unlike other alias types which constrain args to // be invariant. -// FIXME(lazy_type_alias): Revisit this before stabilization (altho it's not blocking): +// FIXME(checked_type_aliases): Revisit this before stabilization (altho it's not blocking): // Do we want to compute variances for lazy type aliases & free alias types // again and "force bivariant parameters to be invariant" if they're not // constrained by a projection? // This would make `struct WrapDiscard` below compile. -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] type Discard<'a, T> = (); diff --git a/tests/ui/lazy-type-alias/variance-1.stderr b/tests/ui/checked-type-alias/variance-1.stderr similarity index 100% rename from tests/ui/lazy-type-alias/variance-1.stderr rename to tests/ui/checked-type-alias/variance-1.stderr diff --git a/tests/ui/lazy-type-alias/variance-overflow.rs b/tests/ui/checked-type-alias/variance-overflow.rs similarity index 96% rename from tests/ui/lazy-type-alias/variance-overflow.rs rename to tests/ui/checked-type-alias/variance-overflow.rs index 6bd7acc3ebef7..0b5b58e083133 100644 --- a/tests/ui/lazy-type-alias/variance-overflow.rs +++ b/tests/ui/checked-type-alias/variance-overflow.rs @@ -9,7 +9,7 @@ // This means we can't use `type_of` to recurse into free alias types, we do have to use // `expand_free_alias_tys`. -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] // the (unused) type parameter is necessary to actually trigger variance computation for `First`. struct First(Second); diff --git a/tests/ui/lazy-type-alias/variance-overflow.stderr b/tests/ui/checked-type-alias/variance-overflow.stderr similarity index 100% rename from tests/ui/lazy-type-alias/variance-overflow.stderr rename to tests/ui/checked-type-alias/variance-overflow.stderr diff --git a/tests/ui/coherence/orphan-check-weak-aliases-covering.rs b/tests/ui/coherence/orphan-check-weak-aliases-covering.rs index a8b9e905c70b5..d976f9d5f360a 100644 --- a/tests/ui/coherence/orphan-check-weak-aliases-covering.rs +++ b/tests/ui/coherence/orphan-check-weak-aliases-covering.rs @@ -7,7 +7,7 @@ //@ aux-crate:foreign=parametrized-trait.rs //@ edition:2021 -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] type Alias = LocalWrapper; diff --git a/tests/ui/coherence/orphan-check-weak-aliases-not-covering.rs b/tests/ui/coherence/orphan-check-weak-aliases-not-covering.rs index 6d9bccc4c689e..d43c42dfc9722 100644 --- a/tests/ui/coherence/orphan-check-weak-aliases-not-covering.rs +++ b/tests/ui/coherence/orphan-check-weak-aliases-not-covering.rs @@ -3,7 +3,7 @@ //@ aux-crate:foreign=parametrized-trait.rs //@ edition:2021 -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] type Identity = T; diff --git a/tests/ui/const-generics/adt_const_params/alias_const_param_ty-1.rs b/tests/ui/const-generics/adt_const_params/alias_const_param_ty-1.rs index 8825d5384ab91..e59be0f6698ea 100644 --- a/tests/ui/const-generics/adt_const_params/alias_const_param_ty-1.rs +++ b/tests/ui/const-generics/adt_const_params/alias_const_param_ty-1.rs @@ -1,5 +1,5 @@ //@ check-pass -#![feature(adt_const_params, lazy_type_alias)] +#![feature(adt_const_params, checked_type_aliases)] pub type Matrix = [usize; 1]; const EMPTY_MATRIX: Matrix = [0; 1]; diff --git a/tests/ui/const-generics/check_const_arg_type_in_free_alias.rs b/tests/ui/const-generics/check_const_arg_type_in_free_alias.rs index 12e277f0c545a..10d6ceba85f43 100644 --- a/tests/ui/const-generics/check_const_arg_type_in_free_alias.rs +++ b/tests/ui/const-generics/check_const_arg_type_in_free_alias.rs @@ -1,5 +1,5 @@ //@ revisions: eager lazy -#![cfg_attr(lazy, feature(lazy_type_alias))] +#![cfg_attr(lazy, feature(checked_type_aliases))] #![cfg_attr(lazy, expect(incomplete_features))] // We currently do not check free type aliases for well formedness. diff --git a/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs b/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs index 84d1d06234111..536deb2efc172 100644 --- a/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs +++ b/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs @@ -1,6 +1,6 @@ //@ compile-flags: -Znext-solver -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] trait Foo {} diff --git a/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs b/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs index f876253b42b5f..b2d8eb33a176a 100644 --- a/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs +++ b/tests/ui/infinite/infinite-type-alias-mutual-recursion.rs @@ -6,7 +6,7 @@ #![feature(rustc_attrs)] #![rustc_no_implicit_bounds] -#![cfg_attr(any(feature_old, feature_new), feature(lazy_type_alias))] +#![cfg_attr(any(feature_old, feature_new), feature(checked_type_aliases))] #![allow(incomplete_features)] type X1 = X2; diff --git a/tests/ui/infinite/infinite-vec-type-recursion.rs b/tests/ui/infinite/infinite-vec-type-recursion.rs index c051d11d376c8..3fc8601dec8a7 100644 --- a/tests/ui/infinite/infinite-vec-type-recursion.rs +++ b/tests/ui/infinite/infinite-vec-type-recursion.rs @@ -1,6 +1,6 @@ //@ revisions: feature gated -#![cfg_attr(feature, feature(lazy_type_alias))] +#![cfg_attr(feature, feature(checked_type_aliases))] #![allow(incomplete_features)] type X = Vec; diff --git a/tests/ui/lint/missing-debug-implementations-lint/impl-debug-for-alias-type.rs b/tests/ui/lint/missing-debug-implementations-lint/impl-debug-for-alias-type.rs index 5222df24b61a6..72bb853e5b5e0 100644 --- a/tests/ui/lint/missing-debug-implementations-lint/impl-debug-for-alias-type.rs +++ b/tests/ui/lint/missing-debug-implementations-lint/impl-debug-for-alias-type.rs @@ -1,6 +1,6 @@ //@ check-pass -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![deny(missing_debug_implementations)] pub struct Local; diff --git a/tests/ui/privacy/private-in-public-warn.stderr b/tests/ui/privacy/private-in-public-warn.stderr index 649b117b40afb..231278ac2f877 100644 --- a/tests/ui/privacy/private-in-public-warn.stderr +++ b/tests/ui/privacy/private-in-public-warn.stderr @@ -529,7 +529,7 @@ LL | pub type Alias = T; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics = note: `#[warn(type_alias_bounds)]` on by default help: remove this bound | @@ -545,7 +545,7 @@ LL | pub type Alias where T: PrivTr = T; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this where clause | LL - pub type Alias where T: PrivTr = T; diff --git a/tests/ui/privacy/reach-type-alias-issue-156778.rs b/tests/ui/privacy/reach-type-alias-issue-156778.rs index 4297a44038cfc..f9e56b79e22e3 100644 --- a/tests/ui/privacy/reach-type-alias-issue-156778.rs +++ b/tests/ui/privacy/reach-type-alias-issue-156778.rs @@ -1,5 +1,5 @@ //@ check-pass -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] use src::hidden_core; mod src { diff --git a/tests/ui/traits/next-solver/issue-118950-root-region.rs b/tests/ui/traits/next-solver/issue-118950-root-region.rs index 7a4cd2aaa1f11..15c313ec7bd5a 100644 --- a/tests/ui/traits/next-solver/issue-118950-root-region.rs +++ b/tests/ui/traits/next-solver/issue-118950-root-region.rs @@ -2,7 +2,7 @@ // // This is a gnarly test but I don't know how to minimize it, frankly. -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] trait ToUnit<'a> { type Unit; diff --git a/tests/ui/traits/next-solver/normalize/dont-ice-on-normalization-failure.rs b/tests/ui/traits/next-solver/normalize/dont-ice-on-normalization-failure.rs index 25d11aec56ddb..94bfdc5757e02 100644 --- a/tests/ui/traits/next-solver/normalize/dont-ice-on-normalization-failure.rs +++ b/tests/ui/traits/next-solver/normalize/dont-ice-on-normalization-failure.rs @@ -2,7 +2,7 @@ // Regression test for #151308 -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] trait Trait { type Associated; } diff --git a/tests/ui/traits/next-solver/normalize/normalize-self-type-constrains-trait-args.rs b/tests/ui/traits/next-solver/normalize/normalize-self-type-constrains-trait-args.rs index 921d753fe2a1e..396ac03971fa9 100644 --- a/tests/ui/traits/next-solver/normalize/normalize-self-type-constrains-trait-args.rs +++ b/tests/ui/traits/next-solver/normalize/normalize-self-type-constrains-trait-args.rs @@ -3,9 +3,9 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@ check-pass -// This goal is also possible w/ a GAT, but lazy_type_alias +// This goal is also possible w/ a GAT, but checked_type_aliases // makes the behavior a bit more readable. -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] struct Wr(T); trait Foo {} diff --git a/tests/ui/traits/next-solver/overflow/coherence-alias-hang-with-region.rs b/tests/ui/traits/next-solver/overflow/coherence-alias-hang-with-region.rs index 4ade8a13ca914..1df895d732a40 100644 --- a/tests/ui/traits/next-solver/overflow/coherence-alias-hang-with-region.rs +++ b/tests/ui/traits/next-solver/overflow/coherence-alias-hang-with-region.rs @@ -4,7 +4,7 @@ // Regression test for nalgebra hang . -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![allow(incomplete_features)] type Id = T; diff --git a/tests/ui/traits/next-solver/overflow/coherence-alias-hang.rs b/tests/ui/traits/next-solver/overflow/coherence-alias-hang.rs index 4874e2e1f99c5..a81904b2d37e9 100644 --- a/tests/ui/traits/next-solver/overflow/coherence-alias-hang.rs +++ b/tests/ui/traits/next-solver/overflow/coherence-alias-hang.rs @@ -3,7 +3,7 @@ // Regression test for nalgebra hang . -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![feature(rustc_attrs)] #![rustc_no_implicit_bounds] #![allow(incomplete_features)] diff --git a/tests/ui/transmutability/type-alias-normalization.rs b/tests/ui/transmutability/type-alias-normalization.rs index b42a17c698a76..04d3974e48e9e 100644 --- a/tests/ui/transmutability/type-alias-normalization.rs +++ b/tests/ui/transmutability/type-alias-normalization.rs @@ -1,7 +1,7 @@ //! ICE regression test for https://github.com/rust-lang/rust/issues/151462 //@compile-flags: -Znext-solver=globally //@check-pass -#![feature(lazy_type_alias, transmutability)] +#![feature(checked_type_aliases, transmutability)] #![allow(incomplete_features)] mod assert { use std::mem::{Assume, TransmuteFrom}; diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr b/tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr index e4107a4f4abea..7656228a85c12 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr @@ -32,7 +32,7 @@ LL | type Y where i32: Foo = (); | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics = note: `#[warn(type_alias_bounds)]` on by default help: remove this where clause | 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 4b3633653133c..ac20f5862edd5 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 @@ -3,7 +3,7 @@ //! //! Regression test for . -#![feature(lazy_type_alias)] +#![feature(checked_type_aliases)] #![feature(min_generic_const_args)] trait Trait { diff --git a/tests/ui/type-alias/unresolved-assoc-ty-suggest-trait.rs b/tests/ui/type-alias/unresolved-assoc-ty-suggest-trait.rs index 2c8d448f3083e..bc226d2893012 100644 --- a/tests/ui/type-alias/unresolved-assoc-ty-suggest-trait.rs +++ b/tests/ui/type-alias/unresolved-assoc-ty-suggest-trait.rs @@ -2,7 +2,7 @@ // issue: rust-lang/rust#125789 //@ revisions: eager lazy -#![cfg_attr(lazy, feature(lazy_type_alias), allow(incomplete_features))] +#![cfg_attr(lazy, feature(checked_type_aliases), allow(incomplete_features))] trait Trait { type Assoc; } diff --git a/tests/ui/type/issue-67690-type-alias-bound-diagnostic-crash.stderr b/tests/ui/type/issue-67690-type-alias-bound-diagnostic-crash.stderr index ef0a7235c354b..3a55a3cb82ede 100644 --- a/tests/ui/type/issue-67690-type-alias-bound-diagnostic-crash.stderr +++ b/tests/ui/type/issue-67690-type-alias-bound-diagnostic-crash.stderr @@ -6,7 +6,7 @@ LL | pub type T = P; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics = note: `#[warn(type_alias_bounds)]` on by default help: remove this bound | diff --git a/tests/ui/type/type-alias-bounds.stderr b/tests/ui/type/type-alias-bounds.stderr index f7f530a0861c8..1634440100cdc 100644 --- a/tests/ui/type/type-alias-bounds.stderr +++ b/tests/ui/type/type-alias-bounds.stderr @@ -6,7 +6,7 @@ LL | type SVec = Vec; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics = note: `#[warn(type_alias_bounds)]` on by default help: remove this bound | @@ -22,7 +22,7 @@ LL | type S2Vec where T: Send = Vec; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this where clause | LL - type S2Vec where T: Send = Vec; @@ -37,7 +37,7 @@ LL | type VVec<'b, 'a: 'b + 'b> = (&'b u32, Vec<&'a i32>); | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this bound | LL - type VVec<'b, 'a: 'b + 'b> = (&'b u32, Vec<&'a i32>); @@ -52,7 +52,7 @@ LL | type WVec<'b, T: 'b + 'b> = (&'b u32, Vec); | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this bound | LL - type WVec<'b, T: 'b + 'b> = (&'b u32, Vec); @@ -67,7 +67,7 @@ LL | type W2Vec<'b, T> where T: 'b, T: 'b = (&'b u32, Vec); | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this where clause | LL - type W2Vec<'b, T> where T: 'b, T: 'b = (&'b u32, Vec); @@ -82,7 +82,7 @@ LL | type T1 = U::Assoc; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this bound | LL - type T1 = U::Assoc; @@ -101,7 +101,7 @@ LL | type T2 where U: Bound = U::Assoc; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this where clause | LL - type T2 where U: Bound = U::Assoc; @@ -120,7 +120,7 @@ LL | type T5 = ::Assoc; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this bound | LL - type T5 = ::Assoc; @@ -135,7 +135,7 @@ LL | type T6 = ::std::vec::Vec; | = note: this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics help: remove this bound | LL - type T6 = ::std::vec::Vec; diff --git a/tests/ui/where-clauses/cfg-attr-issue-138010-2.rs b/tests/ui/where-clauses/cfg-attr-issue-138010-2.rs index cf84bf3ee3559..0cbcc6abf6168 100644 --- a/tests/ui/where-clauses/cfg-attr-issue-138010-2.rs +++ b/tests/ui/where-clauses/cfg-attr-issue-138010-2.rs @@ -1,4 +1,4 @@ -#![feature(where_clause_attrs, lazy_type_alias)] +#![feature(where_clause_attrs, checked_type_aliases)] #![expect(incomplete_features)] struct Foo; diff --git a/tests/ui/where-clauses/where-clause-placement-type-alias.stderr b/tests/ui/where-clauses/where-clause-placement-type-alias.stderr index d341148b04cb5..23798e5fa6124 100644 --- a/tests/ui/where-clauses/where-clause-placement-type-alias.stderr +++ b/tests/ui/where-clauses/where-clause-placement-type-alias.stderr @@ -5,7 +5,7 @@ LL | type Bar = () where u32: Copy; | ^^^^^^^^^^^^^^^ | = note: see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable error: where clauses are not allowed after the type for type aliases --> $DIR/where-clause-placement-type-alias.rs:8:15 @@ -14,7 +14,7 @@ LL | type Baz = () where; | ^^^^^ | = note: see issue #112792 for more information - = help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable + = help: add `#![feature(checked_type_aliases)]` to the crate attributes to enable error: aborting due to 2 previous errors