diff --git a/RELEASES.md b/RELEASES.md
index f180d740a3d17..c396cd8069d6d 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -1,3 +1,17 @@
+Version 1.94.1 (2026-03-26)
+===========================
+
+
+
+* [Fix `std::thread::spawn` on wasm32-wasip1-threads](https://github.com/rust-lang/rust/pull/153634)
+* [Remove new methods added to `std::os::windows::fs::OpenOptionsExt`](https://github.com/rust-lang/rust/pull/153491)
+ The new methods were unstable, but the trait itself is not sealed and so
+ cannot be extended with non-default methods.
+* [Clippy: fix ICE in `match_same_arms`](https://github.com/rust-lang/rust-clippy/pull/16685)
+* [Cargo: update tar to 0.4.45](https://github.com/rust-lang/cargo/pull/16769)
+ This resolves CVE-2026-33055 and CVE-2026-33056. Users of crates.io are not affected.
+ See [blog](https://blog.rust-lang.org/2026/03/21/cve-2026-33056/) for more details.
+
Version 1.94.0 (2026-03-05)
==========================
diff --git a/compiler/rustc_ast_lowering/src/delegation.rs b/compiler/rustc_ast_lowering/src/delegation.rs
index 0044913721f1f..03acf40ef5fee 100644
--- a/compiler/rustc_ast_lowering/src/delegation.rs
+++ b/compiler/rustc_ast_lowering/src/delegation.rs
@@ -146,12 +146,10 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
let (param_count, c_variadic) = self.param_count(sig_id);
- let mut generics =
- self.lower_delegation_generics(delegation, sig_id, item_id, span);
+ let mut generics = self.uplift_delegation_generics(delegation, sig_id, item_id);
let body_id = self.lower_delegation_body(
delegation,
- item_id,
is_method,
param_count,
&mut generics,
@@ -166,10 +164,8 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
let generics = self.arena.alloc(hir::Generics {
has_where_clause_predicates: false,
- params: self.arena.alloc_from_iter(generics.all_params(item_id, span, self)),
- predicates: self
- .arena
- .alloc_from_iter(generics.all_predicates(item_id, span, self)),
+ params: self.arena.alloc_from_iter(generics.all_params(span, self)),
+ predicates: self.arena.alloc_from_iter(generics.all_predicates(span, self)),
span,
where_clause_span: span,
});
@@ -294,19 +290,22 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
let decl_param_count = param_count - c_variadic as usize;
let inputs = self.arena.alloc_from_iter((0..decl_param_count).map(|arg| hir::Ty {
hir_id: self.next_id(),
- kind: hir::TyKind::InferDelegation(sig_id, hir::InferDelegationKind::Input(arg)),
+ kind: hir::TyKind::InferDelegation(hir::InferDelegation::Sig(
+ sig_id,
+ hir::InferDelegationSig::Input(arg),
+ )),
span,
}));
let output = self.arena.alloc(hir::Ty {
hir_id: self.next_id(),
- kind: hir::TyKind::InferDelegation(
+ kind: hir::TyKind::InferDelegation(hir::InferDelegation::Sig(
sig_id,
- hir::InferDelegationKind::Output(self.arena.alloc(hir::DelegationGenerics {
+ hir::InferDelegationSig::Output(self.arena.alloc(hir::DelegationGenerics {
child_args_segment_id: generics.child.args_segment_id,
parent_args_segment_id: generics.parent.args_segment_id,
})),
- ),
+ )),
span,
});
@@ -399,7 +398,6 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
fn lower_delegation_body(
&mut self,
delegation: &Delegation,
- item_id: NodeId,
is_method: bool,
param_count: usize,
generics: &mut GenericsGenerationResults<'hir>,
@@ -434,7 +432,7 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
args.push(arg);
}
- let final_expr = this.finalize_body_lowering(delegation, item_id, args, generics, span);
+ let final_expr = this.finalize_body_lowering(delegation, args, generics, span);
(this.arena.alloc_from_iter(parameters), final_expr)
})
@@ -471,7 +469,6 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
fn finalize_body_lowering(
&mut self,
delegation: &Delegation,
- item_id: NodeId,
args: Vec>,
generics: &mut GenericsGenerationResults<'hir>,
span: Span,
@@ -501,7 +498,7 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
// FIXME(fn_delegation): proper support for parent generics propagation
// in method call scenario.
- let segment = self.process_segment(item_id, span, &segment, &mut generics.child, false);
+ let segment = self.process_segment(span, &segment, &mut generics.child, false);
let segment = self.arena.alloc(segment);
self.arena.alloc(hir::Expr {
@@ -528,7 +525,7 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
new_path.segments = self.arena.alloc_from_iter(
new_path.segments.iter().enumerate().map(|(idx, segment)| {
let mut process_segment = |result, add_lifetimes| {
- self.process_segment(item_id, span, segment, result, add_lifetimes)
+ self.process_segment(span, segment, result, add_lifetimes)
};
if idx + 2 == len {
@@ -544,8 +541,7 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
hir::QPath::Resolved(ty, self.arena.alloc(new_path))
}
hir::QPath::TypeRelative(ty, segment) => {
- let segment =
- self.process_segment(item_id, span, segment, &mut generics.child, false);
+ let segment = self.process_segment(span, segment, &mut generics.child, false);
hir::QPath::TypeRelative(ty, self.arena.alloc(segment))
}
@@ -569,7 +565,6 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
fn process_segment(
&mut self,
- item_id: NodeId,
span: Span,
segment: &hir::PathSegment<'hir>,
result: &mut GenericsGenerationResult<'hir>,
@@ -577,15 +572,14 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
) -> hir::PathSegment<'hir> {
let details = result.generics.args_propagation_details();
- // The first condition is needed when there is SelfAndUserSpecified case,
- // we don't want to propagate generics params in this situation.
- let segment = if details.should_propagate
- && let Some(args) = result
- .generics
- .into_hir_generics(self, item_id, span)
- .into_generic_args(self, add_lifetimes, span)
- {
- hir::PathSegment { args: Some(args), ..segment.clone() }
+ let segment = if details.should_propagate {
+ let generics = result.generics.into_hir_generics(self, span);
+ let args = generics.into_generic_args(self, add_lifetimes, span);
+
+ // Needed for better error messages (`trait-impl-wrong-args-count.rs` test).
+ let args = if args.is_empty() { None } else { Some(args) };
+
+ hir::PathSegment { args, ..segment.clone() }
} else {
segment.clone()
};
diff --git a/compiler/rustc_ast_lowering/src/delegation/generics.rs b/compiler/rustc_ast_lowering/src/delegation/generics.rs
index d6d8819d8c474..ee1ac9aa5cd8d 100644
--- a/compiler/rustc_ast_lowering/src/delegation/generics.rs
+++ b/compiler/rustc_ast_lowering/src/delegation/generics.rs
@@ -5,10 +5,8 @@ use rustc_hir as hir;
use rustc_hir::def_id::DefId;
use rustc_middle::ty::GenericParamDefKind;
use rustc_middle::{bug, ty};
-use rustc_span::sym::{self};
use rustc_span::symbol::kw;
use rustc_span::{Ident, Span};
-use thin_vec::{ThinVec, thin_vec};
use crate::{LoweringContext, ResolverAstLoweringExt};
@@ -16,34 +14,33 @@ pub(super) enum DelegationGenerics {
/// User-specified args are present: `reuse foo::;`.
UserSpecified,
/// The default case when no user-specified args are present: `reuse Trait::foo;`.
- Default(Option),
+ Default(T),
/// In free-to-trait reuse, when user specified args for trait `reuse Trait::::foo;`
/// in this case we need to both generate `Self` and process user args.
- SelfAndUserSpecified(Option),
+ SelfAndUserSpecified(T),
/// In delegations from trait impl to other entities like free functions or trait functions,
/// we want to generate a function whose generics matches generics of signature function
/// in trait.
- TraitImpl(Option, bool /* Has user-specified args */),
+ TraitImpl(T, bool /* Has user-specified args */),
}
-/// Used for storing either AST generics or their lowered HIR version. Firstly we obtain
-/// AST generics either from local function from AST index or from external function
-/// through `tcx`. Next, at some point of generics processing we need to lower those
-/// generics to HIR, for this purpose we use `into_hir_generics` that lowers AST generics
-/// and replaces Ast variant with Hir. Such approach is useful as we can call this method
-/// at any time knowing that lowering will occur at most only once. Then, in order to obtain generic
+/// Used for storing either ty generics or their uplifted HIR version. First we obtain
+/// ty generics. Next, at some point of generics processing we need to uplift those
+/// generics to HIR, for this purpose we use `into_hir_generics` that uplifts ty generics
+/// and replaces Ty variant with Hir. Such approach is useful as we can call this method
+/// at any time knowing that uplifting will occur at most only once. Then, in order to obtain generic
/// params or args we use `hir_generics_or_empty` or `into_generic_args` functions.
-/// There also may be situations when we obtained AST generics but never lowered them to HIR,
+/// There also may be situations when we obtained ty generics but never uplifted them to HIR,
/// meaning we did not propagate them and thus we do not need to generate generic params
/// (i.e., method call scenarios), in such a case this approach helps
-/// a lot as if `into_hir_generics` will not be called then lowering will not happen.
-pub(super) enum HirOrAstGenerics<'hir> {
- Ast(DelegationGenerics),
+/// a lot as if `into_hir_generics` will not be called then uplifting will not happen.
+pub(super) enum HirOrTyGenerics<'hir> {
+ Ty(DelegationGenerics<&'hir [ty::GenericParamDef]>),
Hir(DelegationGenerics<&'hir hir::Generics<'hir>>),
}
pub(super) struct GenericsGenerationResult<'hir> {
- pub(super) generics: HirOrAstGenerics<'hir>,
+ pub(super) generics: HirOrTyGenerics<'hir>,
pub(super) args_segment_id: Option,
}
@@ -78,35 +75,31 @@ impl DelegationGenerics {
}
}
-impl<'hir> HirOrAstGenerics<'hir> {
+impl<'hir> HirOrTyGenerics<'hir> {
pub(super) fn into_hir_generics(
&mut self,
ctx: &mut LoweringContext<'_, 'hir, impl ResolverAstLoweringExt<'hir>>,
- item_id: NodeId,
span: Span,
- ) -> &mut HirOrAstGenerics<'hir> {
- if let HirOrAstGenerics::Ast(generics) = self {
- let process_params = |generics: &mut Generics| {
- ctx.lower_delegation_generic_params(item_id, span, &mut generics.params)
+ ) -> &mut HirOrTyGenerics<'hir> {
+ if let HirOrTyGenerics::Ty(params) = self {
+ let mut uplift_params = |generics: &'hir [ty::GenericParamDef]| {
+ ctx.uplift_delegation_generic_params(span, generics)
};
- let hir_generics = match generics {
+ let hir_generics = match params {
DelegationGenerics::UserSpecified => DelegationGenerics::UserSpecified,
- DelegationGenerics::Default(generics) => {
- DelegationGenerics::Default(generics.as_mut().map(process_params))
+ DelegationGenerics::Default(params) => {
+ DelegationGenerics::Default(uplift_params(params))
}
- DelegationGenerics::SelfAndUserSpecified(generics) => {
- DelegationGenerics::SelfAndUserSpecified(generics.as_mut().map(process_params))
+ DelegationGenerics::SelfAndUserSpecified(params) => {
+ DelegationGenerics::SelfAndUserSpecified(uplift_params(params))
}
- DelegationGenerics::TraitImpl(generics, user_specified) => {
- DelegationGenerics::TraitImpl(
- generics.as_mut().map(process_params),
- *user_specified,
- )
+ DelegationGenerics::TraitImpl(params, user_specified) => {
+ DelegationGenerics::TraitImpl(uplift_params(params), *user_specified)
}
};
- *self = HirOrAstGenerics::Hir(hir_generics);
+ *self = HirOrTyGenerics::Hir(hir_generics);
}
self
@@ -114,14 +107,12 @@ impl<'hir> HirOrAstGenerics<'hir> {
fn hir_generics_or_empty(&self) -> &'hir hir::Generics<'hir> {
match self {
- HirOrAstGenerics::Ast(_) => hir::Generics::empty(),
- HirOrAstGenerics::Hir(hir_generics) => match hir_generics {
+ HirOrTyGenerics::Ty(_) => hir::Generics::empty(),
+ HirOrTyGenerics::Hir(hir_generics) => match hir_generics {
DelegationGenerics::UserSpecified => hir::Generics::empty(),
DelegationGenerics::Default(generics)
| DelegationGenerics::SelfAndUserSpecified(generics)
- | DelegationGenerics::TraitImpl(generics, _) => {
- generics.unwrap_or(hir::Generics::empty())
- }
+ | DelegationGenerics::TraitImpl(generics, _) => generics,
},
}
}
@@ -131,43 +122,41 @@ impl<'hir> HirOrAstGenerics<'hir> {
ctx: &mut LoweringContext<'_, 'hir, impl ResolverAstLoweringExt<'hir>>,
add_lifetimes: bool,
span: Span,
- ) -> Option<&'hir hir::GenericArgs<'hir>> {
+ ) -> &'hir hir::GenericArgs<'hir> {
match self {
- HirOrAstGenerics::Ast(_) => {
- bug!("Attempting to get generic args before lowering to HIR")
+ HirOrTyGenerics::Ty(_) => {
+ bug!("Attempting to get generic args before uplifting to HIR")
}
- HirOrAstGenerics::Hir(hir_generics) => match hir_generics {
- DelegationGenerics::UserSpecified => None,
+ HirOrTyGenerics::Hir(hir_generics) => match hir_generics {
+ DelegationGenerics::UserSpecified => hir::GenericArgs::NONE,
DelegationGenerics::Default(generics)
| DelegationGenerics::SelfAndUserSpecified(generics)
- | DelegationGenerics::TraitImpl(generics, _) => generics.map(|generics| {
+ | DelegationGenerics::TraitImpl(generics, _) => {
ctx.create_generics_args_from_params(generics.params, add_lifetimes, span)
- }),
+ }
},
}
}
pub(super) fn args_propagation_details(&self) -> GenericArgsPropagationDetails {
match self {
- HirOrAstGenerics::Ast(ast_generics) => ast_generics.args_propagation_details(),
- HirOrAstGenerics::Hir(hir_generics) => hir_generics.args_propagation_details(),
+ HirOrTyGenerics::Ty(ty_generics) => ty_generics.args_propagation_details(),
+ HirOrTyGenerics::Hir(hir_generics) => hir_generics.args_propagation_details(),
}
}
}
-impl<'a> GenericsGenerationResult<'a> {
- fn new(generics: DelegationGenerics) -> GenericsGenerationResult<'a> {
- GenericsGenerationResult {
- generics: HirOrAstGenerics::Ast(generics),
- args_segment_id: None,
- }
+impl<'hir> GenericsGenerationResult<'hir> {
+ fn new(
+ generics: DelegationGenerics<&'hir [ty::GenericParamDef]>,
+ ) -> GenericsGenerationResult<'hir> {
+ GenericsGenerationResult { generics: HirOrTyGenerics::Ty(generics), args_segment_id: None }
}
}
impl<'hir> GenericsGenerationResults<'hir> {
pub(super) fn all_params(
&mut self,
- item_id: NodeId,
span: Span,
ctx: &mut LoweringContext<'_, 'hir, impl ResolverAstLoweringExt<'hir>>,
) -> impl Iterator- > {
@@ -176,21 +165,14 @@ impl<'hir> GenericsGenerationResults<'hir> {
// method call will be supported (if HIR generics were not obtained
// then it means that we did not propagated them, thus we do not need
// to generate params).
- let parent = self
- .parent
- .generics
- .into_hir_generics(ctx, item_id, span)
- .hir_generics_or_empty()
- .params;
-
- let child = self
- .child
- .generics
- .into_hir_generics(ctx, item_id, span)
- .hir_generics_or_empty()
- .params;
-
- // Order generics, firstly we have parent and child lifetimes,
+ let mut create_params = |result: &mut GenericsGenerationResult<'hir>| {
+ result.generics.into_hir_generics(ctx, span).hir_generics_or_empty().params
+ };
+
+ let parent = create_params(&mut self.parent);
+ let child = create_params(&mut self.child);
+
+ // Order generics, first we have parent and child lifetimes,
// then parent and child types and consts.
// `generics_of` in `rustc_hir_analysis` will order them anyway,
// however we want the order to be consistent in HIR too.
@@ -203,13 +185,12 @@ impl<'hir> GenericsGenerationResults<'hir> {
.copied()
}
- /// As we add hack predicates(`'a: 'a`) for all lifetimes (see `lower_delegation_generic_params`
+ /// As we add hack predicates(`'a: 'a`) for all lifetimes (see `uplift_delegation_generic_params`
/// and `generate_lifetime_predicate` functions) we need to add them to delegation generics.
/// Those predicates will not affect resulting predicate inheritance and folding
/// in `rustc_hir_analysis`, as we inherit all predicates from delegation signature.
pub(super) fn all_predicates(
&mut self,
- item_id: NodeId,
span: Span,
ctx: &mut LoweringContext<'_, 'hir, impl ResolverAstLoweringExt<'hir>>,
) -> impl Iterator
- > {
@@ -218,31 +199,23 @@ impl<'hir> GenericsGenerationResults<'hir> {
// method call will be supported (if HIR generics were not obtained
// then it means that we did not propagated them, thus we do not need
// to generate predicates).
- self.parent
- .generics
- .into_hir_generics(ctx, item_id, span)
- .hir_generics_or_empty()
- .predicates
- .into_iter()
- .chain(
- self.child
- .generics
- .into_hir_generics(ctx, item_id, span)
- .hir_generics_or_empty()
- .predicates
- .into_iter(),
- )
- .copied()
+ let mut create_predicates = |result: &mut GenericsGenerationResult<'hir>| {
+ result.generics.into_hir_generics(ctx, span).hir_generics_or_empty().predicates
+ };
+
+ let parent = create_predicates(&mut self.parent);
+ let child = create_predicates(&mut self.child);
+
+ parent.into_iter().chain(child).copied()
}
}
impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
- pub(super) fn lower_delegation_generics(
+ pub(super) fn uplift_delegation_generics(
&mut self,
delegation: &Delegation,
sig_id: DefId,
item_id: NodeId,
- span: Span,
) -> GenericsGenerationResults<'hir> {
let delegation_parent_kind =
self.tcx.def_kind(self.tcx.local_parent(self.local_def_id(item_id)));
@@ -251,15 +224,16 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
let len = segments.len();
let child_user_specified = segments[len - 1].args.is_some();
+ let sig_params = &self.tcx.generics_of(sig_id).own_params[..];
+
// If we are in trait impl always generate function whose generics matches
// those that are defined in trait.
if matches!(delegation_parent_kind, DefKind::Impl { of_trait: true }) {
// Considering parent generics, during signature inheritance
// we will take those args that are in trait impl header trait ref.
- let parent = GenericsGenerationResult::new(DelegationGenerics::Default(None));
+ let parent = GenericsGenerationResult::new(DelegationGenerics::TraitImpl(&[], true));
- let generics = self.get_external_generics(sig_id, false, span);
- let child = DelegationGenerics::TraitImpl(generics, child_user_specified);
+ let child = DelegationGenerics::TraitImpl(sig_params, child_user_specified);
let child = GenericsGenerationResult::new(child);
return GenericsGenerationResults { parent, child };
@@ -268,38 +242,37 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
let delegation_in_free_ctx =
!matches!(delegation_parent_kind, DefKind::Trait | DefKind::Impl { .. });
- let root_function_in_trait =
- matches!(self.tcx.def_kind(self.tcx.parent(sig_id)), DefKind::Trait);
-
- let generate_self = delegation_in_free_ctx && root_function_in_trait;
-
- let parent_generics_factory = |this: &mut Self, user_specified: bool| {
- this.get_parent_generics(this.tcx.parent(sig_id), generate_self, user_specified, span)
- };
+ let sig_parent = self.tcx.parent(sig_id);
+ let sig_in_trait = matches!(self.tcx.def_kind(sig_parent), DefKind::Trait);
let can_add_generics_to_parent = len >= 2
&& self.get_resolution_id(segments[len - 2].id).is_some_and(|def_id| {
matches!(self.tcx.def_kind(def_id), DefKind::Trait | DefKind::TraitAlias)
});
+ let generate_self = delegation_in_free_ctx && sig_in_trait;
let parent_generics = if can_add_generics_to_parent {
+ let sig_parent_params = &self.tcx.generics_of(sig_parent).own_params[..];
+
if segments[len - 2].args.is_some() {
if generate_self {
- DelegationGenerics::SelfAndUserSpecified(parent_generics_factory(self, true))
+ // Take only first Self parameter, it is trait so Self must be present.
+ DelegationGenerics::SelfAndUserSpecified(&sig_parent_params[..1])
} else {
DelegationGenerics::UserSpecified
}
} else {
- DelegationGenerics::Default(parent_generics_factory(self, false))
+ let skip_self = usize::from(!generate_self);
+ DelegationGenerics::Default(&sig_parent_params[skip_self..])
}
} else {
- DelegationGenerics::Default(None)
+ DelegationGenerics::<&'hir [ty::GenericParamDef]>::Default(&[])
};
let child_generics = if child_user_specified {
DelegationGenerics::UserSpecified
} else {
- DelegationGenerics::Default(self.get_external_generics(sig_id, false, span))
+ DelegationGenerics::Default(sig_params)
};
GenericsGenerationResults {
@@ -308,59 +281,71 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
}
}
- fn lower_delegation_generic_params(
+ fn uplift_delegation_generic_params(
&mut self,
- item_id: NodeId,
span: Span,
- params: &mut ThinVec,
+ params: &'hir [ty::GenericParamDef],
) -> &'hir hir::Generics<'hir> {
- for p in params.iter_mut() {
- // We want to create completely new params, so we generate
- // a new id, otherwise assertions will be triggered.
- p.id = self.next_node_id();
-
- // Remove default params, as they are not supported on functions
- // and there will duplicate DefId when we try to lower them later.
- match &mut p.kind {
- GenericParamKind::Lifetime => {}
- GenericParamKind::Type { default } => *default = None,
- GenericParamKind::Const { default, .. } => *default = None,
- }
+ let params = self.arena.alloc_from_iter(params.iter().map(|p| {
+ let def_kind = match p.kind {
+ GenericParamDefKind::Lifetime => DefKind::LifetimeParam,
+ GenericParamDefKind::Type { .. } => DefKind::TyParam,
+ GenericParamDefKind::Const { .. } => DefKind::ConstParam,
+ };
- // Note that we use self.disambiguator here, if we will create new every time
- // we will get ICE if params have the same name.
- self.resolver.insert_new_def_id(
- p.id,
- self.tcx
- .create_def(
- self.local_def_id(item_id),
- Some(p.ident.name),
- match p.kind {
- GenericParamKind::Lifetime => DefKind::LifetimeParam,
- GenericParamKind::Type { .. } => DefKind::TyParam,
- GenericParamKind::Const { .. } => DefKind::ConstParam,
- },
- None,
- &mut self.disambiguator,
- )
- .def_id(),
- );
- }
+ let param_ident = Ident::new(p.name, span);
+ let def_name = Some(param_ident.name);
+ let path_data = def_kind.def_path_data(def_name);
+ let node_id = self.next_node_id();
- // Fallback to default generic param lowering, we modified them in the loop above.
- let params = self.arena.alloc_from_iter(
- params.iter().map(|p| self.lower_generic_param(p, hir::GenericParamSource::Generics)),
- );
+ let def_id = self.create_def(node_id, def_name, def_kind, path_data, span);
+
+ let kind = match p.kind {
+ GenericParamDefKind::Lifetime => {
+ hir::GenericParamKind::Lifetime { kind: hir::LifetimeParamKind::Explicit }
+ }
+ GenericParamDefKind::Type { synthetic, .. } => {
+ hir::GenericParamKind::Type { default: None, synthetic }
+ }
+ GenericParamDefKind::Const { .. } => {
+ let hir_id = self.next_id();
+ let kind = hir::TyKind::InferDelegation(hir::InferDelegation::DefId(p.def_id));
+
+ hir::GenericParamKind::Const {
+ ty: self.arena.alloc(hir::Ty { kind, hir_id, span }),
+ default: None,
+ }
+ }
+ };
+
+ // Important: we don't use `self.next_id()` as we want to execute
+ // `lower_node_id` routine so param's id is added to `self.children`.
+ let hir_id = self.lower_node_id(node_id);
+
+ hir::GenericParam {
+ hir_id,
+ colon_span: Some(span),
+ def_id,
+ kind,
+ name: hir::ParamName::Plain(param_ident),
+ pure_wrt_drop: p.pure_wrt_drop,
+ source: hir::GenericParamSource::Generics,
+ span,
+ }
+ }));
// HACK: for now we generate predicates such that all lifetimes are early bound,
// we can not not generate early-bound lifetimes, but we can't know which of them
// are late-bound at this level of compilation.
// FIXME(fn_delegation): proper support for late bound lifetimes.
+ let predicates =
+ self.arena.alloc_from_iter(params.iter().filter_map(|p| {
+ p.is_lifetime().then(|| self.generate_lifetime_predicate(p, span))
+ }));
+
self.arena.alloc(hir::Generics {
params,
- predicates: self.arena.alloc_from_iter(params.iter().filter_map(|p| {
- p.is_lifetime().then(|| self.generate_lifetime_predicate(p, span))
- })),
+ predicates,
has_where_clause_predicates: false,
where_clause_span: span,
span,
@@ -376,11 +361,9 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
this.arena.alloc(hir::Lifetime {
hir_id: this.next_id(),
ident: p.name.ident(),
- kind: rustc_hir::LifetimeKind::Param(p.def_id),
- source: rustc_hir::LifetimeSource::Path {
- angle_brackets: rustc_hir::AngleBrackets::Full,
- },
- syntax: rustc_hir::LifetimeSyntax::ExplicitBound,
+ kind: hir::LifetimeKind::Param(p.def_id),
+ source: hir::LifetimeSource::Path { angle_brackets: hir::AngleBrackets::Full },
+ syntax: hir::LifetimeSyntax::ExplicitBound,
})
};
@@ -472,117 +455,4 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
span_ext: span,
})
}
-
- fn get_external_generics(
- &mut self,
- id: DefId,
- processing_parent: bool,
- span: Span,
- ) -> Option {
- let generics = self.tcx.generics_of(id);
- if generics.own_params.is_empty() {
- return None;
- }
-
- // Skip first Self parameter if we are in trait, it will be added later.
- let to_skip = (processing_parent && generics.has_self) as usize;
-
- Some(Generics {
- params: generics
- .own_params
- .iter()
- .skip(to_skip)
- .map(|p| GenericParam {
- attrs: Default::default(),
- bounds: Default::default(),
- colon_span: None,
- id: self.next_node_id(),
- ident: Ident::new(p.name, span),
- is_placeholder: false,
- kind: match p.kind {
- GenericParamDefKind::Lifetime => GenericParamKind::Lifetime,
- GenericParamDefKind::Type { .. } => {
- GenericParamKind::Type { default: None }
- }
- GenericParamDefKind::Const { .. } => self.map_const_kind(p, span),
- },
- })
- .collect(),
- where_clause: Default::default(),
- span,
- })
- }
-
- fn map_const_kind(&mut self, p: &ty::GenericParamDef, span: Span) -> GenericParamKind {
- let const_type = self.tcx.type_of(p.def_id).instantiate_identity();
-
- let (type_symbol, res) = match const_type.kind() {
- ty::Bool => (sym::bool, Res::PrimTy(hir::PrimTy::Bool)),
- ty::Uint(uint) => (uint.name(), Res::PrimTy(hir::PrimTy::Uint(*uint))),
- ty::Int(int) => (int.name(), Res::PrimTy(hir::PrimTy::Int(*int))),
- ty::Char => (sym::char, Res::PrimTy(hir::PrimTy::Char)),
- _ => {
- self.tcx
- .dcx()
- .span_delayed_bug(span, format!("Unexpected const type: {}", const_type));
-
- (sym::dummy, Res::Err)
- }
- };
-
- let node_id = self.next_node_id();
-
- self.resolver.insert_partial_res(node_id, hir::def::PartialRes::new(res));
-
- GenericParamKind::Const {
- ty: Box::new(Ty {
- id: node_id,
- kind: TyKind::Path(
- None,
- Path {
- segments: thin_vec![PathSegment {
- ident: Ident::new(type_symbol, span),
- id: self.next_node_id(),
- args: None
- }],
- span,
- tokens: None,
- },
- ),
- span,
- tokens: None,
- }),
- span,
- default: None,
- }
- }
-
- fn get_parent_generics(
- &mut self,
- id: DefId,
- add_self: bool,
- user_specified: bool,
- span: Span,
- ) -> Option {
- // If args are user-specified we still maybe need to add self.
- let mut generics =
- if user_specified { None } else { self.get_external_generics(id, true, span) };
-
- if add_self {
- generics.get_or_insert_default().params.insert(
- 0,
- GenericParam {
- id: self.next_node_id(),
- ident: Ident::new(kw::SelfUpper, span),
- attrs: Default::default(),
- bounds: vec![],
- is_placeholder: false,
- kind: GenericParamKind::Type { default: None },
- colon_span: None,
- },
- );
- }
-
- generics
- }
}
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index a2be51cfa31b4..5fcc8f0161194 100644
--- a/compiler/rustc_ast_lowering/src/lib.rs
+++ b/compiler/rustc_ast_lowering/src/lib.rs
@@ -678,7 +678,7 @@ pub fn lower_delayed_owner(tcx: TyCtxt<'_>, def_id: LocalDefId) {
lowerer.lower_node(def_id);
- for (&child_def_id, &owner) in &map {
+ for (child_def_id, owner) in map {
tcx.feed_delayed_owner(child_def_id, owner);
}
}
@@ -1265,7 +1265,7 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
};
gen_args_ctor.into_generic_args(self)
} else {
- self.arena.alloc(hir::GenericArgs::none())
+ hir::GenericArgs::NONE
};
let kind = match &constraint.kind {
AssocItemConstraintKind::Equality { term } => {
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs
index 9526143fcace5..a5cb654043625 100644
--- a/compiler/rustc_hir/src/hir.rs
+++ b/compiler/rustc_hir/src/hir.rs
@@ -397,12 +397,7 @@ impl<'hir> PathSegment<'hir> {
}
pub fn args(&self) -> &GenericArgs<'hir> {
- if let Some(ref args) = self.args {
- args
- } else {
- const DUMMY: &GenericArgs<'_> = &GenericArgs::none();
- DUMMY
- }
+ if let Some(ref args) = self.args { args } else { GenericArgs::NONE }
}
}
@@ -643,14 +638,12 @@ pub struct GenericArgs<'hir> {
}
impl<'hir> GenericArgs<'hir> {
- pub const fn none() -> Self {
- Self {
- args: &[],
- constraints: &[],
- parenthesized: GenericArgsParentheses::No,
- span_ext: DUMMY_SP,
- }
- }
+ pub const NONE: &'hir GenericArgs<'hir> = &GenericArgs {
+ args: &[],
+ constraints: &[],
+ parenthesized: GenericArgsParentheses::No,
+ span_ext: DUMMY_SP,
+ };
/// Obtain the list of input types and the output type if the generic arguments are parenthesized.
///
@@ -3765,12 +3758,21 @@ pub struct DelegationGenerics {
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, HashStable_Generic)]
-pub enum InferDelegationKind<'hir> {
+pub enum InferDelegationSig<'hir> {
Input(usize),
// Place generics info here, as we always specify output type for delegations.
Output(&'hir DelegationGenerics),
}
+#[derive(Debug, Clone, Copy, PartialEq, Eq, HashStable_Generic)]
+pub enum InferDelegation<'hir> {
+ /// Infer the type of this `DefId` through `tcx.type_of(def_id).instantiate_identity()`,
+ /// used for const types propagation.
+ DefId(DefId),
+ /// Used during signature inheritance, `DefId` corresponds to the signature function.
+ Sig(DefId, InferDelegationSig<'hir>),
+}
+
/// The various kinds of types recognized by the compiler.
///
/// For an explanation of the `Unambig` generic parameter see the dev-guide:
@@ -3780,7 +3782,7 @@ pub enum InferDelegationKind<'hir> {
#[derive(Debug, Clone, Copy, HashStable_Generic)]
pub enum TyKind<'hir, Unambig = ()> {
/// Actual type should be inherited from `DefId` signature
- InferDelegation(DefId, InferDelegationKind<'hir>),
+ InferDelegation(InferDelegation<'hir>),
/// A variable length slice (i.e., `[T]`).
Slice(&'hir Ty<'hir>),
/// A fixed length array (i.e., `[T; n]`).
@@ -3931,7 +3933,7 @@ pub struct FnDecl<'hir> {
impl<'hir> FnDecl<'hir> {
pub fn opt_delegation_sig_id(&self) -> Option {
if let FnRetTy::Return(ty) = self.output
- && let TyKind::InferDelegation(sig_id, _) = ty.kind
+ && let TyKind::InferDelegation(InferDelegation::Sig(sig_id, _)) = ty.kind
{
return Some(sig_id);
}
@@ -3940,8 +3942,8 @@ impl<'hir> FnDecl<'hir> {
pub fn opt_delegation_generics(&self) -> Option<&'hir DelegationGenerics> {
if let FnRetTy::Return(ty) = self.output
- && let TyKind::InferDelegation(_, kind) = ty.kind
- && let InferDelegationKind::Output(generics) = kind
+ && let TyKind::InferDelegation(InferDelegation::Sig(_, kind)) = ty.kind
+ && let InferDelegationSig::Output(generics) = kind
{
return Some(generics);
}
diff --git a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs
index 18244d62f2ae6..5bb4166bf6cb3 100644
--- a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs
+++ b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs
@@ -925,7 +925,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
hir::FnRetTy::Return(ty) => Some(ty),
};
if let Some(ty) = output
- && let hir::TyKind::InferDelegation(sig_id, _) = ty.kind
+ && let hir::TyKind::InferDelegation(hir::InferDelegation::Sig(sig_id, _)) = ty.kind
{
let bound_vars: Vec<_> =
self.tcx.fn_sig(sig_id).skip_binder().bound_vars().iter().collect();
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 338cba7252726..2cfde9cd940db 100644
--- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
+++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
@@ -2960,12 +2960,19 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
}
}
- fn lower_delegation_ty(&self, idx: hir::InferDelegationKind<'tcx>) -> Ty<'tcx> {
- let delegation_sig = self.tcx().inherit_sig_for_delegation_item(self.item_def_id());
+ fn lower_delegation_ty(&self, infer: hir::InferDelegation<'tcx>) -> Ty<'tcx> {
+ match infer {
+ hir::InferDelegation::DefId(def_id) => {
+ self.tcx().type_of(def_id).instantiate_identity()
+ }
+ rustc_hir::InferDelegation::Sig(_, idx) => {
+ let delegation_sig = self.tcx().inherit_sig_for_delegation_item(self.item_def_id());
- match idx {
- hir::InferDelegationKind::Input(idx) => delegation_sig[idx],
- hir::InferDelegationKind::Output { .. } => *delegation_sig.last().unwrap(),
+ match idx {
+ hir::InferDelegationSig::Input(idx) => delegation_sig[idx],
+ hir::InferDelegationSig::Output { .. } => *delegation_sig.last().unwrap(),
+ }
+ }
}
}
@@ -2975,7 +2982,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
let tcx = self.tcx();
let result_ty = match &hir_ty.kind {
- hir::TyKind::InferDelegation(_, idx) => self.lower_delegation_ty(*idx),
+ hir::TyKind::InferDelegation(infer) => self.lower_delegation_ty(*infer),
hir::TyKind::Slice(ty) => Ty::new_slice(tcx, self.lower_ty(ty)),
hir::TyKind::Ptr(mt) => Ty::new_ptr(tcx, self.lower_ty(mt.ty), mt.mutbl),
hir::TyKind::Ref(region, mt) => {
diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs
index 8a651618ca83e..3f313870e3348 100644
--- a/library/alloc/src/rc.rs
+++ b/library/alloc/src/rc.rs
@@ -2424,9 +2424,6 @@ unsafe impl PinCoerceUnsized for Rc {}
#[unstable(feature = "pin_coerce_unsized_trait", issue = "150112")]
unsafe impl PinCoerceUnsized for UniqueRc {}
-#[unstable(feature = "pin_coerce_unsized_trait", issue = "150112")]
-unsafe impl PinCoerceUnsized for Weak {}
-
#[unstable(feature = "deref_pure_trait", issue = "87121")]
unsafe impl DerefPure for Rc {}
diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs
index 2c9fadbb8d9ef..8a5f095b3871b 100644
--- a/library/alloc/src/sync.rs
+++ b/library/alloc/src/sync.rs
@@ -2426,9 +2426,6 @@ impl Deref for Arc {
#[unstable(feature = "pin_coerce_unsized_trait", issue = "150112")]
unsafe impl PinCoerceUnsized for Arc {}
-#[unstable(feature = "pin_coerce_unsized_trait", issue = "150112")]
-unsafe impl PinCoerceUnsized for Weak {}
-
#[unstable(feature = "deref_pure_trait", issue = "87121")]
unsafe impl DerefPure for Arc {}
diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs
index f31cadb546c9d..d67693f9d0fc3 100644
--- a/library/core/src/cell.rs
+++ b/library/core/src/cell.rs
@@ -2718,18 +2718,6 @@ fn assert_coerce_unsized(
let _: RefCell<&dyn Send> = d;
}
-#[unstable(feature = "pin_coerce_unsized_trait", issue = "150112")]
-unsafe impl PinCoerceUnsized for UnsafeCell {}
-
-#[unstable(feature = "pin_coerce_unsized_trait", issue = "150112")]
-unsafe impl PinCoerceUnsized for SyncUnsafeCell {}
-
-#[unstable(feature = "pin_coerce_unsized_trait", issue = "150112")]
-unsafe impl PinCoerceUnsized for Cell {}
-
-#[unstable(feature = "pin_coerce_unsized_trait", issue = "150112")]
-unsafe impl PinCoerceUnsized for RefCell {}
-
#[unstable(feature = "pin_coerce_unsized_trait", issue = "150112")]
unsafe impl<'b, T: ?Sized> PinCoerceUnsized for Ref<'b, T> {}
diff --git a/library/core/src/pin.rs b/library/core/src/pin.rs
index eb92e62aaeb34..ffdcd9fad49a5 100644
--- a/library/core/src/pin.rs
+++ b/library/core/src/pin.rs
@@ -1829,9 +1829,10 @@ where
///
/// # Safety
///
-/// If this type implements `Deref`, then the concrete type returned by `deref`
-/// and `deref_mut` must not change without a modification. The following
-/// operations are not considered modifications:
+/// Given a pointer of this type, the concrete type returned by its
+/// `deref` method and (if it implements `DerefMut`) its `deref_mut` method
+/// must be the same type and must not change without a modification.
+/// The following operations are not considered modifications:
///
/// * Moving the pointer.
/// * Performing unsizing coercions on the pointer.
@@ -1842,7 +1843,7 @@ where
/// to. The concrete type of a slice is an array of the same element type and
/// the length specified in the metadata. The concrete type of a sized type
/// is the type itself.
-pub unsafe trait PinCoerceUnsized {}
+pub unsafe trait PinCoerceUnsized: Deref {}
#[stable(feature = "pin", since = "1.33.0")]
unsafe impl<'a, T: ?Sized> PinCoerceUnsized for &'a T {}
@@ -1853,12 +1854,6 @@ unsafe impl<'a, T: ?Sized> PinCoerceUnsized for &'a mut T {}
#[stable(feature = "pin", since = "1.33.0")]
unsafe impl PinCoerceUnsized for Pin {}
-#[stable(feature = "pin", since = "1.33.0")]
-unsafe impl PinCoerceUnsized for *const T {}
-
-#[stable(feature = "pin", since = "1.33.0")]
-unsafe impl PinCoerceUnsized for *mut T {}
-
/// Constructs a
[Pin]<[&mut] T>, by pinning a `value: T` locally.
///
/// Unlike [`Box::pin`], this does not create a new heap allocation. As explained
diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs
index 8be7d3a9ae925..38cadad2626c7 100644
--- a/library/core/src/ptr/non_null.rs
+++ b/library/core/src/ptr/non_null.rs
@@ -4,7 +4,6 @@ use crate::marker::{Destruct, PointeeSized, Unsize};
use crate::mem::{MaybeUninit, SizedTypeProperties, transmute};
use crate::num::NonZero;
use crate::ops::{CoerceUnsized, DispatchFromDyn};
-use crate::pin::PinCoerceUnsized;
use crate::ptr::Unique;
use crate::slice::{self, SliceIndex};
use crate::ub_checks::assert_unsafe_precondition;
@@ -1692,9 +1691,6 @@ impl CoerceUnsized> for NonNull
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
impl DispatchFromDyn> for NonNull where T: Unsize {}
-#[stable(feature = "pin", since = "1.33.0")]
-unsafe impl PinCoerceUnsized for NonNull {}
-
#[stable(feature = "nonnull", since = "1.25.0")]
impl fmt::Debug for NonNull {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
diff --git a/library/core/src/ptr/unique.rs b/library/core/src/ptr/unique.rs
index 3160c9de4b7e9..6e55f0e71bec7 100644
--- a/library/core/src/ptr/unique.rs
+++ b/library/core/src/ptr/unique.rs
@@ -2,7 +2,6 @@ use crate::clone::TrivialClone;
use crate::fmt;
use crate::marker::{PhantomData, PointeeSized, Unsize};
use crate::ops::{CoerceUnsized, DispatchFromDyn};
-use crate::pin::PinCoerceUnsized;
use crate::ptr::NonNull;
/// A wrapper around a raw non-null `*mut T` that indicates that the possessor
@@ -176,9 +175,6 @@ impl CoerceUnsized> for Unique wh
#[unstable(feature = "ptr_internals", issue = "none")]
impl DispatchFromDyn> for Unique where T: Unsize {}
-#[unstable(feature = "pin_coerce_unsized_trait", issue = "150112")]
-unsafe impl PinCoerceUnsized for Unique {}
-
#[unstable(feature = "ptr_internals", issue = "none")]
impl fmt::Debug for Unique {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
diff --git a/library/coretests/tests/pin.rs b/library/coretests/tests/pin.rs
index b3fb06e710d44..37a729ae4f1c4 100644
--- a/library/coretests/tests/pin.rs
+++ b/library/coretests/tests/pin.rs
@@ -45,22 +45,6 @@ mod pin_coerce_unsized {
pub trait MyTrait {}
impl MyTrait for String {}
- // These Pins should continue to compile.
- // Do note that these instances of Pin types cannot be used
- // meaningfully because all methods require a Deref/DerefMut
- // bounds on the pointer type and Cell, RefCell and UnsafeCell
- // do not implement Deref/DerefMut.
-
- pub fn cell(arg: Pin>>) -> Pin>> {
- arg
- }
- pub fn ref_cell(arg: Pin>>) -> Pin>> {
- arg
- }
- pub fn unsafe_cell(arg: Pin>>) -> Pin>> {
- arg
- }
-
// These sensible Pin coercions are possible.
pub fn pin_mut_ref(arg: Pin<&mut String>) -> Pin<&mut dyn MyTrait> {
arg
@@ -68,15 +52,6 @@ mod pin_coerce_unsized {
pub fn pin_ref(arg: Pin<&String>) -> Pin<&dyn MyTrait> {
arg
}
- pub fn pin_ptr(arg: Pin<*const String>) -> Pin<*const dyn MyTrait> {
- arg
- }
- pub fn pin_ptr_mut(arg: Pin<*mut String>) -> Pin<*mut dyn MyTrait> {
- arg
- }
- pub fn pin_non_null(arg: Pin>) -> Pin> {
- arg
- }
pub fn nesting_pins(arg: Pin>) -> Pin> {
arg
}
diff --git a/src/doc/rustc/src/linker-plugin-lto.md b/src/doc/rustc/src/linker-plugin-lto.md
index 1502e694bba54..1e5822d9c3573 100644
--- a/src/doc/rustc/src/linker-plugin-lto.md
+++ b/src/doc/rustc/src/linker-plugin-lto.md
@@ -194,7 +194,7 @@ def minor_version(version):
INSTALL_TOOLCHAIN = ["rustup", "toolchain", "install", "--profile", "minimal"]
subprocess.run(INSTALL_TOOLCHAIN + ["nightly"])
-LOWER_BOUND = 87
+LOWER_BOUND = 91
NIGHTLY_VERSION = minor_version(subprocess.run(
["rustc", "+nightly", "--version"],
capture_output=True,
@@ -256,6 +256,6 @@ The following table shows known good combinations of toolchain versions.
| 1.78 - 1.81 | 18 |
| 1.82 - 1.86 | 19 |
| 1.87 - 1.90 | 20 |
-| 1.91 - 1.93 | 21 |
+| 1.91 - 1.94 | 21 |
Note that the compatibility policy for this feature might change in the future.
diff --git a/src/tools/compiletest/src/directives/directive_names.rs b/src/tools/compiletest/src/directives/directive_names.rs
index 9af881b5c2f58..77c826fa0b9cd 100644
--- a/src/tools/compiletest/src/directives/directive_names.rs
+++ b/src/tools/compiletest/src/directives/directive_names.rs
@@ -213,6 +213,7 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"only-apple",
"only-arm",
"only-arm64ec",
+ "only-armv7-unknown-linux-gnueabihf",
"only-avr",
"only-beta",
"only-bpf",
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 40e6c4e593b19..d7b47b38a9431 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -1922,10 +1922,7 @@ impl<'test> TestCx<'test> {
// Allow tests to use internal and incomplete features.
compiler.args(&["-A", "internal_features"]);
// FIXME(#154168); temporarily exclude some directories to make the transition easier
- if !input_file
- .iter()
- .any(|p| p == "traits" || p == "specialization" || p == "const-generics")
- {
+ if !input_file.iter().any(|p| p == "specialization") {
compiler.args(&["-A", "incomplete_features"]);
}
diff --git a/tests/assembly-llvm/aarch64-arm-load-store.rs b/tests/assembly-llvm/aarch64-arm-load-store.rs
new file mode 100644
index 0000000000000..8296194100d9f
--- /dev/null
+++ b/tests/assembly-llvm/aarch64-arm-load-store.rs
@@ -0,0 +1,78 @@
+//@ assembly-output: emit-asm
+//
+//@ revisions: AARCH64
+//@[AARCH64] compile-flags: -Copt-level=3
+//@[AARCH64] only-aarch64-unknown-linux-gnu
+//
+//@ revisions: ARMV7
+//@[ARMV7] compile-flags: -Copt-level=3
+//@[ARMV7] only-armv7-unknown-linux-gnueabihf
+//@[ARMV7] ignore-thumb
+//@[ARMV7] ignore-android
+#![crate_type = "lib"]
+#![cfg_attr(target_arch = "arm", feature(arm_target_feature, stdarch_arm_neon_intrinsics))]
+
+#[cfg(target_arch = "aarch64")]
+use std::arch::aarch64::*;
+#[cfg(target_arch = "arm")]
+use std::arch::arm::*;
+
+// Loads of 3 are error-prone because a `repr(simd)` type's size is always rounded up to the next
+// power of 2. Hence, using `read_unaligned` and `write_unaligned` on such types is invalid, it
+// would go out of bounds.
+#[unsafe(no_mangle)]
+#[cfg_attr(target_arch = "arm", target_feature(enable = "neon,v7"))]
+fn test_vld3q_f32(ptr: *const f32) -> float32x4x3_t {
+ // AARCH64-LABEL: test_vld3q_f32
+ // AARCH64: ld3 { v0.4s, v1.4s, v2.4s }, [x0]
+ // AARCH64: stp q0, q1, [x8]
+ // AARCH64: str q2, [x8, #32]
+ // AARCH64: ret
+ //
+ // ARMV7-LABEL: test_vld3q_f32
+ // ARMV7: vld3.32 {d16, d18, d20}, [r1]!
+ // ARMV7: vld3.32 {d17, d19, d21}, [r1]
+ // ARMV7: vst1.32 {d16, d17}, [r0]!
+ // ARMV7: vst1.32 {d18, d19}, [r0]!
+ // ARMV7: vst1.64 {d20, d21}, [r0]
+ // ARMV7: bx lr
+ unsafe { vld3q_f32(ptr) }
+}
+
+#[unsafe(no_mangle)]
+#[cfg_attr(target_arch = "arm", target_feature(enable = "neon,v7"))]
+fn test_vld3q_s32(ptr: *const i32) -> int32x4x3_t {
+ // AARCH64-LABEL: test_vld3q_s32
+ // AARCH64: ld3 { v0.4s, v1.4s, v2.4s }, [x0]
+ // AARCH64: stp q0, q1, [x8]
+ // AARCH64: str q2, [x8, #32]
+ // AARCH64: ret
+ //
+ // ARMV7-LABEL: test_vld3q_s32
+ // ARMV7: vld3.32 {d16, d18, d20}, [r1]!
+ // ARMV7: vld3.32 {d17, d19, d21}, [r1]
+ // ARMV7: vst1.32 {d16, d17}, [r0]!
+ // ARMV7: vst1.32 {d18, d19}, [r0]!
+ // ARMV7: vst1.64 {d20, d21}, [r0]
+ // ARMV7: bx lr
+ unsafe { vld3q_s32(ptr) }
+}
+
+#[unsafe(no_mangle)]
+#[cfg_attr(target_arch = "arm", target_feature(enable = "neon,v7"))]
+fn test_vld3q_u32(ptr: *const u32) -> uint32x4x3_t {
+ // AARCH64-LABEL: test_vld3q_u32
+ // AARCH64: ld3 { v0.4s, v1.4s, v2.4s }, [x0]
+ // AARCH64: stp q0, q1, [x8]
+ // AARCH64: str q2, [x8, #32]
+ // AARCH64: ret
+ //
+ // ARMV7-LABEL: test_vld3q_u32
+ // ARMV7: vld3.32 {d16, d18, d20}, [r1]!
+ // ARMV7: vld3.32 {d17, d19, d21}, [r1]
+ // ARMV7: vst1.32 {d16, d17}, [r0]!
+ // ARMV7: vst1.32 {d18, d19}, [r0]!
+ // ARMV7: vst1.64 {d20, d21}, [r0]
+ // ARMV7: bx lr
+ unsafe { vld3q_u32(ptr) }
+}
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 e90426ec0c762..8825d5384ab91 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,6 +1,5 @@
//@ check-pass
#![feature(adt_const_params, lazy_type_alias)]
-//~^ WARN: the feature `lazy_type_alias` is incomplete
pub type Matrix = [usize; 1];
const EMPTY_MATRIX: Matrix = [0; 1];
diff --git a/tests/ui/const-generics/adt_const_params/alias_const_param_ty-1.stderr b/tests/ui/const-generics/adt_const_params/alias_const_param_ty-1.stderr
deleted file mode 100644
index 4f5133474c608..0000000000000
--- a/tests/ui/const-generics/adt_const_params/alias_const_param_ty-1.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `lazy_type_alias` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/alias_const_param_ty-1.rs:2:30
- |
-LL | #![feature(adt_const_params, lazy_type_alias)]
- | ^^^^^^^^^^^^^^^
- |
- = note: see issue #112792 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/const-generics/adt_const_params/unsized-anon-const-err-2.rs b/tests/ui/const-generics/adt_const_params/unsized-anon-const-err-2.rs
index 81b1ec6a77196..9e2212bc8097d 100644
--- a/tests/ui/const-generics/adt_const_params/unsized-anon-const-err-2.rs
+++ b/tests/ui/const-generics/adt_const_params/unsized-anon-const-err-2.rs
@@ -2,7 +2,6 @@
#![feature(adt_const_params)]
#![feature(unsized_const_params)]
-//~^ WARN the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
#[derive(Clone)]
struct S;
diff --git a/tests/ui/const-generics/adt_const_params/unsized-anon-const-err-2.stderr b/tests/ui/const-generics/adt_const_params/unsized-anon-const-err-2.stderr
index d538bb0af09aa..8112613f3bf80 100644
--- a/tests/ui/const-generics/adt_const_params/unsized-anon-const-err-2.stderr
+++ b/tests/ui/const-generics/adt_const_params/unsized-anon-const-err-2.stderr
@@ -1,22 +1,13 @@
error: free constant item without body
- --> $DIR/unsized-anon-const-err-2.rs:10:1
+ --> $DIR/unsized-anon-const-err-2.rs:9:1
|
LL | const A: [u8];
| ^^^^^^^^^^^^^-
| |
| help: provide a definition for the constant: `= ;`
-warning: the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/unsized-anon-const-err-2.rs:4:12
- |
-LL | #![feature(unsized_const_params)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #95174 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
- --> $DIR/unsized-anon-const-err-2.rs:10:10
+ --> $DIR/unsized-anon-const-err-2.rs:9:10
|
LL | const A: [u8];
| ^^^^ doesn't have a size known at compile-time
@@ -25,7 +16,7 @@ LL | const A: [u8];
= note: statics and constants must have a statically known size
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
- --> $DIR/unsized-anon-const-err-2.rs:14:31
+ --> $DIR/unsized-anon-const-err-2.rs:13:31
|
LL | impl Copy for S {}
| ^ doesn't have a size known at compile-time
@@ -34,7 +25,7 @@ LL | impl Copy for S {}
= note: statics and constants must have a statically known size
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
- --> $DIR/unsized-anon-const-err-2.rs:17:33
+ --> $DIR/unsized-anon-const-err-2.rs:16:33
|
LL | impl Copy for S {}
| ^ doesn't have a size known at compile-time
@@ -43,7 +34,7 @@ LL | impl Copy for S {}
= note: statics and constants must have a statically known size
error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
- --> $DIR/unsized-anon-const-err-2.rs:14:6
+ --> $DIR/unsized-anon-const-err-2.rs:13:6
|
LL | impl Copy for S {}
| ^^^^^^^^^^^^ unconstrained const parameter
@@ -52,7 +43,7 @@ LL | impl Copy for S {}
= note: proving the result of expressions other than the parameter are unique is not supported
error[E0207]: the const parameter `M` is not constrained by the impl trait, self type, or predicates
- --> $DIR/unsized-anon-const-err-2.rs:17:6
+ --> $DIR/unsized-anon-const-err-2.rs:16:6
|
LL | impl Copy for S {}
| ^^^^^^^^^^^^^^ unconstrained const parameter
@@ -60,7 +51,7 @@ LL | impl Copy for S {}
= 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: aborting due to 6 previous errors; 1 warning emitted
+error: aborting due to 6 previous errors
Some errors have detailed explanations: E0207, E0277.
For more information about an error, try `rustc --explain E0207`.
diff --git a/tests/ui/const-generics/defaults/concrete-const-param-type.rs b/tests/ui/const-generics/defaults/concrete-const-param-type.rs
index c411f81192bd6..a2eb37b535eb5 100644
--- a/tests/ui/const-generics/defaults/concrete-const-param-type.rs
+++ b/tests/ui/const-generics/defaults/concrete-const-param-type.rs
@@ -1,6 +1,4 @@
#![feature(generic_const_parameter_types, unsized_const_params, adt_const_params)]
-//~^ WARN the feature `generic_const_parameter_types` is incomplete
-//~| WARN the feature `unsized_const_params` is incomplete
// Make sure that we test the const param type of default const parameters
// if both the type of the default and the type of the parameter are concrete.
diff --git a/tests/ui/const-generics/defaults/concrete-const-param-type.stderr b/tests/ui/const-generics/defaults/concrete-const-param-type.stderr
index ad077f87e5dfb..805d5a1e91fb4 100644
--- a/tests/ui/const-generics/defaults/concrete-const-param-type.stderr
+++ b/tests/ui/const-generics/defaults/concrete-const-param-type.stderr
@@ -1,25 +1,8 @@
-warning: the feature `generic_const_parameter_types` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/concrete-const-param-type.rs:1:12
- |
-LL | #![feature(generic_const_parameter_types, unsized_const_params, adt_const_params)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #137626 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/concrete-const-param-type.rs:1:43
- |
-LL | #![feature(generic_const_parameter_types, unsized_const_params, adt_const_params)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #95174 for more information
-
error: the constant `N` is not of type `u64`
- --> $DIR/concrete-const-param-type.rs:9:26
+ --> $DIR/concrete-const-param-type.rs:7:26
|
LL | struct Foo;
| ^^^^^^^^^^^^^^^^ expected `u64`, found `u32`
-error: aborting due to 1 previous error; 2 warnings emitted
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_const_exprs/cannot-convert-refree-ice-114463.rs b/tests/ui/const-generics/generic_const_exprs/cannot-convert-refree-ice-114463.rs
index 2ce998e9fd9cf..5008179969783 100644
--- a/tests/ui/const-generics/generic_const_exprs/cannot-convert-refree-ice-114463.rs
+++ b/tests/ui/const-generics/generic_const_exprs/cannot-convert-refree-ice-114463.rs
@@ -1,7 +1,7 @@
// issue: rust-lang/rust#114463
// ICE cannot convert `ReFree ..` to a region vid
#![feature(generic_const_exprs)]
-//~^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
+
fn bug<'a>() {
[(); (|_: &'a u8| (), 0).1];
//~^ ERROR cannot capture late-bound lifetime in constant
diff --git a/tests/ui/const-generics/generic_const_exprs/cannot-convert-refree-ice-114463.stderr b/tests/ui/const-generics/generic_const_exprs/cannot-convert-refree-ice-114463.stderr
index e4845405ec816..a468ba6183eaf 100644
--- a/tests/ui/const-generics/generic_const_exprs/cannot-convert-refree-ice-114463.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/cannot-convert-refree-ice-114463.stderr
@@ -1,12 +1,3 @@
-warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/cannot-convert-refree-ice-114463.rs:3:12
- |
-LL | #![feature(generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #76560 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error: cannot capture late-bound lifetime in constant
--> $DIR/cannot-convert-refree-ice-114463.rs:6:16
|
@@ -15,5 +6,5 @@ LL | fn bug<'a>() {
LL | [(); (|_: &'a u8| (), 0).1];
| ^^
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_const_exprs/const-block-is-poly.rs b/tests/ui/const-generics/generic_const_exprs/const-block-is-poly.rs
index a6988a492f614..679f6b74bd1df 100644
--- a/tests/ui/const-generics/generic_const_exprs/const-block-is-poly.rs
+++ b/tests/ui/const-generics/generic_const_exprs/const-block-is-poly.rs
@@ -1,5 +1,4 @@
#![feature(generic_const_exprs)]
-//~^ WARN the feature `generic_const_exprs` is incomplete
fn foo() {
let _ = [0u8; { const { std::mem::size_of::() } }];
diff --git a/tests/ui/const-generics/generic_const_exprs/const-block-is-poly.stderr b/tests/ui/const-generics/generic_const_exprs/const-block-is-poly.stderr
index db547e6a24815..78d1540f25ce9 100644
--- a/tests/ui/const-generics/generic_const_exprs/const-block-is-poly.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/const-block-is-poly.stderr
@@ -1,14 +1,5 @@
-warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/const-block-is-poly.rs:1:12
- |
-LL | #![feature(generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #76560 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error: overly complex generic constant
- --> $DIR/const-block-is-poly.rs:5:19
+ --> $DIR/const-block-is-poly.rs:4:19
|
LL | let _ = [0u8; { const { std::mem::size_of::() } }];
| ^^----------------------------------^^
@@ -18,5 +9,5 @@ LL | let _ = [0u8; { const { std::mem::size_of::() } }];
= help: consider moving this anonymous constant into a `const` function
= note: this operation may be supported in the future
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_const_exprs/double-opaque-parent-predicates.rs b/tests/ui/const-generics/generic_const_exprs/double-opaque-parent-predicates.rs
index e48d559aa3270..c5f4bbbf4513a 100644
--- a/tests/ui/const-generics/generic_const_exprs/double-opaque-parent-predicates.rs
+++ b/tests/ui/const-generics/generic_const_exprs/double-opaque-parent-predicates.rs
@@ -1,7 +1,6 @@
//@ check-pass
#![feature(generic_const_exprs)]
-//~^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use
pub fn y<'a, U: 'a>() -> impl IntoIterator- + 'a> {
[[[1, 2, 3]]]
diff --git a/tests/ui/const-generics/generic_const_exprs/double-opaque-parent-predicates.stderr b/tests/ui/const-generics/generic_const_exprs/double-opaque-parent-predicates.stderr
deleted file mode 100644
index faaede13e6b64..0000000000000
--- a/tests/ui/const-generics/generic_const_exprs/double-opaque-parent-predicates.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/double-opaque-parent-predicates.rs:3:12
- |
-LL | #![feature(generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #76560 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/const-generics/generic_const_exprs/eval-try-unify.rs b/tests/ui/const-generics/generic_const_exprs/eval-try-unify.rs
index b61d2dc1945a7..d2b8d94c05445 100644
--- a/tests/ui/const-generics/generic_const_exprs/eval-try-unify.rs
+++ b/tests/ui/const-generics/generic_const_exprs/eval-try-unify.rs
@@ -1,7 +1,6 @@
//@ build-pass
#![feature(generic_const_exprs)]
-//~^ WARNING the feature `generic_const_exprs` is incomplete
trait Generic {
const ASSOC: usize;
diff --git a/tests/ui/const-generics/generic_const_exprs/eval-try-unify.stderr b/tests/ui/const-generics/generic_const_exprs/eval-try-unify.stderr
deleted file mode 100644
index 8eb1fccc5f88e..0000000000000
--- a/tests/ui/const-generics/generic_const_exprs/eval-try-unify.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/eval-try-unify.rs:3:12
- |
-LL | #![feature(generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #76560 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.rs b/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.rs
index 443d0a2fe87a2..965e07499e182 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.rs
+++ b/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.rs
@@ -1,8 +1,6 @@
//@ check-pass
#![feature(adt_const_params, unsized_const_params, generic_const_exprs)]
-//~^ WARN the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
-//~^^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
pub struct Changes
where
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.stderr b/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.stderr
deleted file mode 100644
index b6b297593a255..0000000000000
--- a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-1.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-warning: the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/issue-97047-ice-1.rs:3:30
- |
-LL | #![feature(adt_const_params, unsized_const_params, generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #95174 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/issue-97047-ice-1.rs:3:52
- |
-LL | #![feature(adt_const_params, unsized_const_params, generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #76560 for more information
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.rs b/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.rs
index 6a91b52256728..728d132d4bb15 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.rs
+++ b/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.rs
@@ -1,8 +1,6 @@
//@ check-pass
#![feature(adt_const_params, unsized_const_params, generic_const_exprs)]
-//~^ WARN the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
-//~^^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
pub struct Changes
where
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.stderr b/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.stderr
deleted file mode 100644
index c0c7dcc79dc42..0000000000000
--- a/tests/ui/const-generics/generic_const_exprs/issue-97047-ice-2.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-warning: the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/issue-97047-ice-2.rs:3:30
- |
-LL | #![feature(adt_const_params, unsized_const_params, generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #95174 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/issue-97047-ice-2.rs:3:52
- |
-LL | #![feature(adt_const_params, unsized_const_params, generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #76560 for more information
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/const-generics/generic_const_exprs/mismatched-gat-subst-kind.rs b/tests/ui/const-generics/generic_const_exprs/mismatched-gat-subst-kind.rs
index 734a37862940f..85af36ebe9a65 100644
--- a/tests/ui/const-generics/generic_const_exprs/mismatched-gat-subst-kind.rs
+++ b/tests/ui/const-generics/generic_const_exprs/mismatched-gat-subst-kind.rs
@@ -1,5 +1,4 @@
#![feature(generic_const_exprs)]
-//~^ WARN the feature `generic_const_exprs` is incomplete
trait B {
type U;
diff --git a/tests/ui/const-generics/generic_const_exprs/mismatched-gat-subst-kind.stderr b/tests/ui/const-generics/generic_const_exprs/mismatched-gat-subst-kind.stderr
index 1036b7261f26a..b11eb10599524 100644
--- a/tests/ui/const-generics/generic_const_exprs/mismatched-gat-subst-kind.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/mismatched-gat-subst-kind.stderr
@@ -1,18 +1,9 @@
-warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/mismatched-gat-subst-kind.rs:1:12
- |
-LL | #![feature(generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #76560 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0747]: constant provided when a type was expected
- --> $DIR/mismatched-gat-subst-kind.rs:8:13
+ --> $DIR/mismatched-gat-subst-kind.rs:7:13
|
LL | fn f = ()>>() {}
| ^^^^
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.rs b/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.rs
index 9af351ec59f06..6e382de436f4f 100644
--- a/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.rs
+++ b/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.rs
@@ -1,6 +1,5 @@
// Regression test for #133271.
#![feature(generic_const_exprs)]
-//~^ WARN the feature `generic_const_exprs` is incomplete
struct Foo;
impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
diff --git a/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.stderr b/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.stderr
index 37eb895f9a8d9..d58bc67232758 100644
--- a/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.stderr
@@ -1,5 +1,5 @@
error[E0407]: method `unimplemented` is not a member of trait `std::ops::Add`
- --> $DIR/post-analysis-user-facing-param-env.rs:12:5
+ --> $DIR/post-analysis-user-facing-param-env.rs:11:5
|
LL | / fn unimplemented(self, _: &Foo) -> Self::Output {
LL | |
@@ -7,17 +7,8 @@ LL | | loop {}
LL | | }
| |_____^ not a member of trait `std::ops::Add`
-warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/post-analysis-user-facing-param-env.rs:2:12
- |
-LL | #![feature(generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #76560 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0046]: not all trait items implemented, missing: `Output`, `add`
- --> $DIR/post-analysis-user-facing-param-env.rs:6:1
+ --> $DIR/post-analysis-user-facing-param-env.rs:5:1
|
LL | / impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
LL | |
@@ -30,7 +21,7 @@ LL | | [(); 1 + 0]: Sized,
= help: implement the missing item: `fn add(self, _: &'a Foo) -> >::Output { todo!() }`
error[E0207]: the const parameter `NUM` is not constrained by the impl trait, self type, or predicates
- --> $DIR/post-analysis-user-facing-param-env.rs:6:10
+ --> $DIR/post-analysis-user-facing-param-env.rs:5:10
|
LL | impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
| ^^^^^^^^^^^^^^^^ unconstrained const parameter
@@ -38,7 +29,7 @@ LL | impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
= 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: aborting due to 3 previous errors; 1 warning emitted
+error: aborting due to 3 previous errors
Some errors have detailed explanations: E0046, E0207, E0407.
For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.rs b/tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.rs
index d3ae863bee968..d605c83239b27 100644
--- a/tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.rs
+++ b/tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.rs
@@ -5,7 +5,6 @@
#![feature(with_negative_coherence)]
#![feature(min_specialization)]
#![feature(generic_const_exprs)]
-//~^ WARNING the feature `generic_const_exprs` is incomplete
#![crate_type = "lib"]
trait Trait {}
diff --git a/tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.stderr b/tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.stderr
deleted file mode 100644
index f17b248d856d4..0000000000000
--- a/tests/ui/const-generics/generic_const_exprs/specialization-fuzzing-ice-133639.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/specialization-fuzzing-ice-133639.rs:7:12
- |
-LL | #![feature(generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #76560 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/const-generics/generic_const_parameter_types/check-type-in-mir.rs b/tests/ui/const-generics/generic_const_parameter_types/check-type-in-mir.rs
index d3bc544ed6c58..4de1616cdee56 100644
--- a/tests/ui/const-generics/generic_const_parameter_types/check-type-in-mir.rs
+++ b/tests/ui/const-generics/generic_const_parameter_types/check-type-in-mir.rs
@@ -1,8 +1,6 @@
// Ensure that we actually treat `N`'s type as `&'a u32` in MIR typeck.
#![feature(unsized_const_params, adt_const_params, generic_const_parameter_types)]
-//~^ WARN the feature `unsized_const_params` is incomplete
-//~| WARN the feature `generic_const_parameter_types` is incomplete
fn foo<'a, const N: &'a u32>() {
let b: &'static u32 = N;
diff --git a/tests/ui/const-generics/generic_const_parameter_types/check-type-in-mir.stderr b/tests/ui/const-generics/generic_const_parameter_types/check-type-in-mir.stderr
index 3dc7ce438fa93..0b7a43a391f00 100644
--- a/tests/ui/const-generics/generic_const_parameter_types/check-type-in-mir.stderr
+++ b/tests/ui/const-generics/generic_const_parameter_types/check-type-in-mir.stderr
@@ -1,27 +1,10 @@
-warning: the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/check-type-in-mir.rs:3:12
- |
-LL | #![feature(unsized_const_params, adt_const_params, generic_const_parameter_types)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #95174 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: the feature `generic_const_parameter_types` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/check-type-in-mir.rs:3:52
- |
-LL | #![feature(unsized_const_params, adt_const_params, generic_const_parameter_types)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #137626 for more information
-
error: lifetime may not live long enough
- --> $DIR/check-type-in-mir.rs:8:12
+ --> $DIR/check-type-in-mir.rs:6:12
|
LL | fn foo<'a, const N: &'a u32>() {
| -- lifetime `'a` defined here
LL | let b: &'static u32 = N;
| ^^^^^^^^^^^^ type annotation requires that `'a` must outlive `'static`
-error: aborting due to 1 previous error; 2 warnings emitted
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/generic_const_parameter_types/references-parent-generics.feat.stderr b/tests/ui/const-generics/generic_const_parameter_types/references-parent-generics.feat.stderr
index 2d47797aef284..7e61566aabdd5 100644
--- a/tests/ui/const-generics/generic_const_parameter_types/references-parent-generics.feat.stderr
+++ b/tests/ui/const-generics/generic_const_parameter_types/references-parent-generics.feat.stderr
@@ -1,14 +1,5 @@
-warning: the feature `generic_const_parameter_types` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/references-parent-generics.rs:3:27
- |
-LL | #![cfg_attr(feat, feature(generic_const_parameter_types))]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #137626 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error: `Self` is forbidden as the type of a const generic parameter
- --> $DIR/references-parent-generics.rs:7:25
+ --> $DIR/references-parent-generics.rs:6:25
|
LL | type Assoc;
| ^^^^
@@ -16,10 +7,10 @@ LL | type Assoc;
= note: the only supported types are integers, `bool`, and `char`
error: anonymous constants referencing generics are not yet supported
- --> $DIR/references-parent-generics.rs:15:21
+ --> $DIR/references-parent-generics.rs:14:21
|
LL | let x: T::Assoc<3>;
| ^
-error: aborting due to 2 previous errors; 1 warning emitted
+error: aborting due to 2 previous errors
diff --git a/tests/ui/const-generics/generic_const_parameter_types/references-parent-generics.nofeat.stderr b/tests/ui/const-generics/generic_const_parameter_types/references-parent-generics.nofeat.stderr
index 68ce17317f69f..ac25a4eae6250 100644
--- a/tests/ui/const-generics/generic_const_parameter_types/references-parent-generics.nofeat.stderr
+++ b/tests/ui/const-generics/generic_const_parameter_types/references-parent-generics.nofeat.stderr
@@ -1,5 +1,5 @@
error[E0770]: the type of const parameters must not depend on other generic parameters
- --> $DIR/references-parent-generics.rs:7:25
+ --> $DIR/references-parent-generics.rs:6:25
|
LL | type Assoc;
| ^^^^ the type must not depend on the parameter `Self`
diff --git a/tests/ui/const-generics/generic_const_parameter_types/references-parent-generics.rs b/tests/ui/const-generics/generic_const_parameter_types/references-parent-generics.rs
index b91050d540c90..6eadb605f97ff 100644
--- a/tests/ui/const-generics/generic_const_parameter_types/references-parent-generics.rs
+++ b/tests/ui/const-generics/generic_const_parameter_types/references-parent-generics.rs
@@ -1,7 +1,6 @@
//@ revisions: feat nofeat
#![cfg_attr(feat, feature(generic_const_parameter_types))]
-//[feat]~^ WARN the feature `generic_const_parameter_types` is incomplete
trait Foo {
type Assoc;
diff --git a/tests/ui/const-generics/mgca/struct-ctor-in-array-len.rs b/tests/ui/const-generics/mgca/struct-ctor-in-array-len.rs
index 715caef38a9a0..c8288431c7ed4 100644
--- a/tests/ui/const-generics/mgca/struct-ctor-in-array-len.rs
+++ b/tests/ui/const-generics/mgca/struct-ctor-in-array-len.rs
@@ -6,7 +6,6 @@
// It should now produce a proper type error.
#![feature(min_generic_const_args)]
-//~^ WARN the feature `min_generic_const_args` is incomplete
struct S;
diff --git a/tests/ui/const-generics/mgca/struct-ctor-in-array-len.stderr b/tests/ui/const-generics/mgca/struct-ctor-in-array-len.stderr
index baf587a856bcc..fcf02621ca9d9 100644
--- a/tests/ui/const-generics/mgca/struct-ctor-in-array-len.stderr
+++ b/tests/ui/const-generics/mgca/struct-ctor-in-array-len.stderr
@@ -1,19 +1,10 @@
-warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/struct-ctor-in-array-len.rs:8:12
- |
-LL | #![feature(min_generic_const_args)]
- | ^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #132980 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error: the constant `S` is not of type `usize`
- --> $DIR/struct-ctor-in-array-len.rs:14:14
+ --> $DIR/struct-ctor-in-array-len.rs:13:14
|
LL | let _b = [0; S];
| ^^^^^^ expected `usize`, found `S`
|
= note: the length of array `[{integer}; S]` must be type `usize`
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/mgca/unexpected-fn-item-in-array.rs b/tests/ui/const-generics/mgca/unexpected-fn-item-in-array.rs
index 1c3274f6a3764..4d96d236cf7fb 100644
--- a/tests/ui/const-generics/mgca/unexpected-fn-item-in-array.rs
+++ b/tests/ui/const-generics/mgca/unexpected-fn-item-in-array.rs
@@ -1,7 +1,6 @@
// Make sure we don't ICE when encountering an fn item during lowering in mGCA.
#![feature(min_generic_const_args)]
-//~^ WARN the feature `min_generic_const_args` is incomplete
trait A {}
diff --git a/tests/ui/const-generics/mgca/unexpected-fn-item-in-array.stderr b/tests/ui/const-generics/mgca/unexpected-fn-item-in-array.stderr
index 89fc8270e3e74..de64bf7b74c01 100644
--- a/tests/ui/const-generics/mgca/unexpected-fn-item-in-array.stderr
+++ b/tests/ui/const-generics/mgca/unexpected-fn-item-in-array.stderr
@@ -1,19 +1,10 @@
-warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/unexpected-fn-item-in-array.rs:3:12
- |
-LL | #![feature(min_generic_const_args)]
- | ^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #132980 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error: the constant `fn_item` is not of type `usize`
- --> $DIR/unexpected-fn-item-in-array.rs:8:6
+ --> $DIR/unexpected-fn-item-in-array.rs:7:6
|
LL | impl A<[usize; fn_item]> for () {}
| ^^^^^^^^^^^^^^^^^^^ expected `usize`, found fn item
|
= note: the length of array `[usize; fn_item]` must be type `usize`
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/occurs-check/unify-fixpoint.rs b/tests/ui/const-generics/occurs-check/unify-fixpoint.rs
index 02bc90988e2c0..950757efbd42d 100644
--- a/tests/ui/const-generics/occurs-check/unify-fixpoint.rs
+++ b/tests/ui/const-generics/occurs-check/unify-fixpoint.rs
@@ -4,8 +4,7 @@
//@ compile-flags: -Zunstable-options
//@ check-pass
-#![feature(generic_const_exprs)] //~ WARN the feature `generic_const_exprs` is incomplete
-
+#![feature(generic_const_exprs)]
fn bind(value: [u8; N + 2]) -> [u8; N * 2] {
todo!()
diff --git a/tests/ui/const-generics/occurs-check/unify-fixpoint.stderr b/tests/ui/const-generics/occurs-check/unify-fixpoint.stderr
deleted file mode 100644
index 8b63e8c55d5c9..0000000000000
--- a/tests/ui/const-generics/occurs-check/unify-fixpoint.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/unify-fixpoint.rs:7:12
- |
-LL | #![feature(generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #76560 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/delegation/generics/const-type-ice-153433.rs b/tests/ui/delegation/generics/const-type-ice-153433.rs
new file mode 100644
index 0000000000000..edd6d0542a999
--- /dev/null
+++ b/tests/ui/delegation/generics/const-type-ice-153433.rs
@@ -0,0 +1,8 @@
+#![feature(fn_delegation)]
+#![allow(incomplete_features)]
+
+fn main() {
+ fn foo Foo>() {}
+ //~^ ERROR: cannot find trait `Foo` in this scope
+ reuse foo as bar;
+}
diff --git a/tests/ui/delegation/generics/const-type-ice-153433.stderr b/tests/ui/delegation/generics/const-type-ice-153433.stderr
new file mode 100644
index 0000000000000..3b537e2f8988e
--- /dev/null
+++ b/tests/ui/delegation/generics/const-type-ice-153433.stderr
@@ -0,0 +1,9 @@
+error[E0405]: cannot find trait `Foo` in this scope
+ --> $DIR/const-type-ice-153433.rs:5:33
+ |
+LL | fn foo Foo>() {}
+ | ^^^ not found in this scope
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0405`.
diff --git a/tests/ui/delegation/generics/const-type-ice-153499.rs b/tests/ui/delegation/generics/const-type-ice-153499.rs
new file mode 100644
index 0000000000000..debda0d04a18c
--- /dev/null
+++ b/tests/ui/delegation/generics/const-type-ice-153499.rs
@@ -0,0 +1,13 @@
+#![feature(fn_delegation)]
+#![allow(incomplete_features)]
+
+trait Trait<'a, T, const F: fn(&CStr) -> usize> {
+ //~^ ERROR: cannot find type `CStr` in this scope
+ //~| ERROR: using function pointers as const generic parameters is forbidden
+ fn foo<'x: 'x, A, B>(&self) {}
+}
+
+reuse Trait::foo;
+//~^ ERROR: using function pointers as const generic parameters is forbidden
+
+fn main() {}
diff --git a/tests/ui/delegation/generics/const-type-ice-153499.stderr b/tests/ui/delegation/generics/const-type-ice-153499.stderr
new file mode 100644
index 0000000000000..02fd7197dcdc3
--- /dev/null
+++ b/tests/ui/delegation/generics/const-type-ice-153499.stderr
@@ -0,0 +1,30 @@
+error[E0425]: cannot find type `CStr` in this scope
+ --> $DIR/const-type-ice-153499.rs:4:33
+ |
+LL | trait Trait<'a, T, const F: fn(&CStr) -> usize> {
+ | ^^^^ not found in this scope
+ |
+help: consider importing this struct
+ |
+LL + use std::ffi::CStr;
+ |
+
+error: using function pointers as const generic parameters is forbidden
+ --> $DIR/const-type-ice-153499.rs:4:29
+ |
+LL | trait Trait<'a, T, const F: fn(&CStr) -> usize> {
+ | ^^^^^^^^^^^^^^^^^^
+ |
+ = note: the only supported types are integers, `bool`, and `char`
+
+error: using function pointers as const generic parameters is forbidden
+ --> $DIR/const-type-ice-153499.rs:10:14
+ |
+LL | reuse Trait::foo;
+ | ^^^
+ |
+ = note: the only supported types are integers, `bool`, and `char`
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/traits/const-traits/mismatched_generic_args.rs b/tests/ui/traits/const-traits/mismatched_generic_args.rs
index 21e91c731b363..409a704456802 100644
--- a/tests/ui/traits/const-traits/mismatched_generic_args.rs
+++ b/tests/ui/traits/const-traits/mismatched_generic_args.rs
@@ -1,5 +1,4 @@
#![feature(generic_const_exprs)]
-//~^ WARN: the feature `generic_const_exprs` is incomplete
// Regression test for #125770 which would ICE under the old effects desugaring that
// created a const generic parameter for constness on `Add`.
diff --git a/tests/ui/traits/const-traits/mismatched_generic_args.stderr b/tests/ui/traits/const-traits/mismatched_generic_args.stderr
index e8103313dc4f6..3094cb5013308 100644
--- a/tests/ui/traits/const-traits/mismatched_generic_args.stderr
+++ b/tests/ui/traits/const-traits/mismatched_generic_args.stderr
@@ -1,5 +1,5 @@
error[E0425]: cannot find value `y` in this scope
- --> $DIR/mismatched_generic_args.rs:20:9
+ --> $DIR/mismatched_generic_args.rs:19:9
|
LL | pub fn add(x: Quantity) -> Quantity {
| - similarly named const parameter `U` defined here
@@ -13,17 +13,8 @@ LL - x + y
LL + x + U
|
-warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/mismatched_generic_args.rs:1:12
- |
-LL | #![feature(generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #76560 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error: `Dimension` is forbidden as the type of a const generic parameter
- --> $DIR/mismatched_generic_args.rs:11:33
+ --> $DIR/mismatched_generic_args.rs:10:33
|
LL | pub struct Quantity
(S);
| ^^^^^^^^^
@@ -35,13 +26,13 @@ LL + #![feature(adt_const_params)]
|
error[E0107]: trait takes at most 1 generic argument but 2 generic arguments were supplied
- --> $DIR/mismatched_generic_args.rs:14:36
+ --> $DIR/mismatched_generic_args.rs:13:36
|
LL | impl Add for Quantity {}
| ^^^ expected at most 1 generic argument
error: `Dimension` is forbidden as the type of a const generic parameter
- --> $DIR/mismatched_generic_args.rs:14:15
+ --> $DIR/mismatched_generic_args.rs:13:15
|
LL | impl Add for Quantity {}
| ^^^^^^^^^
@@ -53,7 +44,7 @@ LL + #![feature(adt_const_params)]
|
error: `Dimension` is forbidden as the type of a const generic parameter
- --> $DIR/mismatched_generic_args.rs:18:21
+ --> $DIR/mismatched_generic_args.rs:17:21
|
LL | pub fn add(x: Quantity) -> Quantity {
| ^^^^^^^^^
@@ -64,7 +55,7 @@ help: add `#![feature(adt_const_params)]` to the crate attributes to enable more
LL + #![feature(adt_const_params)]
|
-error: aborting due to 5 previous errors; 1 warning emitted
+error: aborting due to 5 previous errors
Some errors have detailed explanations: E0107, E0425.
For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/traits/const-traits/overlap-const-with-nonconst.min_spec.stderr b/tests/ui/traits/const-traits/overlap-const-with-nonconst.min_spec.stderr
index a6bd8615d36d3..57bb5569c8ebb 100644
--- a/tests/ui/traits/const-traits/overlap-const-with-nonconst.min_spec.stderr
+++ b/tests/ui/traits/const-traits/overlap-const-with-nonconst.min_spec.stderr
@@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `Foo` for type `(_,)`
- --> $DIR/overlap-const-with-nonconst.rs:21:1
+ --> $DIR/overlap-const-with-nonconst.rs:20:1
|
LL | / impl const Foo for T
LL | | where
diff --git a/tests/ui/traits/const-traits/overlap-const-with-nonconst.rs b/tests/ui/traits/const-traits/overlap-const-with-nonconst.rs
index 10dfb200c6436..0e21d31a426ab 100644
--- a/tests/ui/traits/const-traits/overlap-const-with-nonconst.rs
+++ b/tests/ui/traits/const-traits/overlap-const-with-nonconst.rs
@@ -2,7 +2,6 @@
#![feature(const_trait_impl)]
#![cfg_attr(spec, feature(specialization))]
-//[spec]~^ WARN the feature `specialization` is incomplete
#![cfg_attr(min_spec, feature(min_specialization))]
const trait Bar {}
diff --git a/tests/ui/traits/const-traits/overlap-const-with-nonconst.spec.stderr b/tests/ui/traits/const-traits/overlap-const-with-nonconst.spec.stderr
index 91628f65fdcdd..57bb5569c8ebb 100644
--- a/tests/ui/traits/const-traits/overlap-const-with-nonconst.spec.stderr
+++ b/tests/ui/traits/const-traits/overlap-const-with-nonconst.spec.stderr
@@ -1,15 +1,5 @@
-warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/overlap-const-with-nonconst.rs:4:27
- |
-LL | #![cfg_attr(spec, feature(specialization))]
- | ^^^^^^^^^^^^^^
- |
- = note: see issue #31844 for more information
- = help: consider using `min_specialization` instead, which is more stable and complete
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0119]: conflicting implementations of trait `Foo` for type `(_,)`
- --> $DIR/overlap-const-with-nonconst.rs:21:1
+ --> $DIR/overlap-const-with-nonconst.rs:20:1
|
LL | / impl const Foo for T
LL | | where
@@ -19,6 +9,6 @@ LL | | T: [const] Bar,
LL | impl Foo for (T,) {
| ^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(_,)`
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/traits/negative-impls/negative-default-impls.rs b/tests/ui/traits/negative-impls/negative-default-impls.rs
index c68bca432fa86..2d50bc83ec304 100644
--- a/tests/ui/traits/negative-impls/negative-default-impls.rs
+++ b/tests/ui/traits/negative-impls/negative-default-impls.rs
@@ -1,6 +1,5 @@
#![feature(negative_impls)]
#![feature(specialization)]
-//~^ WARN the feature `specialization` is incomplete
trait MyTrait {
type Foo;
diff --git a/tests/ui/traits/negative-impls/negative-default-impls.stderr b/tests/ui/traits/negative-impls/negative-default-impls.stderr
index 328e744a1e39b..b321898907d5a 100644
--- a/tests/ui/traits/negative-impls/negative-default-impls.stderr
+++ b/tests/ui/traits/negative-impls/negative-default-impls.stderr
@@ -1,19 +1,9 @@
-warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/negative-default-impls.rs:2:12
- |
-LL | #![feature(specialization)]
- | ^^^^^^^^^^^^^^
- |
- = note: see issue #31844 for more information
- = help: consider using `min_specialization` instead, which is more stable and complete
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0750]: negative impls cannot be default impls
- --> $DIR/negative-default-impls.rs:9:1
+ --> $DIR/negative-default-impls.rs:8:1
|
LL | default impl !MyTrait for u32 {}
| ^^^^^^^ ^
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0750`.
diff --git a/tests/ui/traits/negative-impls/negative-specializes-negative.rs b/tests/ui/traits/negative-impls/negative-specializes-negative.rs
index bb2856ae7e7ca..fe5165a12d1b6 100644
--- a/tests/ui/traits/negative-impls/negative-specializes-negative.rs
+++ b/tests/ui/traits/negative-impls/negative-specializes-negative.rs
@@ -1,4 +1,4 @@
-#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
+#![feature(specialization)]
#![feature(negative_impls)]
// Test a negative impl that "specializes" another negative impl.
diff --git a/tests/ui/traits/negative-impls/negative-specializes-negative.stderr b/tests/ui/traits/negative-impls/negative-specializes-negative.stderr
deleted file mode 100644
index 751e29c3b236f..0000000000000
--- a/tests/ui/traits/negative-impls/negative-specializes-negative.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/negative-specializes-negative.rs:1:12
- |
-LL | #![feature(specialization)]
- | ^^^^^^^^^^^^^^
- |
- = note: see issue #31844 for more information
- = help: consider using `min_specialization` instead, which is more stable and complete
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/traits/negative-impls/negative-specializes-positive-item.rs b/tests/ui/traits/negative-impls/negative-specializes-positive-item.rs
index 4281eedaf631c..da22e43377f52 100644
--- a/tests/ui/traits/negative-impls/negative-specializes-positive-item.rs
+++ b/tests/ui/traits/negative-impls/negative-specializes-positive-item.rs
@@ -1,4 +1,4 @@
-#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
+#![feature(specialization)]
#![feature(negative_impls)]
// Negative impl for u32 cannot "specialize" the base impl.
diff --git a/tests/ui/traits/negative-impls/negative-specializes-positive-item.stderr b/tests/ui/traits/negative-impls/negative-specializes-positive-item.stderr
index 97727da76f26a..e281969ac2e0e 100644
--- a/tests/ui/traits/negative-impls/negative-specializes-positive-item.stderr
+++ b/tests/ui/traits/negative-impls/negative-specializes-positive-item.stderr
@@ -1,13 +1,3 @@
-warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/negative-specializes-positive-item.rs:1:12
- |
-LL | #![feature(specialization)]
- | ^^^^^^^^^^^^^^
- |
- = note: see issue #31844 for more information
- = help: consider using `min_specialization` instead, which is more stable and complete
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0751]: found both positive and negative implementation of trait `MyTrait` for type `u32`:
--> $DIR/negative-specializes-positive-item.rs:11:1
|
@@ -17,6 +7,6 @@ LL | impl MyTrait for T {
LL | impl !MyTrait for u32 {}
| ^^^^^^^^^^^^^^^^^^^^^ negative implementation here
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0751`.
diff --git a/tests/ui/traits/negative-impls/negative-specializes-positive.rs b/tests/ui/traits/negative-impls/negative-specializes-positive.rs
index 0e227691e0404..1939a098b50ee 100644
--- a/tests/ui/traits/negative-impls/negative-specializes-positive.rs
+++ b/tests/ui/traits/negative-impls/negative-specializes-positive.rs
@@ -1,4 +1,4 @@
-#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
+#![feature(specialization)]
#![feature(negative_impls)]
// Negative impl for u32 cannot "specialize" the base impl.
diff --git a/tests/ui/traits/negative-impls/negative-specializes-positive.stderr b/tests/ui/traits/negative-impls/negative-specializes-positive.stderr
index 100f97aba93c5..6eab4aaf20a50 100644
--- a/tests/ui/traits/negative-impls/negative-specializes-positive.stderr
+++ b/tests/ui/traits/negative-impls/negative-specializes-positive.stderr
@@ -1,13 +1,3 @@
-warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/negative-specializes-positive.rs:1:12
- |
-LL | #![feature(specialization)]
- | ^^^^^^^^^^^^^^
- |
- = note: see issue #31844 for more information
- = help: consider using `min_specialization` instead, which is more stable and complete
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0751]: found both positive and negative implementation of trait `MyTrait` for type `u32`:
--> $DIR/negative-specializes-positive.rs:7:1
|
@@ -16,6 +6,6 @@ LL | impl MyTrait for T {}
LL | impl !MyTrait for u32 {}
| ^^^^^^^^^^^^^^^^^^^^^ negative implementation here
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0751`.
diff --git a/tests/ui/traits/negative-impls/positive-specializes-negative.rs b/tests/ui/traits/negative-impls/positive-specializes-negative.rs
index a06b357654068..f2c5f507a4ebb 100644
--- a/tests/ui/traits/negative-impls/positive-specializes-negative.rs
+++ b/tests/ui/traits/negative-impls/positive-specializes-negative.rs
@@ -1,4 +1,4 @@
-#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
+#![feature(specialization)]
#![feature(negative_impls)]
trait MyTrait {}
diff --git a/tests/ui/traits/negative-impls/positive-specializes-negative.stderr b/tests/ui/traits/negative-impls/positive-specializes-negative.stderr
index 1655cb05019cc..7c3f5f6ef5c8c 100644
--- a/tests/ui/traits/negative-impls/positive-specializes-negative.stderr
+++ b/tests/ui/traits/negative-impls/positive-specializes-negative.stderr
@@ -1,13 +1,3 @@
-warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/positive-specializes-negative.rs:1:12
- |
-LL | #![feature(specialization)]
- | ^^^^^^^^^^^^^^
- |
- = note: see issue #31844 for more information
- = help: consider using `min_specialization` instead, which is more stable and complete
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0751]: found both positive and negative implementation of trait `MyTrait` for type `u32`:
--> $DIR/positive-specializes-negative.rs:7:1
|
@@ -16,6 +6,6 @@ LL | impl !MyTrait for T {}
LL | impl MyTrait for u32 {}
| ^^^^^^^^^^^^^^^^^^^^ positive implementation here
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0751`.
diff --git a/tests/ui/traits/next-solver/coherence/negative-coherence-bounds.rs b/tests/ui/traits/next-solver/coherence/negative-coherence-bounds.rs
index d98cd1147efec..327f731d7e91b 100644
--- a/tests/ui/traits/next-solver/coherence/negative-coherence-bounds.rs
+++ b/tests/ui/traits/next-solver/coherence/negative-coherence-bounds.rs
@@ -10,7 +10,6 @@
// which is provided by the first impl that it is specializing.
#![feature(specialization)]
-//~^ WARN the feature `specialization` is incomplete
#![feature(with_negative_coherence)]
trait BoxIter {
diff --git a/tests/ui/traits/next-solver/coherence/negative-coherence-bounds.stderr b/tests/ui/traits/next-solver/coherence/negative-coherence-bounds.stderr
deleted file mode 100644
index 4127f51f56da2..0000000000000
--- a/tests/ui/traits/next-solver/coherence/negative-coherence-bounds.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/negative-coherence-bounds.rs:12:12
- |
-LL | #![feature(specialization)]
- | ^^^^^^^^^^^^^^
- |
- = note: see issue #31844 for more information
- = help: consider using `min_specialization` instead, which is more stable and complete
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
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 84e2f4c94386d..7a4cd2aaa1f11 100644
--- a/tests/ui/traits/next-solver/issue-118950-root-region.rs
+++ b/tests/ui/traits/next-solver/issue-118950-root-region.rs
@@ -3,7 +3,6 @@
// This is a gnarly test but I don't know how to minimize it, frankly.
#![feature(lazy_type_alias)]
-//~^ WARN the feature `lazy_type_alias` is incomplete
trait ToUnit<'a> {
type Unit;
diff --git a/tests/ui/traits/next-solver/issue-118950-root-region.stderr b/tests/ui/traits/next-solver/issue-118950-root-region.stderr
index 74cbb5be02b37..5516f1e36089a 100644
--- a/tests/ui/traits/next-solver/issue-118950-root-region.stderr
+++ b/tests/ui/traits/next-solver/issue-118950-root-region.stderr
@@ -1,32 +1,23 @@
error[E0425]: cannot find type `Missing` in this scope
- --> $DIR/issue-118950-root-region.rs:19:55
+ --> $DIR/issue-118950-root-region.rs:18:55
|
LL | impl Overlap fn(Assoc<'a, T>)> for T where Missing: Overlap {}
| ^^^^^^^ not found in this scope
-warning: the feature `lazy_type_alias` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/issue-118950-root-region.rs:5:12
- |
-LL | #![feature(lazy_type_alias)]
- | ^^^^^^^^^^^^^^^
- |
- = note: see issue #112792 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0277]: the trait bound `*const T: ToUnit<'a>` is not satisfied
- --> $DIR/issue-118950-root-region.rs:14:1
+ --> $DIR/issue-118950-root-region.rs:13:1
|
LL | type Assoc<'a, T> = <*const T as ToUnit<'a>>::Unit;
| ^^^^^^^^^^^^^^^^^ the trait `ToUnit<'a>` is not implemented for `*const T`
|
help: this trait has no implementations, consider adding one
- --> $DIR/issue-118950-root-region.rs:8:1
+ --> $DIR/issue-118950-root-region.rs:7:1
|
LL | trait ToUnit<'a> {
| ^^^^^^^^^^^^^^^^
WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: ['^0.Named(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a)), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc), .. }
-error: aborting due to 2 previous errors; 1 warning emitted
+error: aborting due to 2 previous errors
Some errors have detailed explanations: E0277, E0425.
For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/next-solver/normalize/normalize-self-type-constrains-trait-args.current.stderr b/tests/ui/traits/next-solver/normalize/normalize-self-type-constrains-trait-args.current.stderr
deleted file mode 100644
index ef636811fd57b..0000000000000
--- a/tests/ui/traits/next-solver/normalize/normalize-self-type-constrains-trait-args.current.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `lazy_type_alias` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/normalize-self-type-constrains-trait-args.rs:8:12
- |
-LL | #![feature(lazy_type_alias)]
- | ^^^^^^^^^^^^^^^
- |
- = note: see issue #112792 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/traits/next-solver/normalize/normalize-self-type-constrains-trait-args.next.stderr b/tests/ui/traits/next-solver/normalize/normalize-self-type-constrains-trait-args.next.stderr
deleted file mode 100644
index ef636811fd57b..0000000000000
--- a/tests/ui/traits/next-solver/normalize/normalize-self-type-constrains-trait-args.next.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `lazy_type_alias` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/normalize-self-type-constrains-trait-args.rs:8:12
- |
-LL | #![feature(lazy_type_alias)]
- | ^^^^^^^^^^^^^^^
- |
- = note: see issue #112792 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
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 c2a0167134639..921d753fe2a1e 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
@@ -6,7 +6,6 @@
// This goal is also possible w/ a GAT, but lazy_type_alias
// makes the behavior a bit more readable.
#![feature(lazy_type_alias)]
-//~^ WARN the feature `lazy_type_alias` is incomplete
struct Wr(T);
trait Foo {}
diff --git a/tests/ui/traits/next-solver/specialization-transmute.rs b/tests/ui/traits/next-solver/specialization-transmute.rs
index f1447cd6a9e2e..ba8b49c9c4c26 100644
--- a/tests/ui/traits/next-solver/specialization-transmute.rs
+++ b/tests/ui/traits/next-solver/specialization-transmute.rs
@@ -1,6 +1,5 @@
//@ compile-flags: -Znext-solver
#![feature(specialization)]
-//~^ WARN the feature `specialization` is incomplete
trait Default {
type Id;
diff --git a/tests/ui/traits/next-solver/specialization-transmute.stderr b/tests/ui/traits/next-solver/specialization-transmute.stderr
index 8bd290ea19707..bdc03e5e1bf9a 100644
--- a/tests/ui/traits/next-solver/specialization-transmute.stderr
+++ b/tests/ui/traits/next-solver/specialization-transmute.stderr
@@ -1,15 +1,5 @@
-warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/specialization-transmute.rs:2:12
- |
-LL | #![feature(specialization)]
- | ^^^^^^^^^^^^^^
- |
- = note: see issue #31844 for more information
- = help: consider using `min_specialization` instead, which is more stable and complete
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0308]: mismatched types
- --> $DIR/specialization-transmute.rs:14:9
+ --> $DIR/specialization-transmute.rs:13:9
|
LL | fn intu(&self) -> &Self::Id {
| --------- expected `&::Id` because of return type
@@ -20,7 +10,7 @@ LL | self
found reference `&T`
error[E0271]: type mismatch resolving `::Id == Option>`
- --> $DIR/specialization-transmute.rs:25:50
+ --> $DIR/specialization-transmute.rs:24:50
|
LL | let s = transmute::>>(0);
| ------------------------------------ ^ types differ
@@ -28,12 +18,12 @@ LL | let s = transmute::>>(0);
| required by a bound introduced by this call
|
note: required by a bound in `transmute`
- --> $DIR/specialization-transmute.rs:18:25
+ --> $DIR/specialization-transmute.rs:17:25
|
LL | fn transmute, U: Copy>(t: T) -> U {
| ^^^^^^ required by this bound in `transmute`
-error: aborting due to 2 previous errors; 1 warning emitted
+error: aborting due to 2 previous errors
Some errors have detailed explanations: E0271, E0308.
For more information about an error, try `rustc --explain E0271`.
diff --git a/tests/ui/traits/next-solver/specialization-unconstrained.rs b/tests/ui/traits/next-solver/specialization-unconstrained.rs
index 6835c0764d6c8..27f6d00111a9b 100644
--- a/tests/ui/traits/next-solver/specialization-unconstrained.rs
+++ b/tests/ui/traits/next-solver/specialization-unconstrained.rs
@@ -1,7 +1,6 @@
//@ compile-flags: -Znext-solver
#![feature(specialization)]
-//~^ WARN the feature `specialization` is incomplete
// Do not treat the RHS of a projection-goal as an unconstrained `Certainty::Yes` response
// if the impl is still further specializable.
diff --git a/tests/ui/traits/next-solver/specialization-unconstrained.stderr b/tests/ui/traits/next-solver/specialization-unconstrained.stderr
index 1bcf5eddb5bca..3e3638143873c 100644
--- a/tests/ui/traits/next-solver/specialization-unconstrained.stderr
+++ b/tests/ui/traits/next-solver/specialization-unconstrained.stderr
@@ -1,25 +1,15 @@
-warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/specialization-unconstrained.rs:3:12
- |
-LL | #![feature(specialization)]
- | ^^^^^^^^^^^^^^
- |
- = note: see issue #31844 for more information
- = help: consider using `min_specialization` instead, which is more stable and complete
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0271]: type mismatch resolving `::Id == ()`
- --> $DIR/specialization-unconstrained.rs:20:12
+ --> $DIR/specialization-unconstrained.rs:19:12
|
LL | test::();
| ^^^ types differ
|
note: required by a bound in `test`
- --> $DIR/specialization-unconstrained.rs:17:20
+ --> $DIR/specialization-unconstrained.rs:16:20
|
LL | fn test, U>() {}
| ^^^^^^ required by this bound in `test`
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/traits/non-lifetime-via-dyn-builtin.current.stderr b/tests/ui/traits/non-lifetime-via-dyn-builtin.current.stderr
deleted file mode 100644
index 5393db6b10549..0000000000000
--- a/tests/ui/traits/non-lifetime-via-dyn-builtin.current.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/non-lifetime-via-dyn-builtin.rs:6:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/traits/non-lifetime-via-dyn-builtin.next.stderr b/tests/ui/traits/non-lifetime-via-dyn-builtin.next.stderr
deleted file mode 100644
index 5393db6b10549..0000000000000
--- a/tests/ui/traits/non-lifetime-via-dyn-builtin.next.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/non-lifetime-via-dyn-builtin.rs:6:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/traits/non-lifetime-via-dyn-builtin.rs b/tests/ui/traits/non-lifetime-via-dyn-builtin.rs
index ac61f8b614c47..00bf23725eb20 100644
--- a/tests/ui/traits/non-lifetime-via-dyn-builtin.rs
+++ b/tests/ui/traits/non-lifetime-via-dyn-builtin.rs
@@ -4,7 +4,6 @@
//@ check-pass
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete and may not be safe
fn trivial()
where
diff --git a/tests/ui/traits/non_lifetime_binders/bad-copy-cond.rs b/tests/ui/traits/non_lifetime_binders/bad-copy-cond.rs
index 506cad25f630c..9d792ad575e42 100644
--- a/tests/ui/traits/non_lifetime_binders/bad-copy-cond.rs
+++ b/tests/ui/traits/non_lifetime_binders/bad-copy-cond.rs
@@ -1,5 +1,4 @@
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
fn foo() where for T: Copy {}
diff --git a/tests/ui/traits/non_lifetime_binders/bad-copy-cond.stderr b/tests/ui/traits/non_lifetime_binders/bad-copy-cond.stderr
index 4694e7da500f3..f77d562dbcf26 100644
--- a/tests/ui/traits/non_lifetime_binders/bad-copy-cond.stderr
+++ b/tests/ui/traits/non_lifetime_binders/bad-copy-cond.stderr
@@ -1,24 +1,15 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/bad-copy-cond.rs:1:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0277]: the trait bound `T: Copy` is not satisfied
- --> $DIR/bad-copy-cond.rs:7:5
+ --> $DIR/bad-copy-cond.rs:6:5
|
LL | foo();
| ^^^^^ the trait `Copy` is not implemented for `T`
|
note: required by a bound in `foo`
- --> $DIR/bad-copy-cond.rs:4:26
+ --> $DIR/bad-copy-cond.rs:3:26
|
LL | fn foo() where for T: Copy {}
| ^^^^ required by this bound in `foo`
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/non_lifetime_binders/bad-sized-cond.rs b/tests/ui/traits/non_lifetime_binders/bad-sized-cond.rs
index dfc800c8e7e12..244ac2f9c0052 100644
--- a/tests/ui/traits/non_lifetime_binders/bad-sized-cond.rs
+++ b/tests/ui/traits/non_lifetime_binders/bad-sized-cond.rs
@@ -1,5 +1,4 @@
#![feature(non_lifetime_binders)]
-//~^ WARN is incomplete and may not be safe
pub fn foo()
where
diff --git a/tests/ui/traits/non_lifetime_binders/bad-sized-cond.stderr b/tests/ui/traits/non_lifetime_binders/bad-sized-cond.stderr
index f4deb169516cf..0b3aa5c904f9c 100644
--- a/tests/ui/traits/non_lifetime_binders/bad-sized-cond.stderr
+++ b/tests/ui/traits/non_lifetime_binders/bad-sized-cond.stderr
@@ -1,21 +1,12 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/bad-sized-cond.rs:1:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0277]: the size for values of type `V` cannot be known at compilation time
- --> $DIR/bad-sized-cond.rs:17:5
+ --> $DIR/bad-sized-cond.rs:16:5
|
LL | foo();
| ^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `V`
note: required by a bound in `foo`
- --> $DIR/bad-sized-cond.rs:6:15
+ --> $DIR/bad-sized-cond.rs:5:15
|
LL | pub fn foo()
| --- required by a bound in this function
@@ -24,7 +15,7 @@ LL | for V: Sized,
| ^^^^^ required by this bound in `foo`
error[E0277]: `V` is not an iterator
- --> $DIR/bad-sized-cond.rs:20:5
+ --> $DIR/bad-sized-cond.rs:19:5
|
LL | bar();
| ^^^^^ `V` is not an iterator
@@ -32,7 +23,7 @@ LL | bar();
= help: the trait `Iterator` is not implemented for `V`
= note: required for `V` to implement `IntoIterator`
note: required by a bound in `bar`
- --> $DIR/bad-sized-cond.rs:12:15
+ --> $DIR/bad-sized-cond.rs:11:15
|
LL | pub fn bar()
| --- required by a bound in this function
@@ -41,7 +32,7 @@ LL | for V: IntoIterator,
| ^^^^^^^^^^^^ required by this bound in `bar`
error[E0277]: the size for values of type `V` cannot be known at compilation time
- --> $DIR/bad-sized-cond.rs:20:5
+ --> $DIR/bad-sized-cond.rs:19:5
|
LL | bar();
| ^^^^^ doesn't have a size known at compile-time
@@ -49,7 +40,7 @@ LL | bar();
= help: the trait `Sized` is not implemented for `V`
= note: required for `V` to implement `IntoIterator`
note: required by a bound in `bar`
- --> $DIR/bad-sized-cond.rs:12:15
+ --> $DIR/bad-sized-cond.rs:11:15
|
LL | pub fn bar()
| --- required by a bound in this function
@@ -57,6 +48,6 @@ LL | where
LL | for V: IntoIterator,
| ^^^^^^^^^^^^ required by this bound in `bar`
-error: aborting due to 3 previous errors; 1 warning emitted
+error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/non_lifetime_binders/bad-suggestion-on-missing-assoc.rs b/tests/ui/traits/non_lifetime_binders/bad-suggestion-on-missing-assoc.rs
index b61a21eab419c..8ad2ecf8271ac 100644
--- a/tests/ui/traits/non_lifetime_binders/bad-suggestion-on-missing-assoc.rs
+++ b/tests/ui/traits/non_lifetime_binders/bad-suggestion-on-missing-assoc.rs
@@ -1,7 +1,5 @@
#![feature(generic_const_exprs)]
-//~^ WARN the feature `generic_const_exprs` is incomplete
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
// Test for ,
// which originally relied on associated_type_bounds, but was
diff --git a/tests/ui/traits/non_lifetime_binders/bad-suggestion-on-missing-assoc.stderr b/tests/ui/traits/non_lifetime_binders/bad-suggestion-on-missing-assoc.stderr
index e891df3f0c092..0f0d2af50ba84 100644
--- a/tests/ui/traits/non_lifetime_binders/bad-suggestion-on-missing-assoc.stderr
+++ b/tests/ui/traits/non_lifetime_binders/bad-suggestion-on-missing-assoc.stderr
@@ -1,40 +1,23 @@
error: late-bound const parameters cannot be used currently
- --> $DIR/bad-suggestion-on-missing-assoc.rs:20:15
+ --> $DIR/bad-suggestion-on-missing-assoc.rs:18:15
|
LL | for T: TraitA>,
| ^
-warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/bad-suggestion-on-missing-assoc.rs:1:12
- |
-LL | #![feature(generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #76560 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/bad-suggestion-on-missing-assoc.rs:3:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
-
error: defaults for generic parameters are not allowed in `for<...>` binders
- --> $DIR/bad-suggestion-on-missing-assoc.rs:20:9
+ --> $DIR/bad-suggestion-on-missing-assoc.rs:18:9
|
LL | for T: TraitA>,
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0562]: `impl Trait` is not allowed in bounds
- --> $DIR/bad-suggestion-on-missing-assoc.rs:20:49
+ --> $DIR/bad-suggestion-on-missing-assoc.rs:18:49
|
LL | for T: TraitA>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
-error: aborting due to 3 previous errors; 2 warnings emitted
+error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0562`.
diff --git a/tests/ui/traits/non_lifetime_binders/basic.rs b/tests/ui/traits/non_lifetime_binders/basic.rs
index 09c0244ec9540..893bfd87715f0 100644
--- a/tests/ui/traits/non_lifetime_binders/basic.rs
+++ b/tests/ui/traits/non_lifetime_binders/basic.rs
@@ -3,7 +3,6 @@
#![feature(sized_hierarchy)]
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
use std::marker::PointeeSized;
diff --git a/tests/ui/traits/non_lifetime_binders/basic.stderr b/tests/ui/traits/non_lifetime_binders/basic.stderr
deleted file mode 100644
index 9f2df2238d15f..0000000000000
--- a/tests/ui/traits/non_lifetime_binders/basic.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/basic.rs:5:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.rs b/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.rs
index 13f9f196970c5..894f11ce5faf2 100644
--- a/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.rs
+++ b/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.rs
@@ -1,5 +1,4 @@
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
pub fn bar()
where
diff --git a/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.stderr b/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.stderr
index 608e8136d2a82..7383a554bcf3a 100644
--- a/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.stderr
+++ b/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.stderr
@@ -1,5 +1,5 @@
error[E0425]: cannot find type `V` in this scope
- --> $DIR/binder-defaults-112547.rs:10:4
+ --> $DIR/binder-defaults-112547.rs:9:4
|
LL | }> V: IntoIterator
| ^ not found in this scope
@@ -10,22 +10,13 @@ LL | pub fn bar()
| +++
error: late-bound const parameters cannot be used currently
- --> $DIR/binder-defaults-112547.rs:6:15
+ --> $DIR/binder-defaults-112547.rs:5:15
|
LL | for $DIR/binder-defaults-112547.rs:1:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error: defaults for generic parameters are not allowed in `for<...>` binders
- --> $DIR/binder-defaults-112547.rs:6:9
+ --> $DIR/binder-defaults-112547.rs:5:9
|
LL | for V: IntoIterator
| |_^
-error: aborting due to 3 previous errors; 1 warning emitted
+error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/traits/non_lifetime_binders/binder-defaults-119489.rs b/tests/ui/traits/non_lifetime_binders/binder-defaults-119489.rs
index bdfe41ca11b04..509bdfc0821bc 100644
--- a/tests/ui/traits/non_lifetime_binders/binder-defaults-119489.rs
+++ b/tests/ui/traits/non_lifetime_binders/binder-defaults-119489.rs
@@ -1,6 +1,4 @@
#![feature(non_lifetime_binders, generic_const_exprs)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
-//~| WARN the feature `generic_const_exprs` is incomplete
fn fun()
where
diff --git a/tests/ui/traits/non_lifetime_binders/binder-defaults-119489.stderr b/tests/ui/traits/non_lifetime_binders/binder-defaults-119489.stderr
index 947dd3a73bf12..4fb7c26fc2661 100644
--- a/tests/ui/traits/non_lifetime_binders/binder-defaults-119489.stderr
+++ b/tests/ui/traits/non_lifetime_binders/binder-defaults-119489.stderr
@@ -1,37 +1,20 @@
error: late-bound const parameters cannot be used currently
- --> $DIR/binder-defaults-119489.rs:7:23
+ --> $DIR/binder-defaults-119489.rs:5:23
|
LL | for ():,
| ^
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/binder-defaults-119489.rs:1:12
- |
-LL | #![feature(non_lifetime_binders, generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/binder-defaults-119489.rs:1:34
- |
-LL | #![feature(non_lifetime_binders, generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #76560 for more information
-
error: defaults for generic parameters are not allowed in `for<...>` binders
- --> $DIR/binder-defaults-119489.rs:7:9
+ --> $DIR/binder-defaults-119489.rs:5:9
|
LL | for ():,
| ^^^^^^
error: defaults for generic parameters are not allowed in `for<...>` binders
- --> $DIR/binder-defaults-119489.rs:7:17
+ --> $DIR/binder-defaults-119489.rs:5:17
|
LL | for ():,
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to 3 previous errors; 2 warnings emitted
+error: aborting due to 3 previous errors
diff --git a/tests/ui/traits/non_lifetime_binders/diagnostic-hir-wf-check.rs b/tests/ui/traits/non_lifetime_binders/diagnostic-hir-wf-check.rs
index 22044c2e66279..a2a926e2c27d6 100644
--- a/tests/ui/traits/non_lifetime_binders/diagnostic-hir-wf-check.rs
+++ b/tests/ui/traits/non_lifetime_binders/diagnostic-hir-wf-check.rs
@@ -3,7 +3,6 @@
#![feature(sized_hierarchy)]
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
use std::marker::PointeeSized;
diff --git a/tests/ui/traits/non_lifetime_binders/diagnostic-hir-wf-check.stderr b/tests/ui/traits/non_lifetime_binders/diagnostic-hir-wf-check.stderr
index 8270fbeef0f6f..0277abf52d352 100644
--- a/tests/ui/traits/non_lifetime_binders/diagnostic-hir-wf-check.stderr
+++ b/tests/ui/traits/non_lifetime_binders/diagnostic-hir-wf-check.stderr
@@ -1,31 +1,22 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/diagnostic-hir-wf-check.rs:5:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0277]: the trait bound `(): B` is not satisfied
- --> $DIR/diagnostic-hir-wf-check.rs:16:12
+ --> $DIR/diagnostic-hir-wf-check.rs:15:12
|
LL | fn b() -> (W<()>, impl for A) { (W(()), ()) }
| ^^^^^ the trait `B` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
- --> $DIR/diagnostic-hir-wf-check.rs:13:1
+ --> $DIR/diagnostic-hir-wf-check.rs:12:1
|
LL | trait B {}
| ^^^^^^^
note: required by a bound in `W`
- --> $DIR/diagnostic-hir-wf-check.rs:14:13
+ --> $DIR/diagnostic-hir-wf-check.rs:13:13
|
LL | struct W(T);
| ^ required by this bound in `W`
error[E0277]: the trait bound `(): B` is not satisfied
- --> $DIR/diagnostic-hir-wf-check.rs:16:42
+ --> $DIR/diagnostic-hir-wf-check.rs:15:42
|
LL | fn b() -> (W<()>, impl for A) { (W(()), ()) }
| - ^^ the trait `B` is not implemented for `()`
@@ -33,33 +24,33 @@ LL | fn b() -> (W<()>, impl for A) { (W(()), ()) }
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
- --> $DIR/diagnostic-hir-wf-check.rs:13:1
+ --> $DIR/diagnostic-hir-wf-check.rs:12:1
|
LL | trait B {}
| ^^^^^^^
note: required by a bound in `W`
- --> $DIR/diagnostic-hir-wf-check.rs:14:13
+ --> $DIR/diagnostic-hir-wf-check.rs:13:13
|
LL | struct W(T);
| ^ required by this bound in `W`
error[E0277]: the trait bound `(): B` is not satisfied
- --> $DIR/diagnostic-hir-wf-check.rs:16:40
+ --> $DIR/diagnostic-hir-wf-check.rs:15:40
|
LL | fn b() -> (W<()>, impl for A) { (W(()), ()) }
| ^^^^^ the trait `B` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
- --> $DIR/diagnostic-hir-wf-check.rs:13:1
+ --> $DIR/diagnostic-hir-wf-check.rs:12:1
|
LL | trait B {}
| ^^^^^^^
note: required by a bound in `W`
- --> $DIR/diagnostic-hir-wf-check.rs:14:13
+ --> $DIR/diagnostic-hir-wf-check.rs:13:13
|
LL | struct W(T);
| ^ required by this bound in `W`
-error: aborting due to 3 previous errors; 1 warning emitted
+error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr
index 1f13207e33ca3..9a4d36a02f312 100644
--- a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr
+++ b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr
@@ -1,24 +1,15 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/drop-impl-pred.rs:6:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0367]: `Drop` impl requires `H: Foo` but the struct it is implemented for does not
- --> $DIR/drop-impl-pred.rs:19:15
+ --> $DIR/drop-impl-pred.rs:18:15
|
LL | for H: Foo,
| ^^^
|
note: the implementor must specify the same requirement
- --> $DIR/drop-impl-pred.rs:12:1
+ --> $DIR/drop-impl-pred.rs:11:1
|
LL | struct Bar(T) where T: Foo;
| ^^^^^^^^^^^^^
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0367`.
diff --git a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs
index db8f3de2149d4..3444f10672833 100644
--- a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs
+++ b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs
@@ -4,7 +4,6 @@
// Issue 110557
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
pub trait Foo {}
diff --git a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.yes.stderr b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.yes.stderr
deleted file mode 100644
index 165cf2ee13da8..0000000000000
--- a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.yes.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/drop-impl-pred.rs:6:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/traits/non_lifetime_binders/fail.rs b/tests/ui/traits/non_lifetime_binders/fail.rs
index 460f68907e889..7d916c422756c 100644
--- a/tests/ui/traits/non_lifetime_binders/fail.rs
+++ b/tests/ui/traits/non_lifetime_binders/fail.rs
@@ -1,7 +1,6 @@
// Error reporting for where `for T: Trait` doesn't hold
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
trait Trait {}
diff --git a/tests/ui/traits/non_lifetime_binders/fail.stderr b/tests/ui/traits/non_lifetime_binders/fail.stderr
index 9a324c952931e..38a0eabddd3bb 100644
--- a/tests/ui/traits/non_lifetime_binders/fail.stderr
+++ b/tests/ui/traits/non_lifetime_binders/fail.stderr
@@ -1,25 +1,16 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/fail.rs:3:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0277]: the trait bound `T: Trait` is not satisfied
- --> $DIR/fail.rs:19:5
+ --> $DIR/fail.rs:18:5
|
LL | fail();
| ^^^^^^ the trait `Trait` is not implemented for `T`
|
help: this trait has no implementations, consider adding one
- --> $DIR/fail.rs:6:1
+ --> $DIR/fail.rs:5:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `fail`
- --> $DIR/fail.rs:10:15
+ --> $DIR/fail.rs:9:15
|
LL | fn fail()
| ---- required by a bound in this function
@@ -28,14 +19,14 @@ LL | for T: Trait,
| ^^^^^ required by this bound in `fail`
error[E0277]: `T` cannot be sent between threads safely
- --> $DIR/fail.rs:21:5
+ --> $DIR/fail.rs:20:5
|
LL | auto_trait();
| ^^^^^^^^^^^^ `T` cannot be sent between threads safely
|
= help: the trait `Send` is not implemented for `T`
note: required by a bound in `auto_trait`
- --> $DIR/fail.rs:15:15
+ --> $DIR/fail.rs:14:15
|
LL | fn auto_trait()
| ---------- required by a bound in this function
@@ -43,6 +34,6 @@ LL | where
LL | for T: Send,
| ^^^^ required by this bound in `auto_trait`
-error: aborting due to 2 previous errors; 1 warning emitted
+error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/non_lifetime_binders/foreach-partial-eq.rs b/tests/ui/traits/non_lifetime_binders/foreach-partial-eq.rs
index 96a7424f0dc9c..0c4347b2e4b31 100644
--- a/tests/ui/traits/non_lifetime_binders/foreach-partial-eq.rs
+++ b/tests/ui/traits/non_lifetime_binders/foreach-partial-eq.rs
@@ -1,5 +1,4 @@
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
fn auto_trait()
where
diff --git a/tests/ui/traits/non_lifetime_binders/foreach-partial-eq.stderr b/tests/ui/traits/non_lifetime_binders/foreach-partial-eq.stderr
index abbdecf2fe1db..b621f5c612dee 100644
--- a/tests/ui/traits/non_lifetime_binders/foreach-partial-eq.stderr
+++ b/tests/ui/traits/non_lifetime_binders/foreach-partial-eq.stderr
@@ -1,21 +1,12 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/foreach-partial-eq.rs:1:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0277]: can't compare `T` with `T`
- --> $DIR/foreach-partial-eq.rs:10:5
+ --> $DIR/foreach-partial-eq.rs:9:5
|
LL | auto_trait();
| ^^^^^^^^^^^^ no implementation for `T < T` and `T > T`
|
= help: the trait `PartialOrd` is not implemented for `T`
note: required by a bound in `auto_trait`
- --> $DIR/foreach-partial-eq.rs:6:27
+ --> $DIR/foreach-partial-eq.rs:5:27
|
LL | fn auto_trait()
| ---------- required by a bound in this function
@@ -23,6 +14,6 @@ LL | where
LL | for T: PartialEq + PartialOrd,
| ^^^^^^^^^^ required by this bound in `auto_trait`
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs b/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs
index 94733f88c2dae..e8b7139e82eaa 100644
--- a/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs
+++ b/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs
@@ -1,6 +1,4 @@
#![feature(non_lifetime_binders, generic_const_exprs)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
-//~| WARN the feature `generic_const_exprs` is incomplete
fn foo() -> usize
where
diff --git a/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.stderr b/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.stderr
index cc482887c8144..cd8bc33ec313d 100644
--- a/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.stderr
+++ b/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.stderr
@@ -1,27 +1,10 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/late-bound-in-anon-ct.rs:1:12
- |
-LL | #![feature(non_lifetime_binders, generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/late-bound-in-anon-ct.rs:1:34
- |
-LL | #![feature(non_lifetime_binders, generic_const_exprs)]
- | ^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #76560 for more information
-
error: cannot capture late-bound type parameter in constant
- --> $DIR/late-bound-in-anon-ct.rs:7:27
+ --> $DIR/late-bound-in-anon-ct.rs:5:27
|
LL | for [i32; { let _: T = todo!(); 0 }]:,
| - ^
| |
| parameter defined here
-error: aborting due to 1 previous error; 2 warnings emitted
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/non_lifetime_binders/late-const-param-wf.rs b/tests/ui/traits/non_lifetime_binders/late-const-param-wf.rs
index 2d44388f875f9..75117e10bc982 100644
--- a/tests/ui/traits/non_lifetime_binders/late-const-param-wf.rs
+++ b/tests/ui/traits/non_lifetime_binders/late-const-param-wf.rs
@@ -1,5 +1,4 @@
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
fn b()
where
diff --git a/tests/ui/traits/non_lifetime_binders/late-const-param-wf.stderr b/tests/ui/traits/non_lifetime_binders/late-const-param-wf.stderr
index 136d533a03c40..98558dc74dc24 100644
--- a/tests/ui/traits/non_lifetime_binders/late-const-param-wf.stderr
+++ b/tests/ui/traits/non_lifetime_binders/late-const-param-wf.stderr
@@ -1,17 +1,8 @@
error: late-bound const parameters cannot be used currently
- --> $DIR/late-const-param-wf.rs:6:15
+ --> $DIR/late-const-param-wf.rs:5:15
|
LL | for [(); C]: Copy,
| ^
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/late-const-param-wf.rs:1:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/non_lifetime_binders/method-probe.rs b/tests/ui/traits/non_lifetime_binders/method-probe.rs
index 5f8e31446f523..3d162524e9505 100644
--- a/tests/ui/traits/non_lifetime_binders/method-probe.rs
+++ b/tests/ui/traits/non_lifetime_binders/method-probe.rs
@@ -1,7 +1,6 @@
//@ check-pass
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
trait Foo: for Bar {}
diff --git a/tests/ui/traits/non_lifetime_binders/method-probe.stderr b/tests/ui/traits/non_lifetime_binders/method-probe.stderr
deleted file mode 100644
index 8f61792e6ce7f..0000000000000
--- a/tests/ui/traits/non_lifetime_binders/method-probe.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/method-probe.rs:3:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/traits/non_lifetime_binders/missing-assoc-item.rs b/tests/ui/traits/non_lifetime_binders/missing-assoc-item.rs
index 50f0152e904f4..1e645f3e32d2f 100644
--- a/tests/ui/traits/non_lifetime_binders/missing-assoc-item.rs
+++ b/tests/ui/traits/non_lifetime_binders/missing-assoc-item.rs
@@ -1,5 +1,4 @@
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
fn f()
where
diff --git a/tests/ui/traits/non_lifetime_binders/missing-assoc-item.stderr b/tests/ui/traits/non_lifetime_binders/missing-assoc-item.stderr
index 02295307cb22a..4de30e77d46b3 100644
--- a/tests/ui/traits/non_lifetime_binders/missing-assoc-item.stderr
+++ b/tests/ui/traits/non_lifetime_binders/missing-assoc-item.stderr
@@ -1,14 +1,5 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/missing-assoc-item.rs:1:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error[E0223]: ambiguous associated type
- --> $DIR/missing-assoc-item.rs:6:12
+ --> $DIR/missing-assoc-item.rs:5:12
|
LL | for B::Item: Send,
| ^^^^^^^
@@ -19,6 +10,6 @@ LL - for B::Item: Send,
LL + for ::Item: Send,
|
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0223`.
diff --git a/tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.rs b/tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.rs
index e9ae00df7a09e..e5ab8d6bc638a 100644
--- a/tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.rs
+++ b/tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.rs
@@ -1,5 +1,4 @@
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
trait Trait {
type Assoc;
diff --git a/tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.stderr b/tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.stderr
index 8304469150911..12eb6c3406c3f 100644
--- a/tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.stderr
+++ b/tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.stderr
@@ -1,17 +1,8 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/nested-apit-mentioning-outer-bound-var.rs:1:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error: `impl Trait` can only mention type parameters from an fn or impl
- --> $DIR/nested-apit-mentioning-outer-bound-var.rs:8:52
+ --> $DIR/nested-apit-mentioning-outer-bound-var.rs:7:52
|
LL | fn uwu(_: impl for Trait<(), Assoc = impl Trait>) {}
| - type parameter declared here ^
-error: aborting due to 1 previous error; 1 warning emitted
+error: aborting due to 1 previous error
diff --git a/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.rs b/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.rs
index e776d5f2f21ad..4ccf4dbd20f84 100644
--- a/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.rs
+++ b/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.rs
@@ -2,6 +2,5 @@
//@ compile-flags: --crate-type=lib
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
pub fn f() where for (T, U): Copy {}
diff --git a/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.stderr b/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.stderr
deleted file mode 100644
index 667575b72d4cb..0000000000000
--- a/tests/ui/traits/non_lifetime_binders/object-lifetime-default-for-late.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/object-lifetime-default-for-late.rs:4:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/traits/non_lifetime_binders/on-dyn.rs b/tests/ui/traits/non_lifetime_binders/on-dyn.rs
index 8fb7dd27605f9..a081974ca8e68 100644
--- a/tests/ui/traits/non_lifetime_binders/on-dyn.rs
+++ b/tests/ui/traits/non_lifetime_binders/on-dyn.rs
@@ -1,7 +1,6 @@
// Tests to make sure that we reject polymorphic dyn trait.
#![feature(non_lifetime_binders)]
-//~^ WARN the feature `non_lifetime_binders` is incomplete
trait Test {}
diff --git a/tests/ui/traits/non_lifetime_binders/on-dyn.stderr b/tests/ui/traits/non_lifetime_binders/on-dyn.stderr
index 2d330f6b14334..8d7cb51c034c6 100644
--- a/tests/ui/traits/non_lifetime_binders/on-dyn.stderr
+++ b/tests/ui/traits/non_lifetime_binders/on-dyn.stderr
@@ -1,17 +1,8 @@
-warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/on-dyn.rs:3:12
- |
-LL | #![feature(non_lifetime_binders)]
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #108185 for more information
- = note: `#[warn(incomplete_features)]` on by default
-
error: late-bound type parameter not allowed on trait object types
- --> $DIR/on-dyn.rs:8:30
+ --> $DIR/on-dyn.rs:7:30
|
LL | fn foo() -> &'static dyn for Test | |