diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs index 56abe72e0319f..7e9827c4e494c 100644 --- a/compiler/rustc_ast_lowering/src/item.rs +++ b/compiler/rustc_ast_lowering/src/item.rs @@ -24,7 +24,7 @@ use super::diagnostics::{ use super::stability::{enabled_names, gate_unstable_abi}; use super::{ FnDeclKind, GenericArgsMode, ImplTraitContext, ImplTraitPosition, LoweringContext, ParamMode, - RelaxedBoundForbiddenReason, RelaxedBoundPolicy, ResolverAstLoweringExt, + RelaxedBoundForbiddenReason, RelaxedBoundPolicy, }; use crate::diagnostics::ConstComptimeFn; @@ -1878,7 +1878,7 @@ impl<'hir> LoweringContext<'_, 'hir> { .collect(); // Introduce extra lifetimes if late resolution tells us to. - let extra_lifetimes = self.resolver.extra_lifetime_params(self.owner.id); + let extra_lifetimes = self.owner.extra_lifetime_params(self.owner.id); params.extend(extra_lifetimes.into_iter().map(|&(ident, node_id, kind)| { self.lifetime_res_to_generic_param( ident, diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index c6cd3fe5f5922..b30774318dee7 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -351,17 +351,6 @@ impl<'tcx> ResolverAstLowering<'tcx> { ) .map(|fn_indexes| fn_indexes.iter().map(|(num, _)| *num).collect()) } - - /// Obtain the list of lifetimes parameters to add to an item. - /// - /// Extra lifetime parameters should only be added in places that can appear - /// as a `binder` in `LifetimeRes`. - /// - /// The extra lifetimes that appear from the parenthesized `Fn`-trait desugaring - /// should appear at the enclosing `PolyTraitRef`. - fn extra_lifetime_params(&self, id: NodeId) -> &[(Ident, NodeId, MissingLifetimeKind)] { - self.extra_lifetime_params_map.get(&id).map_or(&[], |v| &v[..]) - } } /// How relaxed bounds `?Trait` should be treated. @@ -1129,7 +1118,7 @@ impl<'hir> LoweringContext<'_, 'hir> { ) -> &'hir [hir::GenericParam<'hir>] { // Start by creating params for extra lifetimes params, as this creates the definitions // that may be referred to by the AST inside `generic_params`. - let extra_lifetimes = self.resolver.extra_lifetime_params(binder); + let extra_lifetimes = self.owner.extra_lifetime_params(binder); debug!(?extra_lifetimes); let extra_lifetimes: Vec<_> = extra_lifetimes .iter() 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_borrowck/src/diagnostics/region_name.rs b/compiler/rustc_borrowck/src/diagnostics/region_name.rs index 0e07de31c2baa..57fd18107a414 100644 --- a/compiler/rustc_borrowck/src/diagnostics/region_name.rs +++ b/compiler/rustc_borrowck/src/diagnostics/region_name.rs @@ -147,7 +147,7 @@ impl RegionName { )) => { diag.span_label( *span, - format!("lifetime `{self}` appears in the type {type_name}"), + format!("lifetime `{self}` appears in the type `{type_name}`"), ); } RegionNameSource::AnonRegionFromOutput( 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 29c0786e66f93..b053476638eaa 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs @@ -1215,10 +1215,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 c34005d2ea7f5..dd21cee2b726f 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 69f7540c08e83..8e4c6e18804af 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs @@ -236,7 +236,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 90ee009facacd..79c1463ae2c05 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -1582,9 +1582,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 86eca36eac084..2fcab301fe763 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_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index d90a709ffcd41..f1133cc52671c 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -28,7 +28,7 @@ use rustc_abi::{ Align, FieldIdx, Integer, IntegerType, ReprFlags, ReprOptions, ScalableElt, VariantIdx, }; use rustc_ast::node_id::NodeMap; -use rustc_ast::{self as ast}; +use rustc_ast::{self as ast, NodeId}; pub use rustc_ast_ir::{Movability, Mutability, try_visit}; use rustc_data_structures::fx::{FxIndexMap, FxIndexSet}; use rustc_data_structures::intern::Interned; @@ -224,6 +224,8 @@ pub struct PerOwnerResolverData<'tcx> { /// Resolution for import nodes, which have multiple resolutions in different namespaces. pub import_res: hir::def::PerNS>> = Default::default(), + /// Lifetime parameters that lowering will have to introduce. + pub extra_lifetime_params_map: NodeMap> = Default::default(), /// The id of the owner pub id: ast::NodeId, @@ -245,6 +247,17 @@ impl<'tcx> PerOwnerResolverData<'tcx> { pub fn get_lifetime_res(&self, id: ast::NodeId) -> Option { self.lifetimes_res_map.get(&id).copied() } + + /// Obtain the list of lifetimes parameters to add to an item. + /// + /// Extra lifetime parameters should only be added in places that can appear + /// as a `binder` in `LifetimeRes`. + /// + /// The extra lifetimes that appear from the parenthesized `Fn`-trait desugaring + /// should appear at the enclosing `PolyTraitRef`. + pub fn extra_lifetime_params(&self, id: NodeId) -> &[(Ident, NodeId, MissingLifetimeKind)] { + self.extra_lifetime_params_map.get(&id).map_or(&[], |v| &v[..]) + } } /// Resolutions that should only be used for lowering. @@ -253,8 +266,6 @@ impl<'tcx> PerOwnerResolverData<'tcx> { pub struct ResolverAstLowering<'tcx> { /// Resolutions for nodes that have a single resolution. pub partial_res_map: NodeMap, - /// Lifetime parameters that lowering will have to introduce. - pub extra_lifetime_params_map: NodeMap>, pub next_node_id: ast::NodeId, diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 67d6f4682361f..858a2f21c6b75 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -190,6 +190,10 @@ pub struct RegionHighlightMode<'tcx> { /// instead of the ordinary behavior. highlight_regions: [Option<(ty::Region<'tcx>, usize)>; 3], + /// If set to `true`, types that include regions will always be included in the output, while + /// other types will be free to be trimmed. + pub keep_regions: bool, + /// If enabled, when printing a "free region" that originated from /// the given `ty::BoundRegionKind`, print it as "`'1`". Free regions that would ordinarily /// have names print as normal. @@ -208,6 +212,7 @@ impl<'tcx> RegionHighlightMode<'tcx> { region: Option>, number: Option, ) { + self.keep_regions = true; if let Some(k) = region && let Some(n) = number { @@ -223,6 +228,7 @@ impl<'tcx> RegionHighlightMode<'tcx> { bug!("can only highlight {} placeholders at a time", num_slots,) }); *first_avail_slot = Some((region, number)); + self.keep_regions = true; } /// Convenience wrapper for `highlighting_region`. @@ -2328,12 +2334,70 @@ impl<'tcx> Printer<'tcx> for FmtPrinter<'_, 'tcx> { } fn print_type(&mut self, ty: Ty<'tcx>) -> Result<(), PrintError> { + let has_regions = self.region_highlight_mode.keep_regions + && ty.has_type_flags(ty::TypeFlags::HAS_REGIONS); match ty.kind() { - ty::Tuple(tys) if tys.len() == 0 && self.should_truncate() => { + ty::Tuple(tys) if tys.len() == 0 => { // Don't truncate `()`. + self.pretty_print_type(ty) + } + + ty::Adt(def, args) + if self.should_truncate() + && args.consts().count() < 2 + && args.types().count() < 2 + && { + // We ensure that if there's at most a single type parameter and that type + // *doesn't* have any parameters, to avoid printing all the names in cases + // like `Foo>>`, instead truncating those always to + // `Foo<...>`. + if let Some(arg) = args.types().next() { + if let ty::Adt(_, arg_args) = arg.kind() { + if arg_args.consts().next().is_none() + && arg_args.types().next().is_none() + { + // Single param type with no type or const parameters: + // `Foo>`. + true + } else { + // Single param type with multiple type or const parameters: + // `Foo>`. We don't want to recurse into those, + // we'll replace the whole thing with `...`. + false + } + } else { + // Single type param that *isn't* a type with parameters, like a + // primitive: `Foo`. + true + } + } else { + // No type param: `Foo`. + true + } + } + && self.tcx.item_name(def.did()).as_str().len() < 7 => + { + // Don't fully truncate types that have "short names" and at most one type or const + // param. We do use the short path for them (only item name instead of full path). + with_forced_trimmed_paths!(self.pretty_print_type(ty)) + } + + ty::Alias(_, alias) + if self.should_truncate() + && let ty::AliasTyKind::Opaque { def_id } = alias.kind + && self.region_highlight_mode.keep_regions + && self + .tcx + .explicit_item_bounds(def_id) + .iter_instantiated_copied(self.tcx, alias.args) + .map(Unnormalized::skip_norm_wip) + .any(|(value, _)| value.has_bound_vars()) => + { + // ` Trait as Trait>` self.printed_type_count += 1; self.pretty_print_type(ty) } + ty::Adt(..) | ty::Foreign(_) | ty::Pat(..) @@ -2343,23 +2407,23 @@ impl<'tcx> Printer<'tcx> for FmtPrinter<'_, 'tcx> { | ty::FnPtr(..) | ty::UnsafeBinder(..) | ty::Dynamic(..) - | ty::Closure(..) | ty::CoroutineClosure(..) | ty::Coroutine(..) | ty::CoroutineWitness(..) | ty::Tuple(_) | ty::Alias(..) - | ty::Param(_) | ty::Bound(..) | ty::Placeholder(_) | ty::Error(_) - if self.should_truncate() => + if self.should_truncate() && !has_regions => { // We only truncate types that we know are likely to be much longer than 3 chars. // There's no point in replacing `i32` or `!`. write!(self, "_")?; Ok(()) } + ty::Ref(..) if self.should_truncate() && has_regions => self.pretty_print_type(ty), + ty::Closure(..) => self.pretty_print_type(ty), _ => { self.printed_type_count += 1; self.pretty_print_type(ty) 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_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs index 86e3e57b34bf0..3482e7320ef96 100644 --- a/compiler/rustc_passes/src/stability.rs +++ b/compiler/rustc_passes/src/stability.rs @@ -1147,9 +1147,6 @@ pub fn check_unused_or_stable_features(tcx: TyCtxt<'_>) { .1; tcx.dcx().emit_err(diagnostics::ImpliedFeatureNotExist { span, feature, implied_by }); } - - // FIXME(#44232): the `used_features` table no longer exists, so we - // don't lint about unused features. We should re-enable this one day! } fn unnecessary_partially_stable_feature_lint( diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index dfb65e6b0398e..2726598c40894 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -2174,6 +2174,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { // Record the created lifetime parameter so lowering can pick it up and add it to HIR. self.r + .current_owner .extra_lifetime_params_map .entry(binder) .or_insert_with(Vec::new) diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 9d4ec67d899c8..a1c3ed5a068f8 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -58,7 +58,7 @@ use rustc_hir::def::{ }; use rustc_hir::def_id::{CRATE_DEF_ID, CrateNum, DefId, LOCAL_CRATE, LocalDefId, LocalDefIdMap}; use rustc_hir::definitions::{PerParentDisambiguatorState, PerParentDisambiguatorsMap}; -use rustc_hir::{MissingLifetimeKind, PrimTy, TraitCandidate, find_attr}; +use rustc_hir::{PrimTy, TraitCandidate, find_attr}; use rustc_index::bit_set::DenseBitSet; use rustc_metadata::creader::CStore; use rustc_middle::metadata::{AmbigModChild, ModChild, Reexport}; @@ -1336,8 +1336,6 @@ pub struct Resolver<'ra, 'tcx> { partial_res_map: NodeMap = Default::default(), /// An import will be inserted into this map if it has been used. import_use_map: FxHashMap, Used> = default::fx_hash_map(), - /// Lifetime parameters that lowering will have to introduce. - extra_lifetime_params_map: NodeMap> = Default::default(), /// `CrateNum` resolutions of `extern crate` items. extern_crate_map: UnordMap = Default::default(), @@ -1973,7 +1971,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { }; let ast_lowering = ty::ResolverAstLowering { partial_res_map: self.partial_res_map, - extra_lifetime_params_map: self.extra_lifetime_params_map, next_node_id: self.next_node_id, owners: self.owners, lint_buffer: Steal::new(self.lint_buffer), diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index de090531a6192..fa545e8cef906 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/diagnostics.rs b/compiler/rustc_trait_selection/src/diagnostics.rs index bb2614992adf2..44b5e669d5251 100644 --- a/compiler/rustc_trait_selection/src/diagnostics.rs +++ b/compiler/rustc_trait_selection/src/diagnostics.rs @@ -1203,9 +1203,9 @@ impl Subdiagnostic for ConsiderBorrowingParamHelp { #[diag("`impl` item signature doesn't match `trait` item signature")] pub(crate) struct TraitImplDiff { #[primary_span] - #[label("found `{$found}`")] + #[label("found `{$found_short}`")] pub sp: Span, - #[label("expected `{$expected}`")] + #[label("expected `{$expected_short}`")] pub trait_sp: Span, #[note( "expected signature `{$expected}` @@ -1218,6 +1218,8 @@ pub(crate) struct TraitImplDiff { "verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output" )] pub rel_help: bool, + pub expected_short: String, + pub found_short: String, pub expected: String, pub found: String, } diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/placeholder_error.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/placeholder_error.rs index f6887c18075a4..7f452a578778d 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/placeholder_error.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/placeholder_error.rs @@ -5,6 +5,7 @@ use rustc_errors::{Applicability, Diag, IntoDiagArg}; use rustc_hir as hir; use rustc_hir::def::Namespace; use rustc_hir::def_id::{CRATE_DEF_ID, DefId}; +use rustc_hir::limit::Limit; use rustc_middle::bug; use rustc_middle::ty::error::ExpectedFound; use rustc_middle::ty::print::{FmtPrinter, Print, PrintTraitRefExt as _, RegionHighlightMode}; @@ -29,7 +30,7 @@ pub(crate) struct Highlighted<'tcx, T> { impl<'tcx, T> IntoDiagArg for Highlighted<'tcx, T> where - T: for<'a> Print>, + T: for<'a> Print> + Copy, { fn into_diag_arg(self, _: &mut Option) -> rustc_errors::DiagArgValue { rustc_errors::DiagArgValue::Str(self.to_string().into()) @@ -44,14 +45,28 @@ impl<'tcx, T> Highlighted<'tcx, T> { impl<'tcx, T> fmt::Display for Highlighted<'tcx, T> where - T: for<'a> Print>, + T: for<'a> Print> + Copy, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let mut p = ty::print::FmtPrinter::new(self.tcx, self.ns); p.region_highlight_mode = self.highlight; self.value.print(&mut p)?; - f.write_str(&p.into_buffer()) + let b = p.into_buffer(); + if b.len() <= 40 || !self.highlight.keep_regions || self.tcx.sess.opts.verbose { + // This is a short enough type that can be safely be printed to the user, or we aren't + // showing the type with a particular interest in its lifetimes. + f.write_str(&b)?; + } else { + // We are highlighting lifetimes in the output, we will print out the smallest possible + // portion of the type while keeping the lifetimes visible. + let mut p = FmtPrinter::new_with_limit(self.tcx, self.ns, Limit(0)); + p.region_highlight_mode = self.highlight; + self.value.print(&mut p).expect("could not print type"); + let x = p.into_buffer(); + f.write_str(&x)?; + } + Ok(()) } } diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/trait_impl_difference.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/trait_impl_difference.rs index eb0b9a0234275..f1be118896b01 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/trait_impl_difference.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/trait_impl_difference.rs @@ -84,7 +84,15 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { } let tcx = self.cx.tcx; - let expected_highlight = HighlightBuilder::build(tcx, expected); + let mut expected_highlight = HighlightBuilder::build(tcx, expected); + let expected_short = Highlighted { + highlight: expected_highlight, + ns: Namespace::TypeNS, + tcx, + value: expected, + } + .to_string(); + expected_highlight.keep_regions = false; let expected = Highlighted { highlight: expected_highlight, ns: Namespace::TypeNS, @@ -92,7 +100,11 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { value: expected, } .to_string(); - let found_highlight = HighlightBuilder::build(tcx, found); + let mut found_highlight = HighlightBuilder::build(tcx, found); + let found_short = + Highlighted { highlight: found_highlight, ns: Namespace::TypeNS, tcx, value: found } + .to_string(); + found_highlight.keep_regions = false; let found = Highlighted { highlight: found_highlight, ns: Namespace::TypeNS, tcx, value: found } .to_string(); @@ -121,6 +133,8 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { rel_help: visitor.types.is_empty(), expected, found, + expected_short, + found_short, }; let mut diag = self.tcx().dcx().create_err(diag); diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/region.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/region.rs index e104cc04310be..0b730bc8f2669 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/region.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/region.rs @@ -4,13 +4,14 @@ use rustc_data_structures::fx::FxIndexSet; use rustc_errors::{ Applicability, Diag, E0309, E0310, E0311, E0803, Subdiagnostic, msg, struct_span_code_err, }; -use rustc_hir::def::DefKind; +use rustc_hir::def::{DefKind, Namespace}; use rustc_hir::def_id::{DefId, LocalDefId}; use rustc_hir::intravisit::Visitor; use rustc_hir::{self as hir, ParamName}; use rustc_middle::bug; use rustc_middle::traits::ObligationCauseCode; use rustc_middle::ty::error::TypeError; +use rustc_middle::ty::print::RegionHighlightMode; use rustc_middle::ty::{ self, IsSuggestable, Region, Ty, TyCtxt, TypeVisitableExt as _, Upcast as _, }; @@ -25,6 +26,7 @@ use crate::diagnostics::{ }; use crate::error_reporting::TypeErrCtxt; use crate::error_reporting::infer::ObligationCauseExt; +use crate::error_reporting::infer::nice_region_error::placeholder_error::Highlighted; use crate::infer::region_constraints::GenericKind; use crate::infer::{ BoundRegionConversionTime, InferCtxt, RegionResolutionError, RegionVariableOrigin, @@ -1286,6 +1288,9 @@ pub fn unexpected_hidden_region_diagnostic<'a, 'tcx>( ), opaque_ty_span: tcx.def_span(opaque_ty_key.def_id), }); + let mut highlight = RegionHighlightMode::default(); + highlight.keep_regions = true; + let hidden_ty = Highlighted { highlight, ns: Namespace::TypeNS, tcx, value: hidden_ty }; // Explain the region we are capturing. match hidden_region.kind() { 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/library/core/src/io/error.rs b/library/core/src/io/error.rs index 61abdb16d07da..0df8b2d05cf48 100644 --- a/library/core/src/io/error.rs +++ b/library/core/src/io/error.rs @@ -534,6 +534,7 @@ impl fmt::Display for Error { #[stable(feature = "rust1", since = "1.0.0")] impl error::Error for Error { #[allow(deprecated)] + #[inline] fn cause(&self) -> Option<&dyn error::Error> { match self.repr.data() { ErrorData::Os(..) => None, @@ -543,6 +544,7 @@ impl error::Error for Error { } } + #[inline] fn source(&self) -> Option<&(dyn error::Error + 'static)> { match self.repr.data() { ErrorData::Os(..) => None, @@ -605,6 +607,7 @@ impl fmt::Debug for Custom { #[unstable(feature = "core_io_internals", reason = "exposed only for libstd", issue = "none")] impl Drop for Custom { + #[inline] fn drop(&mut self) { // SAFETY: `Custom::from_raw` ensures this call is safe. unsafe { @@ -631,12 +634,14 @@ impl Custom { } #[unstable(feature = "core_io_internals", reason = "exposed only for libstd", issue = "none")] + #[inline] pub fn into_raw(self) -> crate::ptr::NonNull { let ptr = self.error; core::mem::forget(self); ptr } + #[inline] fn error_ref(&self) -> &(dyn error::Error + Send + Sync + 'static) { // SAFETY: // `from_raw` ensures `error` is a valid pointer up to a static lifetime @@ -644,6 +649,7 @@ impl Custom { unsafe { self.error.as_ref() } } + #[inline] fn error_mut(&mut self) -> &mut (dyn error::Error + Send + Sync + 'static) { // SAFETY: // `from_raw` ensures `error` is a valid pointer up to a static lifetime @@ -668,6 +674,7 @@ unsafe impl Sync for CustomOwner {} #[unstable(feature = "core_io_internals", reason = "exposed only for libstd", issue = "none")] impl Drop for CustomOwner { + #[inline] fn drop(&mut self) { // SAFETY: `CustomOwner::from_raw` ensures this call is safe. unsafe { @@ -687,6 +694,7 @@ impl CustomOwner { } #[unstable(feature = "core_io_internals", reason = "exposed only for libstd", issue = "none")] + #[inline] pub fn into_raw(self) -> crate::ptr::NonNull { let ptr = self.0; core::mem::forget(self); diff --git a/library/core/src/io/error/os_functions_atomic.rs b/library/core/src/io/error/os_functions_atomic.rs index dfaf59ae742de..d4d77ced59187 100644 --- a/library/core/src/io/error/os_functions_atomic.rs +++ b/library/core/src/io/error/os_functions_atomic.rs @@ -15,6 +15,7 @@ use crate::sync::atomic; static OS_FUNCTIONS: atomic::AtomicPtr = atomic::AtomicPtr::new(OsFunctions::DEFAULT as *const _ as *mut _); +#[inline] fn get_os_functions() -> &'static OsFunctions { // SAFETY: // * `OS_FUNCTIONS` is initially a pointer to `OsFunctions::DEFAULT`, which is valid for a static lifetime. diff --git a/library/core/src/io/error/repr_bitpacked.rs b/library/core/src/io/error/repr_bitpacked.rs index 22cb331924081..8758e5543762a 100644 --- a/library/core/src/io/error/repr_bitpacked.rs +++ b/library/core/src/io/error/repr_bitpacked.rs @@ -133,6 +133,7 @@ unsafe impl Send for Repr {} unsafe impl Sync for Repr {} impl Repr { + #[inline] pub(super) fn new_custom(b: CustomOwner) -> Self { let p = b.into_raw().as_ptr().cast::(); // Should only be possible if an allocator handed out a pointer with diff --git a/library/core/src/io/io_slice.rs b/library/core/src/io/io_slice.rs index 0bdd410d3e964..807bbfcd36225 100644 --- a/library/core/src/io/io_slice.rs +++ b/library/core/src/io/io_slice.rs @@ -155,6 +155,7 @@ impl<'a> IoSliceMut<'a> { /// assert_eq!(&data, b"Abcdef"); /// ``` #[unstable(feature = "io_slice_as_bytes", issue = "132818")] + #[inline] pub const fn into_slice(self) -> &'a mut [u8] { self.0.into_slice() } @@ -323,6 +324,7 @@ impl<'a> IoSlice<'a> { /// assert_eq!(io_slice.as_slice(), b"def"); /// ``` #[unstable(feature = "io_slice_as_bytes", issue = "132818")] + #[inline] pub const fn as_slice(self) -> &'a [u8] { self.0.as_slice() } diff --git a/library/core/src/net/ip_addr.rs b/library/core/src/net/ip_addr.rs index 4e380a93972e7..3fe98eba22358 100644 --- a/library/core/src/net/ip_addr.rs +++ b/library/core/src/net/ip_addr.rs @@ -2480,6 +2480,7 @@ macro_rules! bitop_impls { $(#[$attr])* const impl $BitOpAssign<&'_ $ty> for $ty { + #[inline] fn $bitop_assign(&mut self, rhs: &'_ $ty) { self.$bitop_assign(*rhs); } 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 0a7dd5c2cd033..8c159b0e0447f 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-consts/assoc-const-equality-region-var-hash-ice.rs b/tests/ui/associated-consts/assoc-const-equality-region-var-hash-ice.rs new file mode 100644 index 0000000000000..9939be7b3554e --- /dev/null +++ b/tests/ui/associated-consts/assoc-const-equality-region-var-hash-ice.rs @@ -0,0 +1,17 @@ +//! Regression test for . + +trait Trait<'a> { + const K: &'a (); +} + +fn foo() -> dyn Trait<'r, K = {}> { + //~^ ERROR use of undeclared lifetime name `'r` + //~| ERROR associated const equality is incomplete + { + 6 + //~^ ERROR mismatched types + } + 5 +} + +fn main() {} 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 new file mode 100644 index 0000000000000..d70cb19a95523 --- /dev/null +++ b/tests/ui/associated-consts/assoc-const-equality-region-var-hash-ice.stderr @@ -0,0 +1,41 @@ +error[E0261]: use of undeclared lifetime name `'r` + --> $DIR/assoc-const-equality-region-var-hash-ice.rs:7:23 + | +LL | fn foo() -> dyn Trait<'r, K = {}> { + | ^^ undeclared lifetime + | + = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html +help: consider making the bound lifetime-generic with a new `'r` lifetime + | +LL | fn foo() -> dyn for<'r> Trait<'r, K = {}> { + | +++++++ +help: consider introducing lifetime `'r` here + | +LL | fn foo<'r>() -> dyn Trait<'r, K = {}> { + | ++++ + +error[E0658]: associated const equality is incomplete + --> $DIR/assoc-const-equality-region-var-hash-ice.rs:7:27 + | +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 + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error[E0308]: mismatched types + --> $DIR/assoc-const-equality-region-var-hash-ice.rs:11:9 + | +LL | 6 + | ^ expected `()`, found integer + | +help: you might have meant to return this value + | +LL | return 6; + | ++++++ + + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0261, E0308, E0658. +For more information about an error, try `rustc --explain E0261`. 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/async-await/drop-tracking-unresolved-typeck-results.no_assumptions.stderr b/tests/ui/async-await/drop-tracking-unresolved-typeck-results.no_assumptions.stderr index d5560bf892032..5a5bba352c69b 100644 --- a/tests/ui/async-await/drop-tracking-unresolved-typeck-results.no_assumptions.stderr +++ b/tests/ui/async-await/drop-tracking-unresolved-typeck-results.no_assumptions.stderr @@ -6,7 +6,7 @@ LL | | Next(&Buffered(Map(Empty(PhantomData), ready::<&()>), FuturesOrde LL | | }); | |______^ implementation of `FnOnce` is not general enough | - = note: `fn(&'0 ()) -> std::future::Ready<&'0 ()> {std::future::ready::<&'0 ()>}` must implement `FnOnce<(&'1 (),)>`, for any two lifetimes `'0` and `'1`... + = note: `fn(&'0 ()) -> Ready<&'0 ()> {std::future::ready::<&'0 ()>}` must implement `FnOnce<(&'1 (),)>`, for any two lifetimes `'0` and `'1`... = note: ...but it actually implements `FnOnce<(&(),)>` error: implementation of `FnOnce` is not general enough @@ -17,7 +17,7 @@ LL | | Next(&Buffered(Map(Empty(PhantomData), ready::<&()>), FuturesOrde LL | | }); | |______^ implementation of `FnOnce` is not general enough | - = note: `fn(&'0 ()) -> std::future::Ready<&'0 ()> {std::future::ready::<&'0 ()>}` must implement `FnOnce<(&'1 (),)>`, for any two lifetimes `'0` and `'1`... + = note: `fn(&'0 ()) -> Ready<&'0 ()> {std::future::ready::<&'0 ()>}` must implement `FnOnce<(&'1 (),)>`, for any two lifetimes `'0` and `'1`... = note: ...but it actually implements `FnOnce<(&(),)>` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` diff --git a/tests/ui/async-await/higher-ranked-auto-trait-15.no_assumptions.stderr b/tests/ui/async-await/higher-ranked-auto-trait-15.no_assumptions.stderr index 461b065d55ad3..e8d1f585f0256 100644 --- a/tests/ui/async-await/higher-ranked-auto-trait-15.no_assumptions.stderr +++ b/tests/ui/async-await/higher-ranked-auto-trait-15.no_assumptions.stderr @@ -4,7 +4,7 @@ error: implementation of `FnOnce` is not general enough LL | require_send(future); | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough | - = note: closure with signature `fn(&'0 Vec) -> std::slice::Iter<'_, i32>` must implement `FnOnce<(&'1 Vec,)>`, for any two lifetimes `'0` and `'1`... + = note: closure with signature `fn(&'0 _) -> Iter<'_, i32>` must implement `FnOnce<(&'1 Vec,)>`, for any two lifetimes `'0` and `'1`... = note: ...but it actually implements `FnOnce<(&Vec,)>` help: consider adding an explicit type annotation to the closure's argument | @@ -17,7 +17,7 @@ error: implementation of `FnOnce` is not general enough LL | require_send(future); | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough | - = note: closure with signature `fn(&'0 Vec) -> std::slice::Iter<'_, i32>` must implement `FnOnce<(&'1 Vec,)>`, for any two lifetimes `'0` and `'1`... + = note: closure with signature `fn(&'0 _) -> Iter<'_, i32>` must implement `FnOnce<(&'1 Vec,)>`, for any two lifetimes `'0` and `'1`... = note: ...but it actually implements `FnOnce<(&Vec,)>` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` help: consider adding an explicit type annotation to the closure's argument diff --git a/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.stderr b/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.stderr index d7762621cc5c7..c43a983cbf365 100644 --- a/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.stderr +++ b/tests/ui/borrowck/issue-95079-missing-move-in-nested-closure.stderr @@ -24,7 +24,7 @@ error: lifetime may not live long enough LL | move |()| s.chars().map(|c| format!("{}{}", c, s)) | --------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2` | | | - | | return type of closure `Map, {closure@$DIR/issue-95079-missing-move-in-nested-closure.rs:11:29: 11:32}>` contains a lifetime `'2` + | | return type of closure `Map, {closure@...}>` contains a lifetime `'2` | lifetime `'1` represents this closure's body | = note: closure implements `Fn`, so references to captured variables can't escape the closure 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/closures/deduce-signature/obligation-with-leaking-placeholders.current.stderr b/tests/ui/closures/deduce-signature/obligation-with-leaking-placeholders.current.stderr index eaa0d32e75dff..cdaa16ac9e807 100644 --- a/tests/ui/closures/deduce-signature/obligation-with-leaking-placeholders.current.stderr +++ b/tests/ui/closures/deduce-signature/obligation-with-leaking-placeholders.current.stderr @@ -8,7 +8,7 @@ LL | | x.to_string(); LL | | }); | |______^ implementation of `Foo` is not general enough | - = note: `Wrap<{closure@$DIR/obligation-with-leaking-placeholders.rs:18:15: 18:18}>` must implement `Foo<'0>`, for any lifetime `'0`... + = note: `Wrap<{closure@...}>` must implement `Foo<'0>`, for any lifetime `'0`... = note: ...but it actually implements `Foo<'1>`, for some specific lifetime `'1` error: aborting due to 1 previous error diff --git a/tests/ui/closures/wrong-closure-arg-suggestion-125325.stderr b/tests/ui/closures/wrong-closure-arg-suggestion-125325.stderr index 80da4e7145f95..1b94d59901d22 100644 --- a/tests/ui/closures/wrong-closure-arg-suggestion-125325.stderr +++ b/tests/ui/closures/wrong-closure-arg-suggestion-125325.stderr @@ -43,7 +43,7 @@ error: lifetime may not live long enough LL | take(|_| to_fn(|_| self.counter += 1)); | --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2` | | | - | | return type of closure `aux::Map<{closure@$DIR/wrong-closure-arg-suggestion-125325.rs:46:24: 46:27}>` contains a lifetime `'2` + | | return type of closure `aux::Map<{closure@...}>` contains a lifetime `'2` | lifetime `'1` represents this closure's body | = note: closure implements `Fn`, so references to captured variables can't escape the closure @@ -77,7 +77,7 @@ error: lifetime may not live long enough LL | P.flat_map(|_| P.map(|_| self.counter += 1)); | --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2` | | | - | | return type of closure `aux::Map<{closure@$DIR/wrong-closure-arg-suggestion-125325.rs:54:30: 54:33}>` contains a lifetime `'2` + | | return type of closure `aux::Map<{closure@...}>` contains a lifetime `'2` | lifetime `'1` represents this closure's body | = note: closure implements `Fn`, so references to captured variables can't escape the closure diff --git a/tests/ui/codegen/overflow-during-mono.stderr b/tests/ui/codegen/overflow-during-mono.stderr index 4d631e255afe5..a5f5aafb7c7c2 100644 --- a/tests/ui/codegen/overflow-during-mono.stderr +++ b/tests/ui/codegen/overflow-during-mono.stderr @@ -3,8 +3,8 @@ error[E0275]: overflow evaluating the requirement `for<'a> {closure@$DIR/overflo = help: consider increasing the recursion limit by adding a `#![recursion_limit = "64"]` attribute to your crate (`overflow_during_mono`) = note: required for `Filter, {closure@overflow-during-mono.rs:14:41}>` to implement `Iterator` = note: 31 redundant requirements hidden - = note: required for `Filter, _>, _>, _>, _>, _>` to implement `Iterator` - = note: required for `Filter, _>, _>, _>, _>, _>` to implement `IntoIterator` + = note: required for `Filter, {closure@...}>, {closure@...}>` to implement `Iterator` + = note: required for `Filter, {closure@...}>, {closure@...}>` to implement `IntoIterator` = note: the full name for the type has been written to '$TEST_BUILD_DIR/overflow-during-mono.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console 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/const-generics/defaults/const-param-default-body-param-env-ice.rs b/tests/ui/const-generics/defaults/const-param-default-body-param-env-ice.rs new file mode 100644 index 0000000000000..932e354861352 --- /dev/null +++ b/tests/ui/const-generics/defaults/const-param-default-body-param-env-ice.rs @@ -0,0 +1,15 @@ +//! Regression test for . + +impl dyn PartialEq {} +//~^ ERROR generic parameters with a default must be trailing +//~| ERROR generic parameter defaults cannot reference parameters before they are declared +//~| ERROR defaults for generic parameters are not allowed here +//~| ERROR the const parameter `N` is not constrained by the impl trait, self type, or predicates +//~| ERROR cannot define inherent `impl` for a type outside of the crate where the type is defined + +fn foo() {} + +pub struct S; +//~^ ERROR mismatched types + +fn main() {} diff --git a/tests/ui/const-generics/defaults/const-param-default-body-param-env-ice.stderr b/tests/ui/const-generics/defaults/const-param-default-body-param-env-ice.stderr new file mode 100644 index 0000000000000..9341e0e280f81 --- /dev/null +++ b/tests/ui/const-generics/defaults/const-param-default-body-param-env-ice.stderr @@ -0,0 +1,50 @@ +error: generic parameters with a default must be trailing + --> $DIR/const-param-default-body-param-env-ice.rs:3:12 + | +LL | impl dyn PartialEq {} + | ^ + +error[E0128]: generic parameter defaults cannot reference parameters before they are declared + --> $DIR/const-param-default-body-param-env-ice.rs:3:32 + | +LL | impl dyn PartialEq {} + | ^ cannot reference `X` before it is declared + +error: defaults for generic parameters are not allowed here + --> $DIR/const-param-default-body-param-env-ice.rs:3:6 + | +LL | impl dyn PartialEq {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates + --> $DIR/const-param-default-body-param-env-ice.rs:3:6 + | +LL | impl dyn PartialEq {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unconstrained const parameter + | + = note: expressions using a const parameter must map each value to a distinct output value + = note: proving the result of expressions other than the parameter are unique is not supported + +error[E0308]: mismatched types + --> $DIR/const-param-default-body-param-env-ice.rs:12:45 + | +LL | pub struct S; + | ^^^ expected `usize`, found fn item + | + = note: expected type `usize` + found fn item `fn() {foo}` + = note: array length can only be `usize` + +error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined + --> $DIR/const-param-default-body-param-env-ice.rs:3:1 + | +LL | impl dyn PartialEq {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl for type defined outside of crate + | + = help: consider defining a trait and implementing it for the type or using a newtype wrapper like `struct MyType(ExternalType);` and implement it + = note: for more details about the orphan rules, see + +error: aborting due to 6 previous errors + +Some errors have detailed explanations: E0116, E0128, E0207, E0308. +For more information about an error, try `rustc --explain E0116`. diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs index 180e44d365add..7d98b9f9982a7 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs @@ -98,7 +98,6 @@ #![crate_name = "0900"] #![crate_type = "bin"] // cannot pass "0800" here -// FIXME(#44232) we should warn that this isn't used. #![feature(rust1)] //~^ WARN no longer requires an attribute to enable //~| NOTE `#[warn(stable_features)]` on by default diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr index 520ddd531b1d1..8c94bbcb2e027 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr @@ -1,5 +1,5 @@ warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:475:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:474:17 | LL | mod inner { #![macro_escape] } | ^^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | mod inner { #![macro_escape] } = help: try an outer attribute: `#[macro_use]` warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:472:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:471:1 | LL | #[macro_escape] | ^^^^^^^^^^^^^^^ @@ -43,151 +43,151 @@ LL | #![deny(x5100)] | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:113:8 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:112:8 | LL | #[warn(x5400)] | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:116:25 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:115:25 | LL | mod inner { #![warn(x5400)] } | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:119:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:118:12 | LL | #[warn(x5400)] fn f() { } | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:122:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:121:12 | LL | #[warn(x5400)] struct S; | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:125:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:124:12 | LL | #[warn(x5400)] type T = S; | ^^^^^ warning: unknown lint: `x5400` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:128:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:127:12 | LL | #[warn(x5400)] impl S { } | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:132:9 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:131:9 | LL | #[allow(x5300)] | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:135:26 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:134:26 | LL | mod inner { #![allow(x5300)] } | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:138:13 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:137:13 | LL | #[allow(x5300)] fn f() { } | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:141:13 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:140:13 | LL | #[allow(x5300)] struct S; | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:144:13 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:143:13 | LL | #[allow(x5300)] type T = S; | ^^^^^ warning: unknown lint: `x5300` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:147:13 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:146:13 | LL | #[allow(x5300)] impl S { } | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:151:10 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:150:10 | LL | #[forbid(x5200)] | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:154:27 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:153:27 | LL | mod inner { #![forbid(x5200)] } | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:157:14 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:156:14 | LL | #[forbid(x5200)] fn f() { } | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:160:14 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:159:14 | LL | #[forbid(x5200)] struct S; | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:163:14 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:162:14 | LL | #[forbid(x5200)] type T = S; | ^^^^^ warning: unknown lint: `x5200` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:166:14 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:165:14 | LL | #[forbid(x5200)] impl S { } | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:170:8 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:169:8 | LL | #[deny(x5100)] | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:173:25 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:172:25 | LL | mod inner { #![deny(x5100)] } | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:176:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:175:12 | LL | #[deny(x5100)] fn f() { } | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:179:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:178:12 | LL | #[deny(x5100)] struct S; | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:182:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:181:12 | LL | #[deny(x5100)] type T = S; | ^^^^^ warning: unknown lint: `x5100` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:185:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:184:12 | LL | #[deny(x5100)] impl S { } | ^^^^^ warning: the feature `rust1` has been stable since 1.0.0 and no longer requires an attribute to enable - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:102:12 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:101:12 | LL | #![feature(rust1)] | ^^^^^ @@ -195,7 +195,7 @@ LL | #![feature(rust1)] = note: `#[warn(stable_features)]` on by default warning: attribute should be applied to an `extern` block with non-Rust ABI - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:725:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:724:5 | LL | #[link(name = "x")] extern "Rust" {} | ^^^^^^^^^^^^^^^^^^^ @@ -289,7 +289,7 @@ LL | #![must_use] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[macro_use]` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:193:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:192:5 | LL | #[macro_use] fn f() { } | ^^^^^^^^^^^^ @@ -298,7 +298,7 @@ LL | #[macro_use] fn f() { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[macro_use]` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:199:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:198:5 | LL | #[macro_use] struct S; | ^^^^^^^^^^^^ @@ -307,7 +307,7 @@ LL | #[macro_use] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[macro_use]` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:205:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:204:5 | LL | #[macro_use] type T = S; | ^^^^^^^^^^^^ @@ -316,7 +316,7 @@ LL | #[macro_use] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[macro_use]` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:211:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:210:5 | LL | #[macro_use] impl S { } | ^^^^^^^^^^^^ @@ -325,7 +325,7 @@ LL | #[macro_use] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[macro_export]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:218:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:217:1 | LL | #[macro_export] | ^^^^^^^^^^^^^^^ @@ -334,7 +334,7 @@ LL | #[macro_export] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[macro_export]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:224:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:223:17 | LL | mod inner { #![macro_export] } | ^^^^^^^^^^^^^^^^ @@ -343,7 +343,7 @@ LL | mod inner { #![macro_export] } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[macro_export]` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:230:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:229:5 | LL | #[macro_export] fn f() { } | ^^^^^^^^^^^^^^^ @@ -352,7 +352,7 @@ LL | #[macro_export] fn f() { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[macro_export]` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:236:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:235:5 | LL | #[macro_export] struct S; | ^^^^^^^^^^^^^^^ @@ -361,7 +361,7 @@ LL | #[macro_export] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[macro_export]` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:242:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:241:5 | LL | #[macro_export] type T = S; | ^^^^^^^^^^^^^^^ @@ -370,7 +370,7 @@ LL | #[macro_export] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[macro_export]` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:248:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:247:5 | LL | #[macro_export] impl S { } | ^^^^^^^^^^^^^^^ @@ -379,7 +379,7 @@ LL | #[macro_export] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[path]` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:259:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:258:5 | LL | #[path = "3800"] fn f() { } | ^^^^^^^^^^^^^^^^ @@ -388,7 +388,7 @@ LL | #[path = "3800"] fn f() { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[path]` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:265:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:264:5 | LL | #[path = "3800"] struct S; | ^^^^^^^^^^^^^^^^ @@ -397,7 +397,7 @@ LL | #[path = "3800"] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[path]` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:271:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:270:5 | LL | #[path = "3800"] type T = S; | ^^^^^^^^^^^^^^^^ @@ -406,7 +406,7 @@ LL | #[path = "3800"] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[path]` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:277:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:276:5 | LL | #[path = "3800"] impl S { } | ^^^^^^^^^^^^^^^^ @@ -415,7 +415,7 @@ LL | #[path = "3800"] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[automatically_derived]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:284:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:283:1 | LL | #[automatically_derived] | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -424,7 +424,7 @@ LL | #[automatically_derived] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[automatically_derived]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:290:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:289:17 | LL | mod inner { #![automatically_derived] } | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -433,7 +433,7 @@ LL | mod inner { #![automatically_derived] } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[automatically_derived]` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:296:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:295:5 | LL | #[automatically_derived] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -442,7 +442,7 @@ LL | #[automatically_derived] fn f() { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[automatically_derived]` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:302:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:301:5 | LL | #[automatically_derived] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -451,7 +451,7 @@ LL | #[automatically_derived] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[automatically_derived]` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:308:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:307:5 | LL | #[automatically_derived] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -460,7 +460,7 @@ LL | #[automatically_derived] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[automatically_derived]` attribute cannot be used on traits - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:314:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:313:5 | LL | #[automatically_derived] trait W { } | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -469,7 +469,7 @@ LL | #[automatically_derived] trait W { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[automatically_derived]` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:320:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:319:5 | LL | #[automatically_derived] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -478,7 +478,7 @@ LL | #[automatically_derived] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[no_mangle]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:329:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:328:1 | LL | #[no_mangle] | ^^^^^^^^^^^^ @@ -487,7 +487,7 @@ LL | #[no_mangle] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[no_mangle]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:335:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:334:17 | LL | mod inner { #![no_mangle] } | ^^^^^^^^^^^^^ @@ -496,7 +496,7 @@ LL | mod inner { #![no_mangle] } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[no_mangle]` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:343:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:342:5 | LL | #[no_mangle] struct S; | ^^^^^^^^^^^^ @@ -505,7 +505,7 @@ LL | #[no_mangle] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[no_mangle]` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:349:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:348:5 | LL | #[no_mangle] type T = S; | ^^^^^^^^^^^^ @@ -514,7 +514,7 @@ LL | #[no_mangle] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[no_mangle]` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:355:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:354:5 | LL | #[no_mangle] impl S { } | ^^^^^^^^^^^^ @@ -523,7 +523,7 @@ LL | #[no_mangle] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[should_panic]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:376:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:375:1 | LL | #[should_panic] | ^^^^^^^^^^^^^^^ @@ -532,7 +532,7 @@ LL | #[should_panic] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[should_panic]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:382:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:381:17 | LL | mod inner { #![should_panic] } | ^^^^^^^^^^^^^^^^ @@ -541,7 +541,7 @@ LL | mod inner { #![should_panic] } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[should_panic]` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:390:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:389:5 | LL | #[should_panic] struct S; | ^^^^^^^^^^^^^^^ @@ -550,7 +550,7 @@ LL | #[should_panic] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[should_panic]` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:396:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:395:5 | LL | #[should_panic] type T = S; | ^^^^^^^^^^^^^^^ @@ -559,7 +559,7 @@ LL | #[should_panic] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[should_panic]` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:402:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:401:5 | LL | #[should_panic] impl S { } | ^^^^^^^^^^^^^^^ @@ -568,7 +568,7 @@ LL | #[should_panic] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[ignore]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:409:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:408:1 | LL | #[ignore] | ^^^^^^^^^ @@ -577,7 +577,7 @@ LL | #[ignore] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[ignore]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:415:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:414:17 | LL | mod inner { #![ignore] } | ^^^^^^^^^^ @@ -586,7 +586,7 @@ LL | mod inner { #![ignore] } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[ignore]` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:423:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:422:5 | LL | #[ignore] struct S; | ^^^^^^^^^ @@ -595,7 +595,7 @@ LL | #[ignore] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[ignore]` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:429:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:428:5 | LL | #[ignore] type T = S; | ^^^^^^^^^ @@ -604,7 +604,7 @@ LL | #[ignore] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[ignore]` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:435:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:434:5 | LL | #[ignore] impl S { } | ^^^^^^^^^ @@ -613,7 +613,7 @@ LL | #[ignore] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[no_implicit_prelude]` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:446:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:445:5 | LL | #[no_implicit_prelude] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ @@ -622,7 +622,7 @@ LL | #[no_implicit_prelude] fn f() { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[no_implicit_prelude]` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:452:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:451:5 | LL | #[no_implicit_prelude] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ @@ -631,7 +631,7 @@ LL | #[no_implicit_prelude] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[no_implicit_prelude]` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:458:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:457:5 | LL | #[no_implicit_prelude] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ @@ -640,7 +640,7 @@ LL | #[no_implicit_prelude] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[no_implicit_prelude]` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:464:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:463:5 | LL | #[no_implicit_prelude] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ @@ -649,7 +649,7 @@ LL | #[no_implicit_prelude] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[macro_escape]` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:479:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:478:5 | LL | #[macro_escape] fn f() { } | ^^^^^^^^^^^^^^^ @@ -658,7 +658,7 @@ LL | #[macro_escape] fn f() { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[macro_escape]` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:485:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:484:5 | LL | #[macro_escape] struct S; | ^^^^^^^^^^^^^^^ @@ -667,7 +667,7 @@ LL | #[macro_escape] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[macro_escape]` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:491:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:490:5 | LL | #[macro_escape] type T = S; | ^^^^^^^^^^^^^^^ @@ -676,7 +676,7 @@ LL | #[macro_escape] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[macro_escape]` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:497:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:496:5 | LL | #[macro_escape] impl S { } | ^^^^^^^^^^^^^^^ @@ -685,13 +685,13 @@ LL | #[macro_escape] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_std]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:504:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:503:1 | LL | #[no_std] | ^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:506:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:505:1 | LL | / mod no_std { LL | | @@ -701,61 +701,61 @@ LL | | } | |_^ warning: the `#![no_std]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:508:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:507:17 | LL | mod inner { #![no_std] } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_std]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:511:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:510:5 | LL | #[no_std] fn f() { } | ^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:511:15 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:510:15 | LL | #[no_std] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_std]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:515:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:514:5 | LL | #[no_std] struct S; | ^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:515:15 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:514:15 | LL | #[no_std] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_std]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:519:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:518:5 | LL | #[no_std] type T = S; | ^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:519:15 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:518:15 | LL | #[no_std] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_std]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:523:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:522:5 | LL | #[no_std] impl S { } | ^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:523:15 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:522:15 | LL | #[no_std] impl S { } | ^^^^^^^^^^ warning: `#[cold]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:545:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:544:1 | LL | #[cold] | ^^^^^^^ @@ -764,7 +764,7 @@ LL | #[cold] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[cold]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:552:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:551:17 | LL | mod inner { #![cold] } | ^^^^^^^^ @@ -773,7 +773,7 @@ LL | mod inner { #![cold] } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[cold]` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:560:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:559:5 | LL | #[cold] struct S; | ^^^^^^^ @@ -782,7 +782,7 @@ LL | #[cold] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[cold]` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:566:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:565:5 | LL | #[cold] type T = S; | ^^^^^^^ @@ -791,7 +791,7 @@ LL | #[cold] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[cold]` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:572:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:571:5 | LL | #[cold] impl S { } | ^^^^^^^ @@ -800,7 +800,7 @@ LL | #[cold] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link_name]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:579:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:578:1 | LL | #[link_name = "1900"] | ^^^^^^^^^^^^^^^^^^^^^ @@ -809,7 +809,7 @@ LL | #[link_name = "1900"] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link_name]` attribute cannot be used on foreign modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:585:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:584:5 | LL | #[link_name = "1900"] | ^^^^^^^^^^^^^^^^^^^^^ @@ -818,7 +818,7 @@ LL | #[link_name = "1900"] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link_name]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:592:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:591:17 | LL | mod inner { #![link_name="1900"] } | ^^^^^^^^^^^^^^^^^^^^ @@ -827,7 +827,7 @@ LL | mod inner { #![link_name="1900"] } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link_name]` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:598:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:597:5 | LL | #[link_name = "1900"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^ @@ -836,7 +836,7 @@ LL | #[link_name = "1900"] fn f() { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link_name]` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:604:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:603:5 | LL | #[link_name = "1900"] struct S; | ^^^^^^^^^^^^^^^^^^^^^ @@ -845,7 +845,7 @@ LL | #[link_name = "1900"] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link_name]` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:610:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:609:5 | LL | #[link_name = "1900"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^ @@ -854,7 +854,7 @@ LL | #[link_name = "1900"] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link_name]` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:616:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:615:5 | LL | #[link_name = "1900"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^ @@ -863,7 +863,7 @@ LL | #[link_name = "1900"] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link_section]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:623:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:622:1 | LL | #[link_section = ",1800"] | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -872,7 +872,7 @@ LL | #[link_section = ",1800"] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link_section]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:629:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:628:17 | LL | mod inner { #![link_section=",1800"] } | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -881,7 +881,7 @@ LL | mod inner { #![link_section=",1800"] } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link_section]` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:637:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:636:5 | LL | #[link_section = ",1800"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -890,7 +890,7 @@ LL | #[link_section = ",1800"] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link_section]` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:643:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:642:5 | LL | #[link_section = ",1800"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -899,7 +899,7 @@ LL | #[link_section = ",1800"] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link_section]` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:649:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:648:5 | LL | #[link_section = ",1800"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -908,7 +908,7 @@ LL | #[link_section = ",1800"] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link_section]` attribute cannot be used on traits - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:655:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:654:5 | LL | #[link_section = ",1800"] | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -917,7 +917,7 @@ LL | #[link_section = ",1800"] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:689:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:688:1 | LL | #[link(name = "x")] | ^^^^^^^^^^^^^^^^^^^ @@ -926,7 +926,7 @@ LL | #[link(name = "x")] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:695:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:694:17 | LL | mod inner { #![link(name = "x")] } | ^^^^^^^^^^^^^^^^^^^^ @@ -935,7 +935,7 @@ LL | mod inner { #![link(name = "x")] } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link]` attribute cannot be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:701:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5 | LL | #[link(name = "x")] fn f() { } | ^^^^^^^^^^^^^^^^^^^ @@ -944,7 +944,7 @@ LL | #[link(name = "x")] fn f() { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link]` attribute cannot be used on structs - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:707:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:706:5 | LL | #[link(name = "x")] struct S; | ^^^^^^^^^^^^^^^^^^^ @@ -953,7 +953,7 @@ LL | #[link(name = "x")] struct S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link]` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:713:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:712:5 | LL | #[link(name = "x")] type T = S; | ^^^^^^^^^^^^^^^^^^^ @@ -962,7 +962,7 @@ LL | #[link(name = "x")] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link]` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:719:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:718:5 | LL | #[link(name = "x")] impl S { } | ^^^^^^^^^^^^^^^^^^^ @@ -971,7 +971,7 @@ LL | #[link(name = "x")] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[must_use]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:745:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:744:1 | LL | #[must_use] | ^^^^^^^^^^^ @@ -980,7 +980,7 @@ LL | #[must_use] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[must_use]` attribute cannot be used on modules - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:749:17 | LL | mod inner { #![must_use] } | ^^^^^^^^^^^^ @@ -989,7 +989,7 @@ LL | mod inner { #![must_use] } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[must_use]` attribute cannot be used on type aliases - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:759:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:758:5 | LL | #[must_use] type T = S; | ^^^^^^^^^^^ @@ -998,7 +998,7 @@ LL | #[must_use] type T = S; = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[must_use]` attribute cannot be used on inherent impl blocks - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:764:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:763:5 | LL | #[must_use] impl S { } | ^^^^^^^^^^^ @@ -1007,13 +1007,13 @@ LL | #[must_use] impl S { } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![windows_subsystem]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:770:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:769:1 | LL | #[windows_subsystem = "windows"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:772:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:771:1 | LL | / mod windows_subsystem { LL | | @@ -1023,67 +1023,67 @@ LL | | } | |_^ warning: the `#![windows_subsystem]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:774:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:773:17 | LL | mod inner { #![windows_subsystem="windows"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![windows_subsystem]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:777:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:5 | LL | #[windows_subsystem = "windows"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:777:38 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:38 | LL | #[windows_subsystem = "windows"] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![windows_subsystem]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:781:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:5 | LL | #[windows_subsystem = "windows"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:781:38 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:780:38 | LL | #[windows_subsystem = "windows"] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![windows_subsystem]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:785:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:5 | LL | #[windows_subsystem = "windows"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:785:38 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:784:38 | LL | #[windows_subsystem = "windows"] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![windows_subsystem]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:789:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:788:5 | LL | #[windows_subsystem = "windows"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:789:38 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:788:38 | LL | #[windows_subsystem = "windows"] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:796:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:795:1 | LL | #[crate_name = "0900"] | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:798:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:797:1 | LL | / mod crate_name { LL | | @@ -1093,67 +1093,67 @@ LL | | } | |_^ warning: the `#![crate_name]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:800:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:799:17 | LL | mod inner { #![crate_name="0900"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:803:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:802:5 | LL | #[crate_name = "0900"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:803:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:802:28 | LL | #[crate_name = "0900"] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:807:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:806:5 | LL | #[crate_name = "0900"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:807:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:806:28 | LL | #[crate_name = "0900"] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:811:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:810:5 | LL | #[crate_name = "0900"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:811:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:810:28 | LL | #[crate_name = "0900"] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:815:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:814:5 | LL | #[crate_name = "0900"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:815:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:814:28 | LL | #[crate_name = "0900"] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_type]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:820:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:819:1 | LL | #[crate_type = "0800"] | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:822:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:821:1 | LL | / mod crate_type { LL | | @@ -1163,67 +1163,67 @@ LL | | } | |_^ warning: the `#![crate_type]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:824:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:823:17 | LL | mod inner { #![crate_type="0800"] } | ^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_type]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:827:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:826:5 | LL | #[crate_type = "0800"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:827:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:826:28 | LL | #[crate_type = "0800"] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_type]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:831:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:830:5 | LL | #[crate_type = "0800"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:831:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:830:28 | LL | #[crate_type = "0800"] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_type]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:835:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:834:5 | LL | #[crate_type = "0800"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:835:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:834:28 | LL | #[crate_type = "0800"] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_type]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:839:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:838:5 | LL | #[crate_type = "0800"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:839:28 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:838:28 | LL | #[crate_type = "0800"] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![feature]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:844:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:843:1 | LL | #[feature(x0600)] | ^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:846:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:845:1 | LL | / mod feature { LL | | @@ -1233,67 +1233,67 @@ LL | | } | |_^ warning: the `#![feature]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:848:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:847:17 | LL | mod inner { #![feature(x0600)] } | ^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![feature]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:851:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:850:5 | LL | #[feature(x0600)] fn f() { } | ^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:851:23 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:850:23 | LL | #[feature(x0600)] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![feature]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:855:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:854:5 | LL | #[feature(x0600)] struct S; | ^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:855:23 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:854:23 | LL | #[feature(x0600)] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![feature]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:859:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:858:5 | LL | #[feature(x0600)] type T = S; | ^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:859:23 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:858:23 | LL | #[feature(x0600)] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![feature]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:863:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:862:5 | LL | #[feature(x0600)] impl S { } | ^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:863:23 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:862:23 | LL | #[feature(x0600)] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_main]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:869:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:868:1 | LL | #[no_main] | ^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:871:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:870:1 | LL | / mod no_main_1 { LL | | @@ -1303,67 +1303,67 @@ LL | | } | |_^ warning: the `#![no_main]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:873:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:872:17 | LL | mod inner { #![no_main] } | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_main]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:876:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:875:5 | LL | #[no_main] fn f() { } | ^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:876:16 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:875:16 | LL | #[no_main] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_main]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:880:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:879:5 | LL | #[no_main] struct S; | ^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:880:16 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:879:16 | LL | #[no_main] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_main]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:884:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:883:5 | LL | #[no_main] type T = S; | ^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:884:16 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:883:16 | LL | #[no_main] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_main]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:888:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:887:5 | LL | #[no_main] impl S { } | ^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:888:16 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:887:16 | LL | #[no_main] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_builtins]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:893:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:892:1 | LL | #[no_builtins] | ^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:895:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:894:1 | LL | / mod no_builtins { LL | | @@ -1373,67 +1373,67 @@ LL | | } | |_^ warning: the `#![no_builtins]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:897:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:896:17 | LL | mod inner { #![no_builtins] } | ^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_builtins]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:900:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:899:5 | LL | #[no_builtins] fn f() { } | ^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:900:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:899:20 | LL | #[no_builtins] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_builtins]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:904:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:903:5 | LL | #[no_builtins] struct S; | ^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:904:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:903:20 | LL | #[no_builtins] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_builtins]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:908:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:907:5 | LL | #[no_builtins] type T = S; | ^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:908:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:907:20 | LL | #[no_builtins] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![no_builtins]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:912:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:911:5 | LL | #[no_builtins] impl S { } | ^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:912:20 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:911:20 | LL | #[no_builtins] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![recursion_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:917:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:916:1 | LL | #[recursion_limit="0200"] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:919:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:918:1 | LL | / mod recursion_limit { LL | | @@ -1443,67 +1443,67 @@ LL | | } | |_^ warning: the `#![recursion_limit]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:921:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:920:17 | LL | mod inner { #![recursion_limit="0200"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![recursion_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:924:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:923:5 | LL | #[recursion_limit="0200"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:924:31 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:923:31 | LL | #[recursion_limit="0200"] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![recursion_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:928:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:927:5 | LL | #[recursion_limit="0200"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:928:31 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:927:31 | LL | #[recursion_limit="0200"] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![recursion_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:932:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:931:5 | LL | #[recursion_limit="0200"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:932:31 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:931:31 | LL | #[recursion_limit="0200"] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![recursion_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:936:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:935:5 | LL | #[recursion_limit="0200"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:936:31 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:935:31 | LL | #[recursion_limit="0200"] impl S { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![type_length_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:941:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:940:1 | LL | #[type_length_limit="0100"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this module - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:943:1 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:942:1 | LL | / mod type_length_limit { LL | | @@ -1513,61 +1513,61 @@ LL | | } | |_^ warning: the `#![type_length_limit]` attribute can only be used at the crate root - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:945:17 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:944:17 | LL | mod inner { #![type_length_limit="0100"] } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![type_length_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:948:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:947:5 | LL | #[type_length_limit="0100"] fn f() { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this function - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:948:33 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:947:33 | LL | #[type_length_limit="0100"] fn f() { } | ^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![type_length_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:952:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:951:5 | LL | #[type_length_limit="0100"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this struct - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:952:33 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:951:33 | LL | #[type_length_limit="0100"] struct S; | ^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![type_length_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:956:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:955:5 | LL | #[type_length_limit="0100"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this type alias - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:956:33 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:955:33 | LL | #[type_length_limit="0100"] type T = S; | ^^^^^^^^^^^ warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![type_length_limit]` - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:960:5 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:959:5 | LL | #[type_length_limit="0100"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: this attribute does not have an `!`, which means it is applied to this implementation block - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:960:33 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:959:33 | LL | #[type_length_limit="0100"] impl S { } | ^^^^^^^^^^ warning: `#[no_mangle]` attribute cannot be used on required trait methods - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:362:9 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:361:9 | LL | #[no_mangle] fn foo(); | ^^^^^^^^^^^^ @@ -1576,7 +1576,7 @@ LL | #[no_mangle] fn foo(); = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[no_mangle]` attribute cannot be used on provided trait methods - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:368:9 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:367:9 | LL | #[no_mangle] fn bar() {} | ^^^^^^^^^^^^ @@ -1585,7 +1585,7 @@ LL | #[no_mangle] fn bar() {} = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! warning: `#[link_section]` attribute cannot be used on required trait methods - --> $DIR/issue-43106-gating-of-builtin-attrs.rs:661:9 + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:660:9 | LL | #[link_section = ",1800"] | ^^^^^^^^^^^^^^^^^^^^^^^^^ 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/impl-trait/static-return-lifetime-infered.stderr b/tests/ui/impl-trait/static-return-lifetime-infered.stderr index 21e3187d01912..093bd3d227527 100644 --- a/tests/ui/impl-trait/static-return-lifetime-infered.stderr +++ b/tests/ui/impl-trait/static-return-lifetime-infered.stderr @@ -4,7 +4,7 @@ error[E0700]: hidden type for `impl Iterator` captures lifetime that LL | fn iter_values_anon(&self) -> impl Iterator { | ----- ----------------------- opaque type defined here | | - | hidden type `Map, {closure@$DIR/static-return-lifetime-infered.rs:7:27: 7:30}>` captures the anonymous lifetime defined here + | hidden type `Map, {closure@...}>` captures the anonymous lifetime defined here LL | self.x.iter().map(|a| a.0) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | @@ -19,7 +19,7 @@ error[E0700]: hidden type for `impl Iterator` captures lifetime that LL | fn iter_values<'a>(&'a self) -> impl Iterator { | -- ----------------------- opaque type defined here | | - | hidden type `Map, {closure@$DIR/static-return-lifetime-infered.rs:11:27: 11:30}>` captures the lifetime `'a` as defined here + | hidden type `Map, {closure@...}>` captures the lifetime `'a` as defined here LL | self.x.iter().map(|a| a.0) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | 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/lifetimes/trait-impl-mismatch-elided-lifetime-issue-65866.stderr b/tests/ui/lifetimes/trait-impl-mismatch-elided-lifetime-issue-65866.stderr index db69b4f3656e6..4c4f6032b0f7b 100644 --- a/tests/ui/lifetimes/trait-impl-mismatch-elided-lifetime-issue-65866.stderr +++ b/tests/ui/lifetimes/trait-impl-mismatch-elided-lifetime-issue-65866.stderr @@ -2,10 +2,10 @@ error: `impl` item signature doesn't match `trait` item signature --> $DIR/trait-impl-mismatch-elided-lifetime-issue-65866.rs:17:9 | LL | fn bar(&self, r: &mut Re); - | -------------------------- expected `fn(&'1 plain::Foo, &'2 mut plain::Re<'3>)` + | -------------------------- expected `fn(&'1 Foo, &'2 mut Re<'3>)` ... LL | fn bar<'a, 'b>(&'a self, _r: &'b mut Re<'a>) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 plain::Foo, &'2 mut plain::Re<'1>)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 Foo, &'2 mut Re<'1>)` | = note: expected signature `fn(&'1 plain::Foo, &'2 mut plain::Re<'3>)` found signature `fn(&'1 plain::Foo, &'2 mut plain::Re<'1>)` @@ -21,10 +21,10 @@ error: `impl` item signature doesn't match `trait` item signature --> $DIR/trait-impl-mismatch-elided-lifetime-issue-65866.rs:40:9 | LL | fn bar(&self, r: &mut Re); - | ------------------------------ expected `fn(&'1 with_type_args::Foo, &'2 mut with_type_args::Re<'3, u8>)` + | ------------------------------ expected `fn(&'1 Foo, &'2 mut Re<'3, u8>)` ... LL | fn bar<'a, 'b>(&'a self, _r: &'b mut Re<'a, u8>) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 with_type_args::Foo, &'2 mut with_type_args::Re<'1, u8>)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 Foo, &'2 mut Re<'1, u8>)` | = note: expected signature `fn(&'1 with_type_args::Foo, &'2 mut with_type_args::Re<'3, u8>)` found signature `fn(&'1 with_type_args::Foo, &'2 mut with_type_args::Re<'1, u8>)` diff --git a/tests/ui/limits/type-length-limit-enforcement.stderr b/tests/ui/limits/type-length-limit-enforcement.stderr index 0313f212d3f7e..637a626fc4e7e 100644 --- a/tests/ui/limits/type-length-limit-enforcement.stderr +++ b/tests/ui/limits/type-length-limit-enforcement.stderr @@ -8,7 +8,7 @@ LL | drop::>(None); = note: the full name for the type has been written to '$TEST_BUILD_DIR/type-length-limit-enforcement.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console -error: reached the type-length limit while instantiating `<{closure@...} as FnMut<()>>::call_mut` +error: reached the type-length limit while instantiating `<{closure@lang_start<()>::{closure#0}} as FnMut<()>>::call_mut` | = help: consider adding a `#![type_length_limit="10"]` attribute to your crate = note: the full name for the type has been written to '$TEST_BUILD_DIR/type-length-limit-enforcement.long-type-$LONG_TYPE_HASH.txt' diff --git a/tests/ui/lint/lint-unknown-feature-default.rs b/tests/ui/lint/lint-unknown-feature-default.rs deleted file mode 100644 index c1614e0f7ac68..0000000000000 --- a/tests/ui/lint/lint-unknown-feature-default.rs +++ /dev/null @@ -1,9 +0,0 @@ -//@ check-pass - -// Tests the default for the unused_features lint - -#![allow(stable_features)] -// FIXME(#44232) we should warn that this isn't used. -#![feature(rust1)] - -fn main() {} diff --git a/tests/ui/lint/lint-unknown-feature.rs b/tests/ui/lint/lint-unknown-feature.rs deleted file mode 100644 index b598f0d0106b1..0000000000000 --- a/tests/ui/lint/lint-unknown-feature.rs +++ /dev/null @@ -1,8 +0,0 @@ -//@ check-pass - -#![warn(unused_features)] - -#![allow(stable_features)] -// FIXME(#44232) we should warn that this isn't used. - -fn main() {} 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/recursion/issue-83150.stderr b/tests/ui/recursion/issue-83150.stderr index 9ec187f055018..a01f14b66794c 100644 --- a/tests/ui/recursion/issue-83150.stderr +++ b/tests/ui/recursion/issue-83150.stderr @@ -15,7 +15,7 @@ error[E0275]: overflow evaluating the requirement `Map<&mut std::ops::Range, = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_83150`) = note: required for `&mut Map<&mut Range, {closure@issue-83150.rs:12:24}>` to implement `Iterator` = note: 65 redundant requirements hidden - = note: required for `&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<_, _>, _>, _>, _>, _>` to implement `Iterator` + = note: required for `&mut Map<&mut Map<&mut _, {closure@...}>, {closure@...}>` to implement `Iterator` = note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-83150.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console diff --git a/tests/ui/suggestions/lifetimes/explicit-lifetime-suggestion-in-proper-span-issue-121267.stderr b/tests/ui/suggestions/lifetimes/explicit-lifetime-suggestion-in-proper-span-issue-121267.stderr index a9b0931499d95..e7751de6f51ab 100644 --- a/tests/ui/suggestions/lifetimes/explicit-lifetime-suggestion-in-proper-span-issue-121267.stderr +++ b/tests/ui/suggestions/lifetimes/explicit-lifetime-suggestion-in-proper-span-issue-121267.stderr @@ -8,7 +8,7 @@ LL | | LL | | .filter_map(|_| foo(src)) | |_________________________________^ | - = note: hidden type `FilterMap, {closure@$DIR/explicit-lifetime-suggestion-in-proper-span-issue-121267.rs:10:21: 10:24}>` captures lifetime `'_` + = note: hidden type `FilterMap, {closure@...}>` captures lifetime `'_` error: aborting due to 1 previous error diff --git a/tests/ui/traits/issue-91949-hangs-on-recursion.stderr b/tests/ui/traits/issue-91949-hangs-on-recursion.stderr index 3eff2944b472f..de16865629f89 100644 --- a/tests/ui/traits/issue-91949-hangs-on-recursion.stderr +++ b/tests/ui/traits/issue-91949-hangs-on-recursion.stderr @@ -24,7 +24,7 @@ LL | impl> Iterator for IteratorOfWrapped { | | | unsatisfied trait bound introduced here = note: 256 redundant requirements hidden - = note: required for `IteratorOfWrapped<(), Map>, _>>` to implement `Iterator` + = note: required for `IteratorOfWrapped<(), Map, {closure@...}>>` to implement `Iterator` = note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-91949-hangs-on-recursion.long-type-$LONG_TYPE_HASH.txt' = note: consider using `--verbose` to print the full type name to the console 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/traits/self-without-lifetime-constraint.stderr b/tests/ui/traits/self-without-lifetime-constraint.stderr index 8997d2a98b323..a82ff8eb0c269 100644 --- a/tests/ui/traits/self-without-lifetime-constraint.stderr +++ b/tests/ui/traits/self-without-lifetime-constraint.stderr @@ -2,10 +2,10 @@ error: `impl` item signature doesn't match `trait` item signature --> $DIR/self-without-lifetime-constraint.rs:46:5 | LL | fn column_result(value: ValueRef<'_>) -> FromSqlResult; - | -------------------------------------------------------------------- expected `fn(ValueRef<'1>) -> Result<(&'2 str, &'1 &'2 str), FromSqlError>` + | -------------------------------------------------------------------- expected `fn(ValueRef<'1>) -> Result<(&'2 str, &'1 &'2 str), _>` ... LL | fn column_result(value: ValueRef<'_>) -> FromSqlResult<&str, &&str> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(ValueRef<'1>) -> Result<(&'1 str, &'1 &'1 str), FromSqlError>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(ValueRef<'1>) -> Result<(&'1 str, &'1 &'1 str), _>` | = note: expected signature `fn(ValueRef<'1>) -> Result<(&'2 str, &'1 &'2 str), FromSqlError>` found signature `fn(ValueRef<'1>) -> Result<(&'1 str, &'1 &'1 str), FromSqlError>` 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