From 858b82da3b62b44ce0ee9d24fa29dea640f793c8 Mon Sep 17 00:00:00 2001 From: randomicon00 <20146907+randomicon00@users.noreply.github.com> Date: Sun, 8 Mar 2026 22:37:03 -0400 Subject: [PATCH 1/2] Simplify find_attr! for HirId usage Add a HasAttrs<'tcx, Tcx> trait to rustc_hir that allows find_attr! to accept DefId, LocalDefId, OwnerId, and HirId directly, instead of requiring callers to manually fetch the attribute slice first. The trait is defined in rustc_hir with a generic Tcx parameter to avoid a dependency cycle (rustc_hir cannot depend on rustc_middle). The four concrete impls for TyCtxt are in rustc_middle. --- .../src/const_eval/fn_queries.rs | 2 +- compiler/rustc_hir/src/attrs/mod.rs | 26 +++++++++++----- compiler/rustc_hir_typeck/src/loops.rs | 4 +-- .../rustc_interface/src/proc_macro_decls.rs | 2 +- compiler/rustc_middle/src/ty/mod.rs | 30 +++++++++++++++++++ compiler/rustc_mir_build/src/builder/mod.rs | 2 +- compiler/rustc_mir_build/src/thir/cx/expr.rs | 4 +-- compiler/rustc_mir_build/src/thir/cx/mod.rs | 2 +- .../clippy_lints/src/functions/must_use.rs | 6 ++-- .../clippy_lints/src/incompatible_msrv.rs | 2 +- .../clippy_lints/src/manual_non_exhaustive.rs | 4 +-- .../clippy_lints/src/methods/is_empty.rs | 2 +- src/tools/clippy/clippy_utils/src/lib.rs | 6 ++-- 13 files changed, 67 insertions(+), 25 deletions(-) diff --git a/compiler/rustc_const_eval/src/const_eval/fn_queries.rs b/compiler/rustc_const_eval/src/const_eval/fn_queries.rs index ad4c9aa5ff9bd..0b5065f12f805 100644 --- a/compiler/rustc_const_eval/src/const_eval/fn_queries.rs +++ b/compiler/rustc_const_eval/src/const_eval/fn_queries.rs @@ -37,7 +37,7 @@ fn constness(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Constness { } } Node::TraitItem(ti @ TraitItem { kind: TraitItemKind::Fn(..), .. }) => { - if find_attr!(tcx.hir_attrs(ti.hir_id()), RustcNonConstTraitMethod) { + if find_attr!(tcx, ti.hir_id(), RustcNonConstTraitMethod) { Constness::NotConst } else { tcx.trait_def(tcx.local_parent(def_id)).constness diff --git a/compiler/rustc_hir/src/attrs/mod.rs b/compiler/rustc_hir/src/attrs/mod.rs index 09fa144a16041..b3c1deaa48fa8 100644 --- a/compiler/rustc_hir/src/attrs/mod.rs +++ b/compiler/rustc_hir/src/attrs/mod.rs @@ -13,6 +13,15 @@ pub mod diagnostic; mod encode_cross_crate; mod pretty_printing; +/// A trait for types that can provide a list of attributes given a `TyCtxt`. +/// +/// It allows `find_attr!` to accept either a `DefId`, `LocalDefId`, `OwnerId`, or `HirId`. +/// It is defined here with a generic `Tcx` because `rustc_hir` can't depend on `rustc_middle`. +/// The concrete implementations are in `rustc_middle`. +pub trait HasAttrs<'tcx, Tcx> { + fn get_attrs(self, tcx: &Tcx) -> &'tcx [crate::Attribute]; +} + /// Finds attributes in sequences of attributes by pattern matching. /// /// A little like `matches` but for attributes. @@ -34,10 +43,12 @@ mod pretty_printing; /// /// As a convenience, this macro can do that for you! /// -/// Instead of providing an attribute list, provide the `tcx` and a `DefId`. +/// Instead of providing an attribute list, provide the `tcx` and an id +/// (a `DefId`, `LocalDefId`, `OwnerId` or `HirId`). /// /// ```rust,ignore (illustrative) /// find_attr!(tcx, def_id, ) +/// find_attr!(tcx, hir_id, ) /// ``` /// /// Another common case is finding attributes applied to the root of the current crate. @@ -55,13 +66,14 @@ macro_rules! find_attr { $crate::find_attr!($tcx.hir_krate_attrs(), $pattern $(if $guard)? => $e) }; - ($tcx: expr, $def_id: expr, $pattern: pat $(if $guard: expr)?) => { - $crate::find_attr!($tcx, $def_id, $pattern $(if $guard)? => ()).is_some() + ($tcx: expr, $id: expr, $pattern: pat $(if $guard: expr)?) => { + $crate::find_attr!($tcx, $id, $pattern $(if $guard)? => ()).is_some() }; - ($tcx: expr, $def_id: expr, $pattern: pat $(if $guard: expr)? => $e: expr) => {{ - #[allow(deprecated)] { - $crate::find_attr!($tcx.get_all_attrs($def_id), $pattern $(if $guard)? => $e) - } + ($tcx: expr, $id: expr, $pattern: pat $(if $guard: expr)? => $e: expr) => {{ + $crate::find_attr!( + $crate::attrs::HasAttrs::get_attrs($id, &$tcx), + $pattern $(if $guard)? => $e + ) }}; diff --git a/compiler/rustc_hir_typeck/src/loops.rs b/compiler/rustc_hir_typeck/src/loops.rs index e77c93641e1a6..21b408064fac5 100644 --- a/compiler/rustc_hir_typeck/src/loops.rs +++ b/compiler/rustc_hir_typeck/src/loops.rs @@ -207,7 +207,7 @@ impl<'hir> Visitor<'hir> for CheckLoopVisitor<'hir> { }; // A `#[const_continue]` must break to a block in a `#[loop_match]`. - if find_attr!(self.tcx.hir_attrs(e.hir_id), ConstContinue(_)) { + if find_attr!(self.tcx, e.hir_id, ConstContinue(_)) { let Some(label) = break_destination.label else { let span = e.span; self.tcx.dcx().emit_fatal(ConstContinueBadLabel { span }); @@ -420,7 +420,7 @@ impl<'hir> CheckLoopVisitor<'hir> { e: &'hir hir::Expr<'hir>, body: &'hir hir::Block<'hir>, ) -> Option { - if !find_attr!(self.tcx.hir_attrs(e.hir_id), LoopMatch(_)) { + if !find_attr!(self.tcx, e.hir_id, LoopMatch(_)) { return None; } diff --git a/compiler/rustc_interface/src/proc_macro_decls.rs b/compiler/rustc_interface/src/proc_macro_decls.rs index 63fed51b020a9..eb60c61b0af71 100644 --- a/compiler/rustc_interface/src/proc_macro_decls.rs +++ b/compiler/rustc_interface/src/proc_macro_decls.rs @@ -7,7 +7,7 @@ fn proc_macro_decls_static(tcx: TyCtxt<'_>, (): ()) -> Option { let mut decls = None; for id in tcx.hir_free_items() { - if find_attr!(tcx.hir_attrs(id.hir_id()), RustcProcMacroDecls) { + if find_attr!(tcx, id.hir_id(), RustcProcMacroDecls) { decls = Some(id.owner_id.def_id); } } diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 6abe7d1466990..282d566a4a94a 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -2199,6 +2199,36 @@ impl<'tcx> TyCtxt<'tcx> { } } +// `HasAttrs` impls: allow `find_attr!(tcx, id, ...)` to work with both DefId-like types and HirId. + +impl<'tcx> hir::attrs::HasAttrs<'tcx, TyCtxt<'tcx>> for DefId { + fn get_attrs(self, tcx: &TyCtxt<'tcx>) -> &'tcx [hir::Attribute] { + if let Some(did) = self.as_local() { + tcx.hir_attrs(tcx.local_def_id_to_hir_id(did)) + } else { + tcx.attrs_for_def(self) + } + } +} + +impl<'tcx> hir::attrs::HasAttrs<'tcx, TyCtxt<'tcx>> for LocalDefId { + fn get_attrs(self, tcx: &TyCtxt<'tcx>) -> &'tcx [hir::Attribute] { + tcx.hir_attrs(tcx.local_def_id_to_hir_id(self)) + } +} + +impl<'tcx> hir::attrs::HasAttrs<'tcx, TyCtxt<'tcx>> for hir::OwnerId { + fn get_attrs(self, tcx: &TyCtxt<'tcx>) -> &'tcx [hir::Attribute] { + hir::attrs::HasAttrs::get_attrs(self.def_id, tcx) + } +} + +impl<'tcx> hir::attrs::HasAttrs<'tcx, TyCtxt<'tcx>> for hir::HirId { + fn get_attrs(self, tcx: &TyCtxt<'tcx>) -> &'tcx [hir::Attribute] { + tcx.hir_attrs(self) + } +} + pub fn provide(providers: &mut Providers) { closure::provide(providers); context::provide(providers); diff --git a/compiler/rustc_mir_build/src/builder/mod.rs b/compiler/rustc_mir_build/src/builder/mod.rs index bcac45199437c..01c1e2e79b501 100644 --- a/compiler/rustc_mir_build/src/builder/mod.rs +++ b/compiler/rustc_mir_build/src/builder/mod.rs @@ -491,7 +491,7 @@ fn construct_fn<'tcx>( }; if let Some((dialect, phase)) = - find_attr!(tcx.hir_attrs(fn_id), CustomMir(dialect, phase, _) => (dialect, phase)) + find_attr!(tcx, fn_id, CustomMir(dialect, phase, _) => (dialect, phase)) { return custom::build_custom_mir( tcx, diff --git a/compiler/rustc_mir_build/src/thir/cx/expr.rs b/compiler/rustc_mir_build/src/thir/cx/expr.rs index c5eeb8b1aa856..b868fa7984b60 100644 --- a/compiler/rustc_mir_build/src/thir/cx/expr.rs +++ b/compiler/rustc_mir_build/src/thir/cx/expr.rs @@ -873,7 +873,7 @@ impl<'tcx> ThirBuildCx<'tcx> { hir::ExprKind::Ret(v) => ExprKind::Return { value: v.map(|v| self.mirror_expr(v)) }, hir::ExprKind::Become(call) => ExprKind::Become { value: self.mirror_expr(call) }, hir::ExprKind::Break(dest, ref value) => { - if find_attr!(self.tcx.hir_attrs(expr.hir_id), ConstContinue(_)) { + if find_attr!(self.tcx, expr.hir_id, ConstContinue(_)) { match dest.target_id { Ok(target_id) => { let (Some(value), Some(_)) = (value, dest.label) else { @@ -938,7 +938,7 @@ impl<'tcx> ThirBuildCx<'tcx> { match_source, }, hir::ExprKind::Loop(body, ..) => { - if find_attr!(self.tcx.hir_attrs(expr.hir_id), LoopMatch(_)) { + if find_attr!(self.tcx, expr.hir_id, LoopMatch(_)) { let dcx = self.tcx.dcx(); // Accept either `state = expr` or `state = expr;`. diff --git a/compiler/rustc_mir_build/src/thir/cx/mod.rs b/compiler/rustc_mir_build/src/thir/cx/mod.rs index 60cb509ee9dd2..e3bba5d2f9356 100644 --- a/compiler/rustc_mir_build/src/thir/cx/mod.rs +++ b/compiler/rustc_mir_build/src/thir/cx/mod.rs @@ -104,7 +104,7 @@ impl<'tcx> ThirBuildCx<'tcx> { typing_env: ty::TypingEnv::non_body_analysis(tcx, def), typeck_results, body_owner: def.to_def_id(), - apply_adjustments: !find_attr!(tcx.hir_attrs(hir_id), CustomMir(..) => ()).is_some(), + apply_adjustments: !find_attr!(tcx, hir_id, CustomMir(..)), } } diff --git a/src/tools/clippy/clippy_lints/src/functions/must_use.rs b/src/tools/clippy/clippy_lints/src/functions/must_use.rs index 04c657104fe1d..7c1b3ef225c6a 100644 --- a/src/tools/clippy/clippy_lints/src/functions/must_use.rs +++ b/src/tools/clippy/clippy_lints/src/functions/must_use.rs @@ -24,7 +24,7 @@ use super::{DOUBLE_MUST_USE, MUST_USE_CANDIDATE, MUST_USE_UNIT}; pub(super) fn check_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { let attrs = cx.tcx.hir_attrs(item.hir_id()); - let attr = find_attr!(cx.tcx.hir_attrs(item.hir_id()), MustUse { span, reason } => (span, reason)); + let attr = find_attr!(cx.tcx, item.hir_id(), MustUse { span, reason } => (span, reason)); if let hir::ItemKind::Fn { ref sig, body: ref body_id, @@ -65,7 +65,7 @@ pub(super) fn check_impl_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Imp let is_public = cx.effective_visibilities.is_exported(item.owner_id.def_id); let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); let attrs = cx.tcx.hir_attrs(item.hir_id()); - let attr = find_attr!(cx.tcx.hir_attrs(item.hir_id()), MustUse { span, reason } => (span, reason)); + let attr = find_attr!(cx.tcx, item.hir_id(), MustUse { span, reason } => (span, reason)); if let Some((attr_span, reason)) = attr { check_needless_must_use( cx, @@ -98,7 +98,7 @@ pub(super) fn check_trait_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Tr let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); let attrs = cx.tcx.hir_attrs(item.hir_id()); - let attr = find_attr!(cx.tcx.hir_attrs(item.hir_id()), MustUse { span, reason } => (span, reason)); + let attr = find_attr!(cx.tcx, item.hir_id(), MustUse { span, reason } => (span, reason)); if let Some((attr_span, reason)) = attr { check_needless_must_use( cx, diff --git a/src/tools/clippy/clippy_lints/src/incompatible_msrv.rs b/src/tools/clippy/clippy_lints/src/incompatible_msrv.rs index ad81810b58cb9..1ae8198a432dd 100644 --- a/src/tools/clippy/clippy_lints/src/incompatible_msrv.rs +++ b/src/tools/clippy/clippy_lints/src/incompatible_msrv.rs @@ -269,5 +269,5 @@ impl<'tcx> LateLintPass<'tcx> for IncompatibleMsrv { fn is_under_cfg_attribute(cx: &LateContext<'_>, hir_id: HirId) -> bool { cx.tcx .hir_parent_id_iter(hir_id) - .any(|id| find_attr!(cx.tcx.hir_attrs(id), CfgTrace(..) | CfgAttrTrace)) + .any(|id| find_attr!(cx.tcx, id, CfgTrace(..) | CfgAttrTrace)) } diff --git a/src/tools/clippy/clippy_lints/src/manual_non_exhaustive.rs b/src/tools/clippy/clippy_lints/src/manual_non_exhaustive.rs index 9ababe87f9dec..703c9137d5437 100644 --- a/src/tools/clippy/clippy_lints/src/manual_non_exhaustive.rs +++ b/src/tools/clippy/clippy_lints/src/manual_non_exhaustive.rs @@ -92,7 +92,7 @@ impl<'tcx> LateLintPass<'tcx> for ManualNonExhaustive { .then_some((v.def_id, v.span)) }); if let Ok((id, span)) = iter.exactly_one() - && !find_attr!(cx.tcx.hir_attrs(item.hir_id()), NonExhaustive(..)) + && !find_attr!(cx.tcx, item.hir_id(), NonExhaustive(..)) { self.potential_enums.push((item.owner_id.def_id, id, item.span, span)); } @@ -113,7 +113,7 @@ impl<'tcx> LateLintPass<'tcx> for ManualNonExhaustive { "this seems like a manual implementation of the non-exhaustive pattern", |diag| { if let Some(non_exhaustive_span) = - find_attr!(cx.tcx.hir_attrs(item.hir_id()), NonExhaustive(span) => *span) + find_attr!(cx.tcx, item.hir_id(), NonExhaustive(span) => *span) { diag.span_note(non_exhaustive_span, "the struct is already non-exhaustive"); } else { diff --git a/src/tools/clippy/clippy_lints/src/methods/is_empty.rs b/src/tools/clippy/clippy_lints/src/methods/is_empty.rs index 4577be34d4a77..cfda39ed08ff1 100644 --- a/src/tools/clippy/clippy_lints/src/methods/is_empty.rs +++ b/src/tools/clippy/clippy_lints/src/methods/is_empty.rs @@ -39,7 +39,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &'_ Expr<'_>, receiver: &Expr<'_ fn is_under_cfg(cx: &LateContext<'_>, id: HirId) -> bool { cx.tcx .hir_parent_id_iter(id) - .any(|id| find_attr!(cx.tcx.hir_attrs(id), CfgTrace(..))) + .any(|id| find_attr!(cx.tcx, id, CfgTrace(..))) } /// Similar to [`clippy_utils::expr_or_init`], but does not go up the chain if the initialization diff --git a/src/tools/clippy/clippy_utils/src/lib.rs b/src/tools/clippy/clippy_utils/src/lib.rs index 1e73e43e0a719..ac66b1e5338d6 100644 --- a/src/tools/clippy/clippy_utils/src/lib.rs +++ b/src/tools/clippy/clippy_utils/src/lib.rs @@ -1710,7 +1710,7 @@ pub fn has_attr(attrs: &[hir::Attribute], symbol: Symbol) -> bool { } pub fn has_repr_attr(cx: &LateContext<'_>, hir_id: HirId) -> bool { - find_attr!(cx.tcx.hir_attrs(hir_id), Repr { .. }) + find_attr!(cx.tcx, hir_id, Repr { .. }) } pub fn any_parent_has_attr(tcx: TyCtxt<'_>, node: HirId, symbol: Symbol) -> bool { @@ -2362,7 +2362,7 @@ fn with_test_item_names(tcx: TyCtxt<'_>, module: LocalModDefId, f: impl FnOnce(& && let TyKind::Path(QPath::Resolved(_, path)) = ty.kind // We could also check for the type name `test::TestDescAndFn` && let Res::Def(DefKind::Struct, _) = path.res - && find_attr!(tcx.hir_attrs(item.hir_id()), RustcTestMarker(..)) + && find_attr!(tcx, item.hir_id(), RustcTestMarker(..)) { names.push(ident.name); } @@ -2420,7 +2420,7 @@ pub fn is_test_function(tcx: TyCtxt<'_>, fn_def_id: LocalDefId) -> bool { /// This only checks directly applied attributes, to see if a node is inside a `#[cfg(test)]` parent /// use [`is_in_cfg_test`] pub fn is_cfg_test(tcx: TyCtxt<'_>, id: HirId) -> bool { - if let Some(cfgs) = find_attr!(tcx.hir_attrs(id), CfgTrace(cfgs) => cfgs) + if let Some(cfgs) = find_attr!(tcx, id, CfgTrace(cfgs) => cfgs) && cfgs .iter() .any(|(cfg, _)| matches!(cfg, CfgEntry::NameValue { name: sym::test, .. })) From 9b0be7857af8e355523b1db8b9e24acfd9be7db1 Mon Sep 17 00:00:00 2001 From: cyrgani Date: Sat, 21 Mar 2026 12:38:32 +0000 Subject: [PATCH 2/2] allow `incomplete_features` in most UI tests --- src/tools/compiletest/src/runtest.rs | 9 +- .../type-const-in-array-len-wrong-type.rs | 3 - .../type-const-in-array-len-wrong-type.stderr | 29 +---- .../type-const-in-array-len.rs | 2 - .../type-const-in-array-len.stderr | 19 ---- .../hr-do-not-blame-outlives-static-ice.rs | 1 - ...hr-do-not-blame-outlives-static-ice.stderr | 17 +-- .../variance-computation-requires-equality.rs | 1 - ...iance-computation-requires-equality.stderr | 11 -- .../defaults-specialization.rs | 1 - .../defaults-specialization.stderr | 42 +++----- .../async-drop/foreign-fundamental.rs | 1 - .../async-drop/foreign-fundamental.stderr | 15 +-- .../dyn/mut-is-pointer-like.stderr | 11 +- tests/ui/async-await/dyn/works.stderr | 11 +- tests/ui/async-await/dyn/wrong-size.stderr | 11 +- .../ui/borrowck/generic_const_early_param.rs | 1 - .../borrowck/generic_const_early_param.stderr | 17 +-- tests/ui/closures/binder/const-bound.rs | 1 - tests/ui/closures/binder/const-bound.stderr | 15 +-- tests/ui/closures/binder/type-bound-2.rs | 1 - tests/ui/closures/binder/type-bound-2.stderr | 13 +-- tests/ui/closures/binder/type-bound.rs | 1 - tests/ui/closures/binder/type-bound.stderr | 13 +-- .../freeze-on-polymorphic-projection.rs | 1 - .../freeze-on-polymorphic-projection.stderr | 12 --- .../coherence-doesnt-use-infcx-evaluate.rs | 1 - ...coherence-doesnt-use-infcx-evaluate.stderr | 12 --- .../coherence-inherited-assoc-ty-cycle-err.rs | 1 - ...erence-inherited-assoc-ty-cycle-err.stderr | 16 +-- .../regions-in-canonical.rs | 1 - .../regions-in-canonical.stderr | 11 -- tests/ui/consts/escaping-bound-var.rs | 1 - tests/ui/consts/escaping-bound-var.stderr | 15 +-- tests/ui/consts/issue-104396.rs | 1 - tests/ui/consts/issue-104396.stderr | 11 -- .../consts/refs_check_const_eq-issue-88384.rs | 1 - .../refs_check_const_eq-issue-88384.stderr | 15 +-- .../generic-associated-const.rs | 1 - .../generic-associated-const.stderr | 17 +-- tests/ui/consts/trait_specialization.rs | 2 +- tests/ui/consts/trait_specialization.stderr | 12 --- tests/ui/contracts/incomplete-feature.rs | 1 + tests/ui/contracts/incomplete-feature.stderr | 8 +- tests/ui/error-codes/E0520.rs | 1 - tests/ui/error-codes/E0520.stderr | 14 +-- tests/ui/error-codes/E0771.rs | 1 - tests/ui/error-codes/E0771.stderr | 13 +-- ...e-effective-target-features.default.stderr | 8 +- ...e-effective-target-features.feature.stderr | 14 ++- .../feature-gate-effective-target-features.rs | 1 + .../feature-gate-unsafe_fields.rs | 2 +- ...eature-gate-unsafe_fields.with_gate.stderr | 6 +- .../issue-87429-specialization.rs | 1 - .../issue-87429-specialization.stderr | 16 +-- .../recover-incorrect-impl-restriction.rs | 1 + ...ncorrect-impl-restriction.with_gate.stderr | 20 ++-- ...rrect-impl-restriction.without_gate.stderr | 24 ++--- .../trait-alias-cannot-be-impl-restricted.rs | 1 + ...cannot-be-impl-restricted.with_gate.stderr | 32 +++--- ...not-be-impl-restricted.without_gate.stderr | 38 +++---- tests/ui/impl-trait/equality-rpass.rs | 2 +- tests/ui/impl-trait/equality-rpass.stderr | 12 --- tests/ui/impl-trait/equality.rs | 2 +- tests/ui/impl-trait/equality.stderr | 12 +-- tests/ui/impl-trait/equality2.rs | 2 +- tests/ui/impl-trait/equality2.stderr | 12 +-- .../in-trait/alias-bounds-when-not-wf.rs | 1 - .../in-trait/alias-bounds-when-not-wf.stderr | 25 ++--- .../ui/layout/gce-rigid-const-in-array-len.rs | 2 +- .../gce-rigid-const-in-array-len.stderr | 11 +- .../ui/lazy-type-alias/bad-lazy-type-alias.rs | 1 - .../bad-lazy-type-alias.stderr | 15 +-- .../coerce-behind-lazy.current.stderr | 11 -- .../coerce-behind-lazy.next.stderr | 11 -- .../ui/lazy-type-alias/coerce-behind-lazy.rs | 1 - tests/ui/lazy-type-alias/enum-variant.rs | 1 - tests/ui/lazy-type-alias/enum-variant.stderr | 11 -- ...lap-doesnt-conflict-with-specialization.rs | 2 +- ...doesnt-conflict-with-specialization.stderr | 12 --- .../assoc/assoc-static-semantic-fail.rs | 1 - .../assoc/assoc-static-semantic-fail.stderr | 60 +++++------ tests/ui/parser/default.rs | 1 - tests/ui/parser/default.stderr | 20 +--- ...efaultness-invalid-places-fail-semantic.rs | 2 +- ...ltness-invalid-places-fail-semantic.stderr | 12 +-- .../empty-types.exhaustive_patterns.stderr | 100 +++++++++--------- .../usefulness/empty-types.never_pats.stderr | 97 ++++++++--------- .../usefulness/empty-types.normal.stderr | 86 +++++++-------- tests/ui/pattern/usefulness/empty-types.rs | 1 - .../pin-ergonomics/coerce-non-pointer-pin.rs | 1 - .../coerce-non-pointer-pin.stderr | 11 -- .../never-pattern-is-a-read.rs | 1 - .../never-pattern-is-a-read.stderr | 13 +-- .../dont-assume-err-is-yes-issue-126377.rs | 1 - ...dont-assume-err-is-yes-issue-126377.stderr | 17 +-- .../non_scalar_alignment_value.rs | 1 - .../non_scalar_alignment_value.stderr | 19 +--- tests/ui/unsafe-binders/binder-sized-crit.rs | 1 - .../unsafe-binders/binder-sized-crit.stderr | 11 -- tests/ui/unsafe-binders/expr.rs | 1 - tests/ui/unsafe-binders/expr.stderr | 11 -- .../ui/unsafe-binders/lifetime-resolution.rs | 1 - .../unsafe-binders/lifetime-resolution.stderr | 15 +-- tests/ui/unsafe-binders/mismatch.rs | 1 - tests/ui/unsafe-binders/mismatch.stderr | 21 ++-- tests/ui/unsafe-binders/moves.rs | 1 - tests/ui/unsafe-binders/moves.stderr | 19 +--- tests/ui/unsafe-binders/simple.rs | 1 - tests/ui/unsafe-binders/simple.stderr | 11 -- tests/ui/unsafe-binders/type-mismatch.rs | 1 - tests/ui/unsafe-binders/type-mismatch.stderr | 15 +-- .../unsafe-binders-debuginfo.rs | 1 - .../unsafe-binders-debuginfo.stderr | 11 -- 114 files changed, 374 insertions(+), 917 deletions(-) delete mode 100644 tests/ui/associated-consts/type-const-in-array-len.stderr delete mode 100644 tests/ui/associated-inherent-types/variance-computation-requires-equality.stderr delete mode 100644 tests/ui/codegen/freeze-on-polymorphic-projection.stderr delete mode 100644 tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.stderr delete mode 100644 tests/ui/coherence/negative-coherence/regions-in-canonical.stderr delete mode 100644 tests/ui/consts/issue-104396.stderr delete mode 100644 tests/ui/consts/trait_specialization.stderr delete mode 100644 tests/ui/impl-trait/equality-rpass.stderr delete mode 100644 tests/ui/lazy-type-alias/coerce-behind-lazy.current.stderr delete mode 100644 tests/ui/lazy-type-alias/coerce-behind-lazy.next.stderr delete mode 100644 tests/ui/lazy-type-alias/enum-variant.stderr delete mode 100644 tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.stderr delete mode 100644 tests/ui/pin-ergonomics/coerce-non-pointer-pin.stderr delete mode 100644 tests/ui/unsafe-binders/binder-sized-crit.stderr delete mode 100644 tests/ui/unsafe-binders/expr.stderr delete mode 100644 tests/ui/unsafe-binders/simple.stderr delete mode 100644 tests/ui/unsafe-binders/unsafe-binders-debuginfo.stderr diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index b584d14b0c9ff..40e6c4e593b19 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1919,8 +1919,15 @@ impl<'test> TestCx<'test> { compiler.args(&["-A", "unused", "-W", "unused_attributes"]); } - // Allow tests to use internal features. + // 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") + { + compiler.args(&["-A", "incomplete_features"]); + } // Allow tests to have unused parens and braces. // Add #![deny(unused_parens, unused_braces)] to the test file if you want to diff --git a/tests/ui/associated-consts/type-const-in-array-len-wrong-type.rs b/tests/ui/associated-consts/type-const-in-array-len-wrong-type.rs index cb0b8a102eb47..c260ab1ee584d 100644 --- a/tests/ui/associated-consts/type-const-in-array-len-wrong-type.rs +++ b/tests/ui/associated-consts/type-const-in-array-len-wrong-type.rs @@ -1,9 +1,6 @@ #![feature(generic_const_exprs)] -//~^ WARN the feature `generic_const_exprs` is incomplete #![feature(min_generic_const_args)] -//~^ WARN the feature `min_generic_const_args` is incomplete #![feature(inherent_associated_types)] -//~^ WARN the feature `inherent_associated_types` is incomplete struct OnDiskDirEntry<'a>(&'a ()); diff --git a/tests/ui/associated-consts/type-const-in-array-len-wrong-type.stderr b/tests/ui/associated-consts/type-const-in-array-len-wrong-type.stderr index b69a1b7fd7dec..a90b1f666067d 100644 --- a/tests/ui/associated-consts/type-const-in-array-len-wrong-type.stderr +++ b/tests/ui/associated-consts/type-const-in-array-len-wrong-type.stderr @@ -1,35 +1,10 @@ -warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-const-in-array-len-wrong-type.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 `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-const-in-array-len-wrong-type.rs:3:12 - | -LL | #![feature(min_generic_const_args)] - | ^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #132980 for more information - -warning: the feature `inherent_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-const-in-array-len-wrong-type.rs:5:12 - | -LL | #![feature(inherent_associated_types)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #8995 for more information - error: the constant `2` is not of type `usize` - --> $DIR/type-const-in-array-len-wrong-type.rs:13:26 + --> $DIR/type-const-in-array-len-wrong-type.rs:10:26 | LL | fn lfn_contents() -> [char; Self::LFN_FRAGMENT_LEN] { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `i64` | = note: the length of array `[char; 2]` must be type `usize` -error: aborting due to 1 previous error; 3 warnings emitted +error: aborting due to 1 previous error diff --git a/tests/ui/associated-consts/type-const-in-array-len.rs b/tests/ui/associated-consts/type-const-in-array-len.rs index d33eacaade2df..7a809cefe9f75 100644 --- a/tests/ui/associated-consts/type-const-in-array-len.rs +++ b/tests/ui/associated-consts/type-const-in-array-len.rs @@ -1,9 +1,7 @@ //@ check-pass #![feature(min_generic_const_args)] -//~^ WARN the feature `min_generic_const_args` is incomplete #![feature(inherent_associated_types)] -//~^ WARN the feature `inherent_associated_types` is incomplete // Test case from #138226: generic impl with multiple type parameters struct Foo(A, B); diff --git a/tests/ui/associated-consts/type-const-in-array-len.stderr b/tests/ui/associated-consts/type-const-in-array-len.stderr deleted file mode 100644 index 546995d13a0a8..0000000000000 --- a/tests/ui/associated-consts/type-const-in-array-len.stderr +++ /dev/null @@ -1,19 +0,0 @@ -warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-const-in-array-len.rs:3:12 - | -LL | #![feature(min_generic_const_args)] - | ^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #132980 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: the feature `inherent_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-const-in-array-len.rs:5:12 - | -LL | #![feature(inherent_associated_types)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #8995 for more information - -warning: 2 warnings emitted - diff --git a/tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.rs b/tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.rs index e5c1f47b9e02b..27b3b93f071da 100644 --- a/tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.rs +++ b/tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.rs @@ -2,7 +2,6 @@ // Regression test for #146467. #![feature(inherent_associated_types)] -//~^ WARN the feature `inherent_associated_types` is incomplete struct Foo(T); diff --git a/tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.stderr b/tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.stderr index 4c0726d4ddca9..b06add2f5db5d 100644 --- a/tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.stderr +++ b/tests/ui/associated-inherent-types/hr-do-not-blame-outlives-static-ice.stderr @@ -1,20 +1,11 @@ -warning: the feature `inherent_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/hr-do-not-blame-outlives-static-ice.rs:4:12 - | -LL | #![feature(inherent_associated_types)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #8995 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/hr-do-not-blame-outlives-static-ice.rs:9:6 + --> $DIR/hr-do-not-blame-outlives-static-ice.rs:8:6 | LL | impl<'a> Foo { | ^^ unconstrained lifetime parameter error[E0308]: mismatched types - --> $DIR/hr-do-not-blame-outlives-static-ice.rs:14:11 + --> $DIR/hr-do-not-blame-outlives-static-ice.rs:13:11 | LL | fn foo(_: for<'a> fn(Foo::Assoc)) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other @@ -23,12 +14,12 @@ LL | fn foo(_: for<'a> fn(Foo::Assoc)) {} found struct `Foo fn(&'a ())>` error: higher-ranked subtype error - --> $DIR/hr-do-not-blame-outlives-static-ice.rs:14:1 + --> $DIR/hr-do-not-blame-outlives-static-ice.rs:13:1 | LL | fn foo(_: for<'a> fn(Foo::Assoc)) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 3 previous errors; 1 warning emitted +error: aborting due to 3 previous errors Some errors have detailed explanations: E0207, E0308. For more information about an error, try `rustc --explain E0207`. diff --git a/tests/ui/associated-inherent-types/variance-computation-requires-equality.rs b/tests/ui/associated-inherent-types/variance-computation-requires-equality.rs index 3f726792b4a11..b7f8586e31e8a 100644 --- a/tests/ui/associated-inherent-types/variance-computation-requires-equality.rs +++ b/tests/ui/associated-inherent-types/variance-computation-requires-equality.rs @@ -1,7 +1,6 @@ //@ check-pass #![feature(inherent_associated_types)] -//~^ WARN the feature `inherent_associated_types` is incomplete struct D { a: T diff --git a/tests/ui/associated-inherent-types/variance-computation-requires-equality.stderr b/tests/ui/associated-inherent-types/variance-computation-requires-equality.stderr deleted file mode 100644 index 93064f551abdc..0000000000000 --- a/tests/ui/associated-inherent-types/variance-computation-requires-equality.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `inherent_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/variance-computation-requires-equality.rs:3:12 - | -LL | #![feature(inherent_associated_types)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #8995 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/associated-types/defaults-specialization.rs b/tests/ui/associated-types/defaults-specialization.rs index 553705b2a4fab..d0ed718b83923 100644 --- a/tests/ui/associated-types/defaults-specialization.rs +++ b/tests/ui/associated-types/defaults-specialization.rs @@ -1,7 +1,6 @@ //! Tests the interaction of associated type defaults and specialization. #![feature(associated_type_defaults, specialization)] -//~^ WARN the feature `specialization` is incomplete trait Tr { type Ty = u8; diff --git a/tests/ui/associated-types/defaults-specialization.stderr b/tests/ui/associated-types/defaults-specialization.stderr index d22d9ce659a76..2e880a7d50ade 100644 --- a/tests/ui/associated-types/defaults-specialization.stderr +++ b/tests/ui/associated-types/defaults-specialization.stderr @@ -1,21 +1,11 @@ -warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/defaults-specialization.rs:3:38 - | -LL | #![feature(associated_type_defaults, 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[E0053]: method `make` has an incompatible type for trait - --> $DIR/defaults-specialization.rs:19:18 + --> $DIR/defaults-specialization.rs:18:18 | LL | fn make() -> u8 { 0 } | ^^ expected associated type, found `u8` | note: type in trait - --> $DIR/defaults-specialization.rs:9:18 + --> $DIR/defaults-specialization.rs:8:18 | LL | fn make() -> Self::Ty { | ^^^^^^^^ @@ -28,7 +18,7 @@ LL + fn make() -> as Tr>::Ty { 0 } | error[E0053]: method `make` has an incompatible type for trait - --> $DIR/defaults-specialization.rs:35:18 + --> $DIR/defaults-specialization.rs:34:18 | LL | default type Ty = bool; | --------------- associated type is `default` and may be overridden @@ -37,7 +27,7 @@ LL | fn make() -> bool { true } | ^^^^ expected associated type, found `bool` | note: type in trait - --> $DIR/defaults-specialization.rs:9:18 + --> $DIR/defaults-specialization.rs:8:18 | LL | fn make() -> Self::Ty { | ^^^^^^^^ @@ -50,7 +40,7 @@ LL + fn make() -> as Tr>::Ty { true } | error[E0308]: mismatched types - --> $DIR/defaults-specialization.rs:10:9 + --> $DIR/defaults-specialization.rs:9:9 | LL | type Ty = u8; | ------- associated type defaults can't be assumed inside the trait defining them @@ -64,7 +54,7 @@ LL | 0u8 found type `u8` error[E0308]: mismatched types - --> $DIR/defaults-specialization.rs:26:29 + --> $DIR/defaults-specialization.rs:25:29 | LL | fn make() -> Self::Ty { 0u8 } | -------- ^^^ expected associated type, found `u8` @@ -79,7 +69,7 @@ LL | fn make() -> Self::Ty { 0u8 } see issue #152409 for more information error[E0308]: mismatched types - --> $DIR/defaults-specialization.rs:44:29 + --> $DIR/defaults-specialization.rs:43:29 | LL | default type Ty = bool; | --------------- associated type is `default` and may be overridden @@ -95,7 +85,7 @@ LL | fn make() -> Self::Ty { true } see issue #152409 for more information error[E0308]: mismatched types - --> $DIR/defaults-specialization.rs:87:32 + --> $DIR/defaults-specialization.rs:86:32 | LL | let _: as Tr>::Ty = 0u8; | ----------------- ^^^ expected associated type, found `u8` @@ -105,13 +95,13 @@ LL | let _: as Tr>::Ty = 0u8; = note: expected associated type ` as Tr>::Ty` found type `u8` help: a method is available that returns ` as Tr>::Ty` - --> $DIR/defaults-specialization.rs:9:5 + --> $DIR/defaults-specialization.rs:8:5 | LL | fn make() -> Self::Ty { | ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make` error[E0308]: mismatched types - --> $DIR/defaults-specialization.rs:88:32 + --> $DIR/defaults-specialization.rs:87:32 | LL | let _: as Tr>::Ty = true; | ----------------- ^^^^ expected associated type, found `bool` @@ -121,7 +111,7 @@ LL | let _: as Tr>::Ty = true; = note: expected associated type ` as Tr>::Ty` found type `bool` help: a method is available that returns ` as Tr>::Ty` - --> $DIR/defaults-specialization.rs:9:5 + --> $DIR/defaults-specialization.rs:8:5 | LL | fn make() -> Self::Ty { | ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make` @@ -129,7 +119,7 @@ LL | fn make() -> Self::Ty { see issue #152409 for more information error[E0308]: mismatched types - --> $DIR/defaults-specialization.rs:89:33 + --> $DIR/defaults-specialization.rs:88:33 | LL | let _: as Tr>::Ty = 0u8; | ------------------ ^^^ expected associated type, found `u8` @@ -139,13 +129,13 @@ LL | let _: as Tr>::Ty = 0u8; = note: expected associated type ` as Tr>::Ty` found type `u8` help: a method is available that returns ` as Tr>::Ty` - --> $DIR/defaults-specialization.rs:9:5 + --> $DIR/defaults-specialization.rs:8:5 | LL | fn make() -> Self::Ty { | ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make` error[E0308]: mismatched types - --> $DIR/defaults-specialization.rs:90:33 + --> $DIR/defaults-specialization.rs:89:33 | LL | let _: as Tr>::Ty = true; | ------------------ ^^^^ expected associated type, found `bool` @@ -155,14 +145,14 @@ LL | let _: as Tr>::Ty = true; = note: expected associated type ` as Tr>::Ty` found type `bool` help: a method is available that returns ` as Tr>::Ty` - --> $DIR/defaults-specialization.rs:9:5 + --> $DIR/defaults-specialization.rs:8:5 | LL | fn make() -> Self::Ty { | ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make` = note: the associated type ` as Tr>::Ty` is defined as `bool` in the implementation, but the where-bound `B2<()>` shadows this definition see issue #152409 for more information -error: aborting due to 9 previous errors; 1 warning emitted +error: aborting due to 9 previous errors Some errors have detailed explanations: E0053, E0308. For more information about an error, try `rustc --explain E0053`. diff --git a/tests/ui/async-await/async-drop/foreign-fundamental.rs b/tests/ui/async-await/async-drop/foreign-fundamental.rs index 1c192fccd9f0c..44be20449469a 100644 --- a/tests/ui/async-await/async-drop/foreign-fundamental.rs +++ b/tests/ui/async-await/async-drop/foreign-fundamental.rs @@ -1,7 +1,6 @@ //@ edition: 2018 #![feature(async_drop)] -//~^ WARN the feature `async_drop` is incomplete use std::future::AsyncDrop; use std::pin::Pin; diff --git a/tests/ui/async-await/async-drop/foreign-fundamental.stderr b/tests/ui/async-await/async-drop/foreign-fundamental.stderr index 7b52329ac99d1..78bfdf66901a8 100644 --- a/tests/ui/async-await/async-drop/foreign-fundamental.stderr +++ b/tests/ui/async-await/async-drop/foreign-fundamental.stderr @@ -1,24 +1,15 @@ -warning: the feature `async_drop` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/foreign-fundamental.rs:3:12 - | -LL | #![feature(async_drop)] - | ^^^^^^^^^^ - | - = note: see issue #126482 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0120]: the `AsyncDrop` trait may only be implemented for local structs, enums, and unions - --> $DIR/foreign-fundamental.rs:11:20 + --> $DIR/foreign-fundamental.rs:10:20 | LL | impl AsyncDrop for &Foo { | ^^^^ must be a struct, enum, or union in the current crate error[E0120]: the `AsyncDrop` trait may only be implemented for local structs, enums, and unions - --> $DIR/foreign-fundamental.rs:16:20 + --> $DIR/foreign-fundamental.rs:15:20 | LL | impl AsyncDrop for Pin { | ^^^^^^^^ must be a struct, enum, or union in the current crate -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 E0120`. diff --git a/tests/ui/async-await/dyn/mut-is-pointer-like.stderr b/tests/ui/async-await/dyn/mut-is-pointer-like.stderr index 6689539ff453a..0f390522620ee 100644 --- a/tests/ui/async-await/dyn/mut-is-pointer-like.stderr +++ b/tests/ui/async-await/dyn/mut-is-pointer-like.stderr @@ -1,12 +1,3 @@ -warning: the feature `async_fn_in_dyn_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/mut-is-pointer-like.rs:6:12 - | -LL | #![feature(async_fn_in_dyn_trait)] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #133119 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0038]: the trait `AsyncTrait` is not dyn compatible --> $DIR/mut-is-pointer-like.rs:35:29 | @@ -24,6 +15,6 @@ LL | async fn async_dispatch(self: Pin<&mut Self>) -> Self::Output; | ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async` = help: consider moving `async_dispatch` to another 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 E0038`. diff --git a/tests/ui/async-await/dyn/works.stderr b/tests/ui/async-await/dyn/works.stderr index 338479d8b70a9..c7d0d14d70e77 100644 --- a/tests/ui/async-await/dyn/works.stderr +++ b/tests/ui/async-await/dyn/works.stderr @@ -1,12 +1,3 @@ -warning: the feature `async_fn_in_dyn_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/works.rs:6:12 - | -LL | #![feature(async_fn_in_dyn_trait)] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #133119 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0038]: the trait `AsyncTrait` is not dyn compatible --> $DIR/works.rs:27:21 | @@ -24,6 +15,6 @@ LL | async fn async_dispatch(&self); = help: consider moving `async_dispatch` to another trait = help: only type `&'static str` implements `AsyncTrait`; consider using it directly instead. -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 E0038`. diff --git a/tests/ui/async-await/dyn/wrong-size.stderr b/tests/ui/async-await/dyn/wrong-size.stderr index a465f91f62af0..4835c173f0d7d 100644 --- a/tests/ui/async-await/dyn/wrong-size.stderr +++ b/tests/ui/async-await/dyn/wrong-size.stderr @@ -1,12 +1,3 @@ -warning: the feature `async_fn_in_dyn_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/wrong-size.rs:4:12 - | -LL | #![feature(async_fn_in_dyn_trait)] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #133119 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0038]: the trait `AsyncTrait` is not dyn compatible --> $DIR/wrong-size.rs:21:17 | @@ -24,6 +15,6 @@ LL | async fn async_dispatch(&self); = help: consider moving `async_dispatch` to another trait = help: only type `&'static str` implements `AsyncTrait`; consider using it directly instead. -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 E0038`. diff --git a/tests/ui/borrowck/generic_const_early_param.rs b/tests/ui/borrowck/generic_const_early_param.rs index 0d07b6869f122..e5fab5919793d 100644 --- a/tests/ui/borrowck/generic_const_early_param.rs +++ b/tests/ui/borrowck/generic_const_early_param.rs @@ -1,5 +1,4 @@ #![feature(generic_const_exprs)] -//~^ WARN the feature `generic_const_exprs` is incomplete struct DataWrapper<'static> { //~^ ERROR invalid lifetime parameter name: `'static` diff --git a/tests/ui/borrowck/generic_const_early_param.stderr b/tests/ui/borrowck/generic_const_early_param.stderr index 6447f92aba853..a9ee438388148 100644 --- a/tests/ui/borrowck/generic_const_early_param.stderr +++ b/tests/ui/borrowck/generic_const_early_param.stderr @@ -1,11 +1,11 @@ error[E0262]: invalid lifetime parameter name: `'static` - --> $DIR/generic_const_early_param.rs:4:20 + --> $DIR/generic_const_early_param.rs:3:20 | LL | struct DataWrapper<'static> { | ^^^^^^^ 'static is a reserved lifetime name error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/generic_const_early_param.rs:6:12 + --> $DIR/generic_const_early_param.rs:5:12 | LL | data: &'a [u8; Self::SIZE], | ^^ undeclared lifetime @@ -16,7 +16,7 @@ LL | struct DataWrapper<'a, 'static> { | +++ error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/generic_const_early_param.rs:10:18 + --> $DIR/generic_const_early_param.rs:9:18 | LL | impl DataWrapper<'a> { | ^^ undeclared lifetime @@ -26,16 +26,7 @@ help: consider introducing lifetime `'a` here LL | impl<'a> DataWrapper<'a> { | ++++ -warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_const_early_param.rs:1:12 - | -LL | #![feature(generic_const_exprs)] - | ^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #76560 for more information - = note: `#[warn(incomplete_features)]` on by default - -error: aborting due to 3 previous errors; 1 warning emitted +error: aborting due to 3 previous errors Some errors have detailed explanations: E0261, E0262. For more information about an error, try `rustc --explain E0261`. diff --git a/tests/ui/closures/binder/const-bound.rs b/tests/ui/closures/binder/const-bound.rs index 10d869fcc8512..e6984ed6d5592 100644 --- a/tests/ui/closures/binder/const-bound.rs +++ b/tests/ui/closures/binder/const-bound.rs @@ -1,5 +1,4 @@ #![feature(closure_lifetime_binder, non_lifetime_binders)] -//~^ WARN is incomplete and may not be safe to use fn main() { for || -> () {}; diff --git a/tests/ui/closures/binder/const-bound.stderr b/tests/ui/closures/binder/const-bound.stderr index b805879f7fab5..a57788072b0b4 100644 --- a/tests/ui/closures/binder/const-bound.stderr +++ b/tests/ui/closures/binder/const-bound.stderr @@ -1,23 +1,14 @@ error: late-bound const parameters cannot be used currently - --> $DIR/const-bound.rs:5:15 + --> $DIR/const-bound.rs:4:15 | LL | for || -> () {}; | ^ -warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/const-bound.rs:1:37 - | -LL | #![feature(closure_lifetime_binder, non_lifetime_binders)] - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #108185 for more information - = note: `#[warn(incomplete_features)]` on by default - error: late-bound const parameter not allowed on closures - --> $DIR/const-bound.rs:5:9 + --> $DIR/const-bound.rs:4:9 | LL | for || -> () {}; | ^^^^^^^^^^^^ -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors diff --git a/tests/ui/closures/binder/type-bound-2.rs b/tests/ui/closures/binder/type-bound-2.rs index f4edcdaa9ca9f..064fbf975d453 100644 --- a/tests/ui/closures/binder/type-bound-2.rs +++ b/tests/ui/closures/binder/type-bound-2.rs @@ -1,5 +1,4 @@ #![feature(closure_lifetime_binder, non_lifetime_binders)] -//~^ WARN is incomplete and may not be safe to use fn main() { for || -> () {}; diff --git a/tests/ui/closures/binder/type-bound-2.stderr b/tests/ui/closures/binder/type-bound-2.stderr index 6609b326f19a5..6fd7d576dd70e 100644 --- a/tests/ui/closures/binder/type-bound-2.stderr +++ b/tests/ui/closures/binder/type-bound-2.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/type-bound-2.rs:1:37 - | -LL | #![feature(closure_lifetime_binder, 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 closures - --> $DIR/type-bound-2.rs:5:9 + --> $DIR/type-bound-2.rs:4:9 | LL | for || -> () {}; | ^ -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error diff --git a/tests/ui/closures/binder/type-bound.rs b/tests/ui/closures/binder/type-bound.rs index 59a3353f4965e..9fc60b30167bb 100644 --- a/tests/ui/closures/binder/type-bound.rs +++ b/tests/ui/closures/binder/type-bound.rs @@ -1,5 +1,4 @@ #![feature(closure_lifetime_binder, non_lifetime_binders)] -//~^ WARN is incomplete and may not be safe to use fn main() { for || -> T {}; diff --git a/tests/ui/closures/binder/type-bound.stderr b/tests/ui/closures/binder/type-bound.stderr index 22431130a5d4a..11dc3288fe871 100644 --- a/tests/ui/closures/binder/type-bound.stderr +++ b/tests/ui/closures/binder/type-bound.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/type-bound.rs:1:37 - | -LL | #![feature(closure_lifetime_binder, 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 closures - --> $DIR/type-bound.rs:5:9 + --> $DIR/type-bound.rs:4:9 | LL | for || -> T {}; | ^ -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error diff --git a/tests/ui/codegen/freeze-on-polymorphic-projection.rs b/tests/ui/codegen/freeze-on-polymorphic-projection.rs index f382a3780fcf7..4744fa580b379 100644 --- a/tests/ui/codegen/freeze-on-polymorphic-projection.rs +++ b/tests/ui/codegen/freeze-on-polymorphic-projection.rs @@ -2,7 +2,6 @@ //@ compile-flags: -Copt-level=1 --crate-type=lib #![feature(specialization)] -//~^ WARN the feature `specialization` is incomplete pub unsafe trait Storage { type Handle; diff --git a/tests/ui/codegen/freeze-on-polymorphic-projection.stderr b/tests/ui/codegen/freeze-on-polymorphic-projection.stderr deleted file mode 100644 index 903cb2ff6aa98..0000000000000 --- a/tests/ui/codegen/freeze-on-polymorphic-projection.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/freeze-on-polymorphic-projection.rs:4: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/coherence/coherence-doesnt-use-infcx-evaluate.rs b/tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.rs index 7e53695f987e2..a3dc9b5628fc8 100644 --- a/tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.rs +++ b/tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.rs @@ -5,7 +5,6 @@ // since they are using a different infcx which doesn't preserve the intercrate flag. #![feature(specialization)] -//~^ WARN the feature `specialization` is incomplete trait Assoc { type Output; diff --git a/tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.stderr b/tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.stderr deleted file mode 100644 index 56eb21cd20f2f..0000000000000 --- a/tests/ui/coherence/coherence-doesnt-use-infcx-evaluate.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/coherence-doesnt-use-infcx-evaluate.rs:7: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/coherence/coherence-inherited-assoc-ty-cycle-err.rs b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.rs index d74d3a2a52351..7f0e5472c3c2e 100644 --- a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.rs +++ b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.rs @@ -4,7 +4,6 @@ // // No we expect to run into a more user-friendly cycle error instead. #![feature(specialization)] -//~^ WARN the feature `specialization` is incomplete trait Trait { type Assoc; } //~^ ERROR E0391 diff --git a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr index 9f813d6d5716a..3d4d19197baf4 100644 --- a/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr +++ b/tests/ui/coherence/coherence-inherited-assoc-ty-cycle-err.stderr @@ -1,27 +1,17 @@ -warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:6: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[E0391]: cycle detected when building specialization graph of trait `Trait` - --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:9:1 + --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:8:1 | LL | trait Trait { type Assoc; } | ^^^^^^^^^^^^^^ | = note: ...which immediately requires building specialization graph of trait `Trait` again note: cycle used when coherence checking all impls of trait `Trait` - --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:9:1 + --> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:8:1 | LL | trait Trait { type Assoc; } | ^^^^^^^^^^^^^^ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information -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 E0391`. diff --git a/tests/ui/coherence/negative-coherence/regions-in-canonical.rs b/tests/ui/coherence/negative-coherence/regions-in-canonical.rs index f0424e724344b..ff3999f83f6d0 100644 --- a/tests/ui/coherence/negative-coherence/regions-in-canonical.rs +++ b/tests/ui/coherence/negative-coherence/regions-in-canonical.rs @@ -1,7 +1,6 @@ //@ check-pass #![feature(adt_const_params, unsized_const_params)] -//~^ WARN the feature `unsized_const_params` is incomplete #![feature(with_negative_coherence, negative_impls)] pub trait A {} diff --git a/tests/ui/coherence/negative-coherence/regions-in-canonical.stderr b/tests/ui/coherence/negative-coherence/regions-in-canonical.stderr deleted file mode 100644 index 720449152945d..0000000000000 --- a/tests/ui/coherence/negative-coherence/regions-in-canonical.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/regions-in-canonical.rs:3:30 - | -LL | #![feature(adt_const_params, unsized_const_params)] - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #95174 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/consts/escaping-bound-var.rs b/tests/ui/consts/escaping-bound-var.rs index a538d607d6ca5..03162c74882d4 100644 --- a/tests/ui/consts/escaping-bound-var.rs +++ b/tests/ui/consts/escaping-bound-var.rs @@ -1,5 +1,4 @@ #![feature(generic_const_exprs)] -//~^ WARN the feature `generic_const_exprs` is incomplete fn test<'a>( _: &'a (), diff --git a/tests/ui/consts/escaping-bound-var.stderr b/tests/ui/consts/escaping-bound-var.stderr index bb0d285f4d06c..046c58bd23b34 100644 --- a/tests/ui/consts/escaping-bound-var.stderr +++ b/tests/ui/consts/escaping-bound-var.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/escaping-bound-var.rs:1: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/escaping-bound-var.rs:7:13 + --> $DIR/escaping-bound-var.rs:6:13 | LL | fn test<'a>( | -- lifetime defined here @@ -17,7 +8,7 @@ LL | let x: &'a (); | ^^ error[E0308]: mismatched types - --> $DIR/escaping-bound-var.rs:6:6 + --> $DIR/escaping-bound-var.rs:5:6 | LL | fn test<'a>( | ---- implicitly returns `()` as its body has no tail or `return` expression @@ -33,6 +24,6 @@ LL | | }] { 1 }]`, found `()` -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 E0308`. diff --git a/tests/ui/consts/issue-104396.rs b/tests/ui/consts/issue-104396.rs index f44abc359d670..dc0789eaf6558 100644 --- a/tests/ui/consts/issue-104396.rs +++ b/tests/ui/consts/issue-104396.rs @@ -2,7 +2,6 @@ //@ check-pass #![feature(generic_const_exprs)] -//~^ WARN the feature `generic_const_exprs` is incomplete #[inline(always)] fn from_fn_1 f32>(mut f: F) -> [f32; N] { diff --git a/tests/ui/consts/issue-104396.stderr b/tests/ui/consts/issue-104396.stderr deleted file mode 100644 index 5856bee09a3fc..0000000000000 --- a/tests/ui/consts/issue-104396.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/issue-104396.rs:4: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/consts/refs_check_const_eq-issue-88384.rs b/tests/ui/consts/refs_check_const_eq-issue-88384.rs index 46cb627517173..506bec349eba6 100644 --- a/tests/ui/consts/refs_check_const_eq-issue-88384.rs +++ b/tests/ui/consts/refs_check_const_eq-issue-88384.rs @@ -1,6 +1,5 @@ #![feature(fn_traits)] #![feature(adt_const_params, unsized_const_params)] -//~^ WARNING the feature `unsized_const_params` is incomplete #[derive(PartialEq, Eq)] struct CompileTimeSettings { diff --git a/tests/ui/consts/refs_check_const_eq-issue-88384.stderr b/tests/ui/consts/refs_check_const_eq-issue-88384.stderr index 62c5c52764115..ac4cb059ea194 100644 --- a/tests/ui/consts/refs_check_const_eq-issue-88384.stderr +++ b/tests/ui/consts/refs_check_const_eq-issue-88384.stderr @@ -1,14 +1,5 @@ -warning: the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/refs_check_const_eq-issue-88384.rs:2:30 - | -LL | #![feature(adt_const_params, unsized_const_params)] - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #95174 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0741]: `CompileTimeSettings` must implement `ConstParamTy` to be used as the type of a const generic parameter - --> $DIR/refs_check_const_eq-issue-88384.rs:10:21 + --> $DIR/refs_check_const_eq-issue-88384.rs:9:21 | LL | struct Foo; | ^^^^^^^^^^^^^^^^^^^ @@ -20,7 +11,7 @@ LL | struct CompileTimeSettings { | error[E0741]: `CompileTimeSettings` must implement `ConstParamTy` to be used as the type of a const generic parameter - --> $DIR/refs_check_const_eq-issue-88384.rs:13:15 + --> $DIR/refs_check_const_eq-issue-88384.rs:12:15 | LL | impl Foo { | ^^^^^^^^^^^^^^^^^^^ @@ -31,6 +22,6 @@ LL + #[derive(ConstParamTy)] LL | struct CompileTimeSettings { | -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 E0741`. diff --git a/tests/ui/consts/static-default-lifetime/generic-associated-const.rs b/tests/ui/consts/static-default-lifetime/generic-associated-const.rs index 721920bd810cb..8fabaa43f5a27 100644 --- a/tests/ui/consts/static-default-lifetime/generic-associated-const.rs +++ b/tests/ui/consts/static-default-lifetime/generic-associated-const.rs @@ -1,6 +1,5 @@ #![deny(elided_lifetimes_in_associated_constant)] #![feature(generic_const_items)] -//~^ WARN the feature `generic_const_items` is incomplete struct A; impl A { diff --git a/tests/ui/consts/static-default-lifetime/generic-associated-const.stderr b/tests/ui/consts/static-default-lifetime/generic-associated-const.stderr index 3680ef61e0c4c..fe858d685f7fa 100644 --- a/tests/ui/consts/static-default-lifetime/generic-associated-const.stderr +++ b/tests/ui/consts/static-default-lifetime/generic-associated-const.stderr @@ -1,5 +1,5 @@ error[E0106]: missing lifetime specifier - --> $DIR/generic-associated-const.rs:15:29 + --> $DIR/generic-associated-const.rs:14:29 | LL | const GAC_LIFETIME<'a>: &str = ""; | ^ expected named lifetime parameter @@ -9,23 +9,14 @@ help: consider using the `'a` lifetime LL | const GAC_LIFETIME<'a>: &'a str = ""; | ++ -warning: the feature `generic_const_items` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic-associated-const.rs:2:12 - | -LL | #![feature(generic_const_items)] - | ^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #113521 for more information - = note: `#[warn(incomplete_features)]` on by default - error: `&` without an explicit lifetime name cannot be used here - --> $DIR/generic-associated-const.rs:8:29 + --> $DIR/generic-associated-const.rs:7:29 | LL | const GAC_LIFETIME<'a>: &str = ""; | ^ | note: cannot automatically infer `'static` because of other lifetimes in scope - --> $DIR/generic-associated-const.rs:8:24 + --> $DIR/generic-associated-const.rs:7:24 | LL | const GAC_LIFETIME<'a>: &str = ""; | ^^ @@ -41,6 +32,6 @@ help: use the `'static` lifetime LL | const GAC_LIFETIME<'a>: &'static str = ""; | +++++++ -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 E0106`. diff --git a/tests/ui/consts/trait_specialization.rs b/tests/ui/consts/trait_specialization.rs index 1360fabd1fe11..1ea56b5a44531 100644 --- a/tests/ui/consts/trait_specialization.rs +++ b/tests/ui/consts/trait_specialization.rs @@ -4,7 +4,7 @@ // Tests that specialization does not cause optimizations running on polymorphic MIR to resolve // to a `default` implementation. -#![feature(specialization)] //~ WARN the feature `specialization` is incomplete +#![feature(specialization)] trait Marker {} diff --git a/tests/ui/consts/trait_specialization.stderr b/tests/ui/consts/trait_specialization.stderr deleted file mode 100644 index ce52cf17b89e6..0000000000000 --- a/tests/ui/consts/trait_specialization.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/trait_specialization.rs:7: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/contracts/incomplete-feature.rs b/tests/ui/contracts/incomplete-feature.rs index f1351e2f87e34..c10774b251ab4 100644 --- a/tests/ui/contracts/incomplete-feature.rs +++ b/tests/ui/contracts/incomplete-feature.rs @@ -4,6 +4,7 @@ // This test specifically checks that the [incomplete_features] warning is // emitted when the `contracts` feature gate is enabled, so that it can be // marked as `expect`ed in other tests in order to reduce duplication. +#![warn(incomplete_features)] #![feature(contracts)] //~^ WARN the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features] extern crate core; diff --git a/tests/ui/contracts/incomplete-feature.stderr b/tests/ui/contracts/incomplete-feature.stderr index 7683926df073a..137b13fb834f8 100644 --- a/tests/ui/contracts/incomplete-feature.stderr +++ b/tests/ui/contracts/incomplete-feature.stderr @@ -1,11 +1,15 @@ warning: the feature `contracts` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/incomplete-feature.rs:7:12 + --> $DIR/incomplete-feature.rs:8:12 | LL | #![feature(contracts)] | ^^^^^^^^^ | = note: see issue #128044 for more information - = note: `#[warn(incomplete_features)]` on by default +note: the lint level is defined here + --> $DIR/incomplete-feature.rs:7:9 + | +LL | #![warn(incomplete_features)] + | ^^^^^^^^^^^^^^^^^^^ warning: 1 warning emitted diff --git a/tests/ui/error-codes/E0520.rs b/tests/ui/error-codes/E0520.rs index ead78b7ffa2c4..b746ca63590ec 100644 --- a/tests/ui/error-codes/E0520.rs +++ b/tests/ui/error-codes/E0520.rs @@ -1,5 +1,4 @@ #![feature(specialization)] -//~^ WARN the feature `specialization` is incomplete trait SpaceLlama { fn fly(&self); diff --git a/tests/ui/error-codes/E0520.stderr b/tests/ui/error-codes/E0520.stderr index 83319203023ff..c47b3e77c77a5 100644 --- a/tests/ui/error-codes/E0520.stderr +++ b/tests/ui/error-codes/E0520.stderr @@ -1,15 +1,5 @@ -warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/E0520.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[E0520]: `fly` specializes an item from a parent `impl`, but that item is not marked `default` - --> $DIR/E0520.rs:17:5 + --> $DIR/E0520.rs:16:5 | LL | impl SpaceLlama for T { | ------------------------------- parent `impl` is here @@ -19,6 +9,6 @@ LL | default fn fly(&self) {} | = note: to specialize, `fly` in the parent `impl` must be marked `default` -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 E0520`. diff --git a/tests/ui/error-codes/E0771.rs b/tests/ui/error-codes/E0771.rs index a932c5ef9815d..6d86d4a54e780 100644 --- a/tests/ui/error-codes/E0771.rs +++ b/tests/ui/error-codes/E0771.rs @@ -1,5 +1,4 @@ #![feature(adt_const_params, unsized_const_params)] -//~^ WARN the feature `unsized_const_params` is incomplete fn function_with_str<'a, const STRING: &'a str>() {} //~ ERROR E0770 diff --git a/tests/ui/error-codes/E0771.stderr b/tests/ui/error-codes/E0771.stderr index dfeaa347941cb..93782079d06fd 100644 --- a/tests/ui/error-codes/E0771.stderr +++ b/tests/ui/error-codes/E0771.stderr @@ -1,18 +1,9 @@ error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/E0771.rs:4:41 + --> $DIR/E0771.rs:3:41 | LL | fn function_with_str<'a, const STRING: &'a str>() {} | ^^ the type must not depend on the parameter `'a` -warning: the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/E0771.rs:1:30 - | -LL | #![feature(adt_const_params, unsized_const_params)] - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #95174 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 For more information about this error, try `rustc --explain E0770`. diff --git a/tests/ui/feature-gates/feature-gate-effective-target-features.default.stderr b/tests/ui/feature-gates/feature-gate-effective-target-features.default.stderr index 34a56fe342e21..e699c5d77b42c 100644 --- a/tests/ui/feature-gates/feature-gate-effective-target-features.default.stderr +++ b/tests/ui/feature-gates/feature-gate-effective-target-features.default.stderr @@ -1,5 +1,5 @@ error[E0658]: the `#[force_target_feature]` attribute is an experimental feature - --> $DIR/feature-gate-effective-target-features.rs:13:5 + --> $DIR/feature-gate-effective-target-features.rs:14:5 | LL | #[unsafe(force_target_feature(enable = "avx2"))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -9,7 +9,7 @@ LL | #[unsafe(force_target_feature(enable = "avx2"))] = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: `#[target_feature(..)]` cannot be applied to safe trait method - --> $DIR/feature-gate-effective-target-features.rs:21:5 + --> $DIR/feature-gate-effective-target-features.rs:22:5 | LL | #[target_feature(enable = "avx2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot be applied to safe trait method @@ -18,13 +18,13 @@ LL | fn foo(&self) {} | ------------- not an `unsafe` function error[E0053]: method `foo` has an incompatible type for trait - --> $DIR/feature-gate-effective-target-features.rs:23:5 + --> $DIR/feature-gate-effective-target-features.rs:24:5 | LL | fn foo(&self) {} | ^^^^^^^^^^^^^ expected safe fn, found unsafe fn | note: type in trait - --> $DIR/feature-gate-effective-target-features.rs:7:5 + --> $DIR/feature-gate-effective-target-features.rs:8:5 | LL | fn foo(&self); | ^^^^^^^^^^^^^^ diff --git a/tests/ui/feature-gates/feature-gate-effective-target-features.feature.stderr b/tests/ui/feature-gates/feature-gate-effective-target-features.feature.stderr index d51956fa4d2b5..bf9f5d73e0573 100644 --- a/tests/ui/feature-gates/feature-gate-effective-target-features.feature.stderr +++ b/tests/ui/feature-gates/feature-gate-effective-target-features.feature.stderr @@ -1,14 +1,18 @@ warning: the feature `effective_target_features` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/feature-gate-effective-target-features.rs:3:30 + --> $DIR/feature-gate-effective-target-features.rs:4:30 | LL | #![cfg_attr(feature, feature(effective_target_features))] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #143352 for more information - = note: `#[warn(incomplete_features)]` on by default +note: the lint level is defined here + --> $DIR/feature-gate-effective-target-features.rs:3:9 + | +LL | #![warn(incomplete_features)] + | ^^^^^^^^^^^^^^^^^^^ error: `#[target_feature(..)]` cannot be applied to safe trait method - --> $DIR/feature-gate-effective-target-features.rs:21:5 + --> $DIR/feature-gate-effective-target-features.rs:22:5 | LL | #[target_feature(enable = "avx2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot be applied to safe trait method @@ -17,13 +21,13 @@ LL | fn foo(&self) {} | ------------- not an `unsafe` function error[E0053]: method `foo` has an incompatible type for trait - --> $DIR/feature-gate-effective-target-features.rs:23:5 + --> $DIR/feature-gate-effective-target-features.rs:24:5 | LL | fn foo(&self) {} | ^^^^^^^^^^^^^ expected safe fn, found unsafe fn | note: type in trait - --> $DIR/feature-gate-effective-target-features.rs:7:5 + --> $DIR/feature-gate-effective-target-features.rs:8:5 | LL | fn foo(&self); | ^^^^^^^^^^^^^^ diff --git a/tests/ui/feature-gates/feature-gate-effective-target-features.rs b/tests/ui/feature-gates/feature-gate-effective-target-features.rs index d383897e4382b..a8be61167aa2f 100644 --- a/tests/ui/feature-gates/feature-gate-effective-target-features.rs +++ b/tests/ui/feature-gates/feature-gate-effective-target-features.rs @@ -1,5 +1,6 @@ //@ revisions: default feature //@ only-x86_64 +#![warn(incomplete_features)] #![cfg_attr(feature, feature(effective_target_features))] //[feature]~^ WARN the feature `effective_target_features` is incomplete and may not be safe to use and/or cause compiler crashes diff --git a/tests/ui/feature-gates/feature-gate-unsafe_fields.rs b/tests/ui/feature-gates/feature-gate-unsafe_fields.rs index 2b0bbaa083570..27e8b5126f805 100644 --- a/tests/ui/feature-gates/feature-gate-unsafe_fields.rs +++ b/tests/ui/feature-gates/feature-gate-unsafe_fields.rs @@ -1,7 +1,7 @@ //@ compile-flags: --crate-type=lib //@ revisions: with_gate without_gate //@ [with_gate] check-pass - +#![warn(incomplete_features)] #![cfg_attr(with_gate, feature(unsafe_fields))] //[with_gate]~ WARNING #[cfg(false)] diff --git a/tests/ui/feature-gates/feature-gate-unsafe_fields.with_gate.stderr b/tests/ui/feature-gates/feature-gate-unsafe_fields.with_gate.stderr index a7deeb057d86a..4220930d46685 100644 --- a/tests/ui/feature-gates/feature-gate-unsafe_fields.with_gate.stderr +++ b/tests/ui/feature-gates/feature-gate-unsafe_fields.with_gate.stderr @@ -5,7 +5,11 @@ LL | #![cfg_attr(with_gate, feature(unsafe_fields))] | ^^^^^^^^^^^^^ | = note: see issue #132922 for more information - = note: `#[warn(incomplete_features)]` on by default +note: the lint level is defined here + --> $DIR/feature-gate-unsafe_fields.rs:4:9 + | +LL | #![warn(incomplete_features)] + | ^^^^^^^^^^^^^^^^^^^ warning: 1 warning emitted diff --git a/tests/ui/generic-associated-types/issue-87429-specialization.rs b/tests/ui/generic-associated-types/issue-87429-specialization.rs index 87e91162a8630..4a1e6aa6b332d 100644 --- a/tests/ui/generic-associated-types/issue-87429-specialization.rs +++ b/tests/ui/generic-associated-types/issue-87429-specialization.rs @@ -1,7 +1,6 @@ //@ check-fail #![feature(specialization)] -//~^ WARN incomplete trait Family { type Member<'a>: for<'b> PartialEq>; diff --git a/tests/ui/generic-associated-types/issue-87429-specialization.stderr b/tests/ui/generic-associated-types/issue-87429-specialization.stderr index 44f871e71c57d..dbe97bdb74318 100644 --- a/tests/ui/generic-associated-types/issue-87429-specialization.stderr +++ b/tests/ui/generic-associated-types/issue-87429-specialization.stderr @@ -1,22 +1,12 @@ -warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-87429-specialization.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[E0277]: can't compare `Foo` with `Foo` - --> $DIR/issue-87429-specialization.rs:20:31 + --> $DIR/issue-87429-specialization.rs:19:31 | LL | default type Member<'a> = Foo; | ^^^ no implementation for `Foo == Foo` | = help: the trait `PartialEq` is not implemented for `Foo` note: required by a bound in `Family::Member` - --> $DIR/issue-87429-specialization.rs:7:22 + --> $DIR/issue-87429-specialization.rs:6:22 | LL | type Member<'a>: for<'b> PartialEq>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Family::Member` @@ -26,6 +16,6 @@ LL + #[derive(PartialEq)] LL | struct 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/impl-restriction/recover-incorrect-impl-restriction.rs b/tests/ui/impl-restriction/recover-incorrect-impl-restriction.rs index d6490d5b4f978..dc47eba2b3c63 100644 --- a/tests/ui/impl-restriction/recover-incorrect-impl-restriction.rs +++ b/tests/ui/impl-restriction/recover-incorrect-impl-restriction.rs @@ -1,5 +1,6 @@ //@ compile-flags: --crate-type=lib //@ revisions: with_gate without_gate +#![warn(incomplete_features)] #![cfg_attr(with_gate, feature(impl_restriction))] //[with_gate]~^ WARN the feature `impl_restriction` is incomplete and may not be safe to use and/or cause compiler crashes #![feature(auto_traits, const_trait_impl)] diff --git a/tests/ui/impl-restriction/recover-incorrect-impl-restriction.with_gate.stderr b/tests/ui/impl-restriction/recover-incorrect-impl-restriction.with_gate.stderr index ad183b23e0138..834cc99f07553 100644 --- a/tests/ui/impl-restriction/recover-incorrect-impl-restriction.with_gate.stderr +++ b/tests/ui/impl-restriction/recover-incorrect-impl-restriction.with_gate.stderr @@ -1,5 +1,5 @@ error: incorrect `impl` restriction - --> $DIR/recover-incorrect-impl-restriction.rs:8:14 + --> $DIR/recover-incorrect-impl-restriction.rs:9:14 | LL | pub impl(crate::foo) trait Baz {} | ^^^^^^^^^^ @@ -15,7 +15,7 @@ LL | pub impl(in crate::foo) trait Baz {} | ++ error: incorrect `impl` restriction - --> $DIR/recover-incorrect-impl-restriction.rs:10:21 + --> $DIR/recover-incorrect-impl-restriction.rs:11:21 | LL | pub unsafe impl(crate::foo) trait BazUnsafe {} | ^^^^^^^^^^ @@ -31,7 +31,7 @@ LL | pub unsafe impl(in crate::foo) trait BazUnsafe {} | ++ error: incorrect `impl` restriction - --> $DIR/recover-incorrect-impl-restriction.rs:12:19 + --> $DIR/recover-incorrect-impl-restriction.rs:13:19 | LL | pub auto impl(crate::foo) trait BazAuto {} | ^^^^^^^^^^ @@ -47,7 +47,7 @@ LL | pub auto impl(in crate::foo) trait BazAuto {} | ++ error: incorrect `impl` restriction - --> $DIR/recover-incorrect-impl-restriction.rs:14:20 + --> $DIR/recover-incorrect-impl-restriction.rs:15:20 | LL | pub const impl(crate::foo) trait BazConst {} | ^^^^^^^^^^ @@ -63,7 +63,7 @@ LL | pub const impl(in crate::foo) trait BazConst {} | ++ error: incorrect `impl` restriction - --> $DIR/recover-incorrect-impl-restriction.rs:16:27 + --> $DIR/recover-incorrect-impl-restriction.rs:17:27 | LL | pub const unsafe impl(crate::foo) trait BazConstUnsafe {} | ^^^^^^^^^^ @@ -79,7 +79,7 @@ LL | pub const unsafe impl(in crate::foo) trait BazConstUnsafe {} | ++ error: incorrect `impl` restriction - --> $DIR/recover-incorrect-impl-restriction.rs:18:26 + --> $DIR/recover-incorrect-impl-restriction.rs:19:26 | LL | pub unsafe auto impl(crate::foo) trait BazUnsafeAuto {} | ^^^^^^^^^^ @@ -95,13 +95,17 @@ LL | pub unsafe auto impl(in crate::foo) trait BazUnsafeAuto {} | ++ warning: the feature `impl_restriction` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/recover-incorrect-impl-restriction.rs:3:32 + --> $DIR/recover-incorrect-impl-restriction.rs:4:32 | LL | #![cfg_attr(with_gate, feature(impl_restriction))] | ^^^^^^^^^^^^^^^^ | = note: see issue #105077 for more information - = note: `#[warn(incomplete_features)]` on by default +note: the lint level is defined here + --> $DIR/recover-incorrect-impl-restriction.rs:3:9 + | +LL | #![warn(incomplete_features)] + | ^^^^^^^^^^^^^^^^^^^ error: aborting due to 6 previous errors; 1 warning emitted diff --git a/tests/ui/impl-restriction/recover-incorrect-impl-restriction.without_gate.stderr b/tests/ui/impl-restriction/recover-incorrect-impl-restriction.without_gate.stderr index d949172ffb458..223a7cd47cfb4 100644 --- a/tests/ui/impl-restriction/recover-incorrect-impl-restriction.without_gate.stderr +++ b/tests/ui/impl-restriction/recover-incorrect-impl-restriction.without_gate.stderr @@ -1,5 +1,5 @@ error: incorrect `impl` restriction - --> $DIR/recover-incorrect-impl-restriction.rs:8:14 + --> $DIR/recover-incorrect-impl-restriction.rs:9:14 | LL | pub impl(crate::foo) trait Baz {} | ^^^^^^^^^^ @@ -15,7 +15,7 @@ LL | pub impl(in crate::foo) trait Baz {} | ++ error: incorrect `impl` restriction - --> $DIR/recover-incorrect-impl-restriction.rs:10:21 + --> $DIR/recover-incorrect-impl-restriction.rs:11:21 | LL | pub unsafe impl(crate::foo) trait BazUnsafe {} | ^^^^^^^^^^ @@ -31,7 +31,7 @@ LL | pub unsafe impl(in crate::foo) trait BazUnsafe {} | ++ error: incorrect `impl` restriction - --> $DIR/recover-incorrect-impl-restriction.rs:12:19 + --> $DIR/recover-incorrect-impl-restriction.rs:13:19 | LL | pub auto impl(crate::foo) trait BazAuto {} | ^^^^^^^^^^ @@ -47,7 +47,7 @@ LL | pub auto impl(in crate::foo) trait BazAuto {} | ++ error: incorrect `impl` restriction - --> $DIR/recover-incorrect-impl-restriction.rs:14:20 + --> $DIR/recover-incorrect-impl-restriction.rs:15:20 | LL | pub const impl(crate::foo) trait BazConst {} | ^^^^^^^^^^ @@ -63,7 +63,7 @@ LL | pub const impl(in crate::foo) trait BazConst {} | ++ error: incorrect `impl` restriction - --> $DIR/recover-incorrect-impl-restriction.rs:16:27 + --> $DIR/recover-incorrect-impl-restriction.rs:17:27 | LL | pub const unsafe impl(crate::foo) trait BazConstUnsafe {} | ^^^^^^^^^^ @@ -79,7 +79,7 @@ LL | pub const unsafe impl(in crate::foo) trait BazConstUnsafe {} | ++ error: incorrect `impl` restriction - --> $DIR/recover-incorrect-impl-restriction.rs:18:26 + --> $DIR/recover-incorrect-impl-restriction.rs:19:26 | LL | pub unsafe auto impl(crate::foo) trait BazUnsafeAuto {} | ^^^^^^^^^^ @@ -95,7 +95,7 @@ LL | pub unsafe auto impl(in crate::foo) trait BazUnsafeAuto {} | ++ error[E0658]: `impl` restrictions are experimental - --> $DIR/recover-incorrect-impl-restriction.rs:8:9 + --> $DIR/recover-incorrect-impl-restriction.rs:9:9 | LL | pub impl(crate::foo) trait Baz {} | ^^^^^^^^^^^^^^^^ @@ -105,7 +105,7 @@ LL | pub impl(crate::foo) trait Baz {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `impl` restrictions are experimental - --> $DIR/recover-incorrect-impl-restriction.rs:10:16 + --> $DIR/recover-incorrect-impl-restriction.rs:11:16 | LL | pub unsafe impl(crate::foo) trait BazUnsafe {} | ^^^^^^^^^^^^^^^^ @@ -115,7 +115,7 @@ LL | pub unsafe impl(crate::foo) trait BazUnsafe {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `impl` restrictions are experimental - --> $DIR/recover-incorrect-impl-restriction.rs:12:14 + --> $DIR/recover-incorrect-impl-restriction.rs:13:14 | LL | pub auto impl(crate::foo) trait BazAuto {} | ^^^^^^^^^^^^^^^^ @@ -125,7 +125,7 @@ LL | pub auto impl(crate::foo) trait BazAuto {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `impl` restrictions are experimental - --> $DIR/recover-incorrect-impl-restriction.rs:14:15 + --> $DIR/recover-incorrect-impl-restriction.rs:15:15 | LL | pub const impl(crate::foo) trait BazConst {} | ^^^^^^^^^^^^^^^^ @@ -135,7 +135,7 @@ LL | pub const impl(crate::foo) trait BazConst {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `impl` restrictions are experimental - --> $DIR/recover-incorrect-impl-restriction.rs:16:22 + --> $DIR/recover-incorrect-impl-restriction.rs:17:22 | LL | pub const unsafe impl(crate::foo) trait BazConstUnsafe {} | ^^^^^^^^^^^^^^^^ @@ -145,7 +145,7 @@ LL | pub const unsafe impl(crate::foo) trait BazConstUnsafe {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `impl` restrictions are experimental - --> $DIR/recover-incorrect-impl-restriction.rs:18:21 + --> $DIR/recover-incorrect-impl-restriction.rs:19:21 | LL | pub unsafe auto impl(crate::foo) trait BazUnsafeAuto {} | ^^^^^^^^^^^^^^^^ diff --git a/tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.rs b/tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.rs index 62622e1d55861..ce36a49b145b0 100644 --- a/tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.rs +++ b/tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.rs @@ -1,5 +1,6 @@ //@ compile-flags: --crate-type=lib //@ revisions: with_gate without_gate +#![warn(incomplete_features)] #![cfg_attr(with_gate, feature(impl_restriction))] //[with_gate]~^ WARN the feature `impl_restriction` is incomplete and may not be safe to use and/or cause compiler crashes #![feature(auto_traits, const_trait_impl, trait_alias)] diff --git a/tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.with_gate.stderr b/tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.with_gate.stderr index 70287aca42aad..7be030052df50 100644 --- a/tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.with_gate.stderr +++ b/tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.with_gate.stderr @@ -1,83 +1,87 @@ error: trait aliases cannot be `impl`-restricted - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:7:1 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:8:1 | LL | impl(crate) trait Alias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `impl`-restricted error: trait aliases cannot be `auto` - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:9:1 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:10:1 | LL | auto impl(in crate) trait AutoAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `auto` error: trait aliases cannot be `impl`-restricted - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:9:1 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:10:1 | LL | auto impl(in crate) trait AutoAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `impl`-restricted error: trait aliases cannot be `unsafe` - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:12:1 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:13:1 | LL | unsafe impl(self) trait UnsafeAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `unsafe` error: trait aliases cannot be `impl`-restricted - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:12:1 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:13:1 | LL | unsafe impl(self) trait UnsafeAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `impl`-restricted error: trait aliases cannot be `impl`-restricted - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:15:1 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:16:1 | LL | const impl(in self) trait ConstAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `impl`-restricted error: trait aliases cannot be `impl`-restricted - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:19:5 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:20:5 | LL | impl(super) trait InnerAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `impl`-restricted error: trait aliases cannot be `unsafe` - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:21:5 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:22:5 | LL | const unsafe impl(in crate::foo) trait InnerConstUnsafeAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `unsafe` error: trait aliases cannot be `impl`-restricted - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:21:5 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:22:5 | LL | const unsafe impl(in crate::foo) trait InnerConstUnsafeAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `impl`-restricted error: trait aliases cannot be `auto` - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:24:5 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:25:5 | LL | unsafe auto impl(in crate::foo) trait InnerUnsafeAutoAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `auto` error: trait aliases cannot be `unsafe` - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:24:5 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:25:5 | LL | unsafe auto impl(in crate::foo) trait InnerUnsafeAutoAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `unsafe` error: trait aliases cannot be `impl`-restricted - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:24:5 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:25:5 | LL | unsafe auto impl(in crate::foo) trait InnerUnsafeAutoAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `impl`-restricted warning: the feature `impl_restriction` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:3:32 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:4:32 | LL | #![cfg_attr(with_gate, feature(impl_restriction))] | ^^^^^^^^^^^^^^^^ | = note: see issue #105077 for more information - = note: `#[warn(incomplete_features)]` on by default +note: the lint level is defined here + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:3:9 + | +LL | #![warn(incomplete_features)] + | ^^^^^^^^^^^^^^^^^^^ error: aborting due to 12 previous errors; 1 warning emitted diff --git a/tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.without_gate.stderr b/tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.without_gate.stderr index 7bff90396708d..c99bfce5da2c5 100644 --- a/tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.without_gate.stderr +++ b/tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.without_gate.stderr @@ -1,77 +1,77 @@ error: trait aliases cannot be `impl`-restricted - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:7:1 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:8:1 | LL | impl(crate) trait Alias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `impl`-restricted error: trait aliases cannot be `auto` - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:9:1 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:10:1 | LL | auto impl(in crate) trait AutoAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `auto` error: trait aliases cannot be `impl`-restricted - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:9:1 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:10:1 | LL | auto impl(in crate) trait AutoAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `impl`-restricted error: trait aliases cannot be `unsafe` - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:12:1 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:13:1 | LL | unsafe impl(self) trait UnsafeAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `unsafe` error: trait aliases cannot be `impl`-restricted - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:12:1 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:13:1 | LL | unsafe impl(self) trait UnsafeAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `impl`-restricted error: trait aliases cannot be `impl`-restricted - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:15:1 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:16:1 | LL | const impl(in self) trait ConstAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `impl`-restricted error: trait aliases cannot be `impl`-restricted - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:19:5 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:20:5 | LL | impl(super) trait InnerAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `impl`-restricted error: trait aliases cannot be `unsafe` - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:21:5 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:22:5 | LL | const unsafe impl(in crate::foo) trait InnerConstUnsafeAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `unsafe` error: trait aliases cannot be `impl`-restricted - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:21:5 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:22:5 | LL | const unsafe impl(in crate::foo) trait InnerConstUnsafeAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `impl`-restricted error: trait aliases cannot be `auto` - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:24:5 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:25:5 | LL | unsafe auto impl(in crate::foo) trait InnerUnsafeAutoAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `auto` error: trait aliases cannot be `unsafe` - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:24:5 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:25:5 | LL | unsafe auto impl(in crate::foo) trait InnerUnsafeAutoAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `unsafe` error: trait aliases cannot be `impl`-restricted - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:24:5 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:25:5 | LL | unsafe auto impl(in crate::foo) trait InnerUnsafeAutoAlias = Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait aliases cannot be `impl`-restricted error[E0658]: `impl` restrictions are experimental - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:7:1 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:8:1 | LL | impl(crate) trait Alias = Copy; | ^^^^^^^^^^^ @@ -81,7 +81,7 @@ LL | impl(crate) trait Alias = Copy; = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `impl` restrictions are experimental - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:9:6 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:10:6 | LL | auto impl(in crate) trait AutoAlias = Copy; | ^^^^^^^^^^^^^^ @@ -91,7 +91,7 @@ LL | auto impl(in crate) trait AutoAlias = Copy; = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `impl` restrictions are experimental - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:12:8 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:13:8 | LL | unsafe impl(self) trait UnsafeAlias = Copy; | ^^^^^^^^^^ @@ -101,7 +101,7 @@ LL | unsafe impl(self) trait UnsafeAlias = Copy; = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `impl` restrictions are experimental - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:15:7 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:16:7 | LL | const impl(in self) trait ConstAlias = Copy; | ^^^^^^^^^^^^^ @@ -111,7 +111,7 @@ LL | const impl(in self) trait ConstAlias = Copy; = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `impl` restrictions are experimental - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:19:5 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:20:5 | LL | impl(super) trait InnerAlias = Copy; | ^^^^^^^^^^^ @@ -121,7 +121,7 @@ LL | impl(super) trait InnerAlias = Copy; = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `impl` restrictions are experimental - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:21:18 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:22:18 | LL | const unsafe impl(in crate::foo) trait InnerConstUnsafeAlias = Copy; | ^^^^^^^^^^^^^^^^^^^ @@ -131,7 +131,7 @@ LL | const unsafe impl(in crate::foo) trait InnerConstUnsafeAlias = Copy; = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `impl` restrictions are experimental - --> $DIR/trait-alias-cannot-be-impl-restricted.rs:24:17 + --> $DIR/trait-alias-cannot-be-impl-restricted.rs:25:17 | LL | unsafe auto impl(in crate::foo) trait InnerUnsafeAutoAlias = Copy; | ^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/impl-trait/equality-rpass.rs b/tests/ui/impl-trait/equality-rpass.rs index da750f4ef1ba3..d5cac80a08d7b 100644 --- a/tests/ui/impl-trait/equality-rpass.rs +++ b/tests/ui/impl-trait/equality-rpass.rs @@ -1,6 +1,6 @@ //@ run-pass -#![feature(specialization)] //~ WARN the feature `specialization` is incomplete +#![feature(specialization)] trait Foo: std::fmt::Debug + Eq {} diff --git a/tests/ui/impl-trait/equality-rpass.stderr b/tests/ui/impl-trait/equality-rpass.stderr deleted file mode 100644 index bde8362fdf81e..0000000000000 --- a/tests/ui/impl-trait/equality-rpass.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/equality-rpass.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 - -warning: 1 warning emitted - diff --git a/tests/ui/impl-trait/equality.rs b/tests/ui/impl-trait/equality.rs index 07fc4a5d41ace..4a315639bde9a 100644 --- a/tests/ui/impl-trait/equality.rs +++ b/tests/ui/impl-trait/equality.rs @@ -1,6 +1,6 @@ //@ dont-require-annotations: NOTE -#![feature(specialization)] //~ WARN the feature `specialization` is incomplete +#![feature(specialization)] trait Foo: Copy + ToString {} diff --git a/tests/ui/impl-trait/equality.stderr b/tests/ui/impl-trait/equality.stderr index 7f965b9609a9d..3c765da66bdcf 100644 --- a/tests/ui/impl-trait/equality.stderr +++ b/tests/ui/impl-trait/equality.stderr @@ -1,13 +1,3 @@ -warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/equality.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[E0308]: mismatched types --> $DIR/equality.rs:17:5 | @@ -48,7 +38,7 @@ help: the following other types implement trait `Add` = note: `&u32` implements `Add` = note: this error originates in the macro `add_impl` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/impl-trait/equality2.rs b/tests/ui/impl-trait/equality2.rs index 808c600ecb7b7..44d356e0e262e 100644 --- a/tests/ui/impl-trait/equality2.rs +++ b/tests/ui/impl-trait/equality2.rs @@ -1,6 +1,6 @@ //@ dont-require-annotations: NOTE -#![feature(specialization)] //~ WARN the feature `specialization` is incomplete +#![feature(specialization)] trait Foo: Copy + ToString {} diff --git a/tests/ui/impl-trait/equality2.stderr b/tests/ui/impl-trait/equality2.stderr index 2fa7eb288ff87..ce0ccea20afb7 100644 --- a/tests/ui/impl-trait/equality2.stderr +++ b/tests/ui/impl-trait/equality2.stderr @@ -1,13 +1,3 @@ -warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/equality2.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[E0308]: mismatched types --> $DIR/equality2.rs:27:18 | @@ -72,6 +62,6 @@ LL | x.0); found opaque type `impl Foo` (`u32`) = note: distinct uses of `impl Trait` result in different opaque types -error: aborting due to 4 previous errors; 1 warning emitted +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs b/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs index 351cdad4ee115..ba6dfd4dfa8f6 100644 --- a/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs +++ b/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.rs @@ -1,7 +1,6 @@ //@ compile-flags: -Znext-solver #![feature(lazy_type_alias)] -//~^ WARN the feature `lazy_type_alias` is incomplete trait Foo {} diff --git a/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.stderr b/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.stderr index a95670ced8678..03c5d7a567690 100644 --- a/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.stderr +++ b/tests/ui/impl-trait/in-trait/alias-bounds-when-not-wf.stderr @@ -1,53 +1,44 @@ -warning: the feature `lazy_type_alias` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/alias-bounds-when-not-wf.rs:3: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 `usize: Foo` is not satisfied - --> $DIR/alias-bounds-when-not-wf.rs:16:15 + --> $DIR/alias-bounds-when-not-wf.rs:15:15 | LL | fn hello(_: W>) {} | ^^^^^^^^ the trait `Foo` is not implemented for `usize` | help: this trait has no implementations, consider adding one - --> $DIR/alias-bounds-when-not-wf.rs:6:1 + --> $DIR/alias-bounds-when-not-wf.rs:5:1 | LL | trait Foo {} | ^^^^^^^^^ note: required by a bound in `A` - --> $DIR/alias-bounds-when-not-wf.rs:8:11 + --> $DIR/alias-bounds-when-not-wf.rs:7:11 | LL | type A = T; | ^^^ required by this bound in `A` error[E0277]: the trait bound `usize: Foo` is not satisfied - --> $DIR/alias-bounds-when-not-wf.rs:16:10 + --> $DIR/alias-bounds-when-not-wf.rs:15:10 | LL | fn hello(_: W>) {} | ^ the trait `Foo` is not implemented for `usize` | help: this trait has no implementations, consider adding one - --> $DIR/alias-bounds-when-not-wf.rs:6:1 + --> $DIR/alias-bounds-when-not-wf.rs:5:1 | LL | trait Foo {} | ^^^^^^^^^ error[E0277]: the trait bound `usize: Foo` is not satisfied - --> $DIR/alias-bounds-when-not-wf.rs:16:1 + --> $DIR/alias-bounds-when-not-wf.rs:15:1 | LL | fn hello(_: W>) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `usize` | help: this trait has no implementations, consider adding one - --> $DIR/alias-bounds-when-not-wf.rs:6:1 + --> $DIR/alias-bounds-when-not-wf.rs:5:1 | LL | trait Foo {} | ^^^^^^^^^ -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/layout/gce-rigid-const-in-array-len.rs b/tests/ui/layout/gce-rigid-const-in-array-len.rs index 8e57907a2c5ec..d8cc415ba1c24 100644 --- a/tests/ui/layout/gce-rigid-const-in-array-len.rs +++ b/tests/ui/layout/gce-rigid-const-in-array-len.rs @@ -12,7 +12,7 @@ //! constant. #![feature(rustc_attrs)] -#![feature(generic_const_exprs)] //~ WARNING: the feature `generic_const_exprs` is incomplete +#![feature(generic_const_exprs)] #![feature(trivial_bounds)] #![crate_type = "lib"] diff --git a/tests/ui/layout/gce-rigid-const-in-array-len.stderr b/tests/ui/layout/gce-rigid-const-in-array-len.stderr index 6149debdfe88d..9038563159789 100644 --- a/tests/ui/layout/gce-rigid-const-in-array-len.stderr +++ b/tests/ui/layout/gce-rigid-const-in-array-len.stderr @@ -1,17 +1,8 @@ -warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/gce-rigid-const-in-array-len.rs:15:12 - | -LL | #![feature(generic_const_exprs)] - | ^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #76560 for more information - = note: `#[warn(incomplete_features)]` on by default - error: the type `[u8; ::B]` has an unknown layout --> $DIR/gce-rigid-const-in-array-len.rs:25:1 | LL | struct S([u8; ::B]) | ^^^^^^^^ -error: aborting due to 1 previous error; 1 warning emitted +error: aborting due to 1 previous error diff --git a/tests/ui/lazy-type-alias/bad-lazy-type-alias.rs b/tests/ui/lazy-type-alias/bad-lazy-type-alias.rs index 6ded9118700c0..e9e7de84a7a46 100644 --- a/tests/ui/lazy-type-alias/bad-lazy-type-alias.rs +++ b/tests/ui/lazy-type-alias/bad-lazy-type-alias.rs @@ -1,7 +1,6 @@ // regression test for #127351 #![feature(lazy_type_alias)] -//~^ WARN the feature `lazy_type_alias` is incomplete type ExplicitTypeOutlives = T; diff --git a/tests/ui/lazy-type-alias/bad-lazy-type-alias.stderr b/tests/ui/lazy-type-alias/bad-lazy-type-alias.stderr index 3a5ded60241b1..7aa34a22f736e 100644 --- a/tests/ui/lazy-type-alias/bad-lazy-type-alias.stderr +++ b/tests/ui/lazy-type-alias/bad-lazy-type-alias.stderr @@ -1,20 +1,11 @@ -warning: the feature `lazy_type_alias` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/bad-lazy-type-alias.rs:3:12 - | -LL | #![feature(lazy_type_alias)] - | ^^^^^^^^^^^^^^^ - | - = note: see issue #112792 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0107]: missing generics for type alias `ExplicitTypeOutlives` - --> $DIR/bad-lazy-type-alias.rs:9:24 + --> $DIR/bad-lazy-type-alias.rs:8:24 | LL | _significant_drop: ExplicitTypeOutlives, | ^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument | note: type alias defined here, with 1 generic parameter: `T` - --> $DIR/bad-lazy-type-alias.rs:6:6 + --> $DIR/bad-lazy-type-alias.rs:5:6 | LL | type ExplicitTypeOutlives = T; | ^^^^^^^^^^^^^^^^^^^^ - @@ -23,6 +14,6 @@ help: add missing generic argument LL | _significant_drop: ExplicitTypeOutlives, | +++ -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 E0107`. diff --git a/tests/ui/lazy-type-alias/coerce-behind-lazy.current.stderr b/tests/ui/lazy-type-alias/coerce-behind-lazy.current.stderr deleted file mode 100644 index 78dd05b78af1d..0000000000000 --- a/tests/ui/lazy-type-alias/coerce-behind-lazy.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/coerce-behind-lazy.rs:6: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/lazy-type-alias/coerce-behind-lazy.next.stderr b/tests/ui/lazy-type-alias/coerce-behind-lazy.next.stderr deleted file mode 100644 index 78dd05b78af1d..0000000000000 --- a/tests/ui/lazy-type-alias/coerce-behind-lazy.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/coerce-behind-lazy.rs:6: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/lazy-type-alias/coerce-behind-lazy.rs b/tests/ui/lazy-type-alias/coerce-behind-lazy.rs index 7873ff46b66fb..a69e39b02b32f 100644 --- a/tests/ui/lazy-type-alias/coerce-behind-lazy.rs +++ b/tests/ui/lazy-type-alias/coerce-behind-lazy.rs @@ -4,7 +4,6 @@ //@[next] compile-flags: -Znext-solver #![feature(lazy_type_alias)] -//~^ WARN the feature `lazy_type_alias` is incomplete use std::any::Any; diff --git a/tests/ui/lazy-type-alias/enum-variant.rs b/tests/ui/lazy-type-alias/enum-variant.rs index d9b7dff266473..236e1933a8a93 100644 --- a/tests/ui/lazy-type-alias/enum-variant.rs +++ b/tests/ui/lazy-type-alias/enum-variant.rs @@ -2,7 +2,6 @@ //@ check-pass #![feature(lazy_type_alias)] -//~^ WARN the feature `lazy_type_alias` is incomplete and may not be safe to use enum Enum { Unit, diff --git a/tests/ui/lazy-type-alias/enum-variant.stderr b/tests/ui/lazy-type-alias/enum-variant.stderr deleted file mode 100644 index 4360db917783f..0000000000000 --- a/tests/ui/lazy-type-alias/enum-variant.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/enum-variant.rs:4: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/marker_trait_attr/overlap-doesnt-conflict-with-specialization.rs b/tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.rs index a9f0cdae1f6c1..cd2eaa5337e8c 100644 --- a/tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.rs +++ b/tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.rs @@ -1,7 +1,7 @@ //@ run-pass #![feature(marker_trait_attr)] -#![feature(specialization)] //~ WARN the feature `specialization` is incomplete +#![feature(specialization)] #[marker] trait MyMarker {} diff --git a/tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.stderr b/tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.stderr deleted file mode 100644 index 649e58915d0a2..0000000000000 --- a/tests/ui/marker_trait_attr/overlap-doesnt-conflict-with-specialization.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/overlap-doesnt-conflict-with-specialization.rs:4: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/parser/assoc/assoc-static-semantic-fail.rs b/tests/ui/parser/assoc/assoc-static-semantic-fail.rs index 403160f1253a4..de0cee6ff9966 100644 --- a/tests/ui/parser/assoc/assoc-static-semantic-fail.rs +++ b/tests/ui/parser/assoc/assoc-static-semantic-fail.rs @@ -1,7 +1,6 @@ // Semantically, we do not allow e.g., `static X: u8 = 0;` as an associated item. #![feature(specialization)] -//~^ WARN the feature `specialization` is incomplete fn main() {} diff --git a/tests/ui/parser/assoc/assoc-static-semantic-fail.stderr b/tests/ui/parser/assoc/assoc-static-semantic-fail.stderr index cc21df77353f5..4ac3528a6d42f 100644 --- a/tests/ui/parser/assoc/assoc-static-semantic-fail.stderr +++ b/tests/ui/parser/assoc/assoc-static-semantic-fail.stderr @@ -1,17 +1,17 @@ error: associated `static` items are not allowed - --> $DIR/assoc-static-semantic-fail.rs:10:5 + --> $DIR/assoc-static-semantic-fail.rs:9:5 | LL | static IA: u8 = 0; | ^^^^^^^^^^^^^^^^^^ error: associated `static` items are not allowed - --> $DIR/assoc-static-semantic-fail.rs:12:5 + --> $DIR/assoc-static-semantic-fail.rs:11:5 | LL | static IB: u8; | ^^^^^^^^^^^^^^ error: a static item cannot be `default` - --> $DIR/assoc-static-semantic-fail.rs:15:5 + --> $DIR/assoc-static-semantic-fail.rs:14:5 | LL | default static IC: u8 = 0; | ^^^^^^^ `default` because of this @@ -19,13 +19,13 @@ LL | default static IC: u8 = 0; = note: only associated `fn`, `const`, and `type` items can be `default` error: associated `static` items are not allowed - --> $DIR/assoc-static-semantic-fail.rs:15:5 + --> $DIR/assoc-static-semantic-fail.rs:14:5 | LL | default static IC: u8 = 0; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: a static item cannot be `default` - --> $DIR/assoc-static-semantic-fail.rs:18:16 + --> $DIR/assoc-static-semantic-fail.rs:17:16 | LL | pub(crate) default static ID: u8; | ^^^^^^^ `default` because of this @@ -33,25 +33,25 @@ LL | pub(crate) default static ID: u8; = note: only associated `fn`, `const`, and `type` items can be `default` error: associated `static` items are not allowed - --> $DIR/assoc-static-semantic-fail.rs:18:5 + --> $DIR/assoc-static-semantic-fail.rs:17:5 | LL | pub(crate) default static ID: u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: associated `static` items are not allowed - --> $DIR/assoc-static-semantic-fail.rs:25:5 + --> $DIR/assoc-static-semantic-fail.rs:24:5 | LL | static TA: u8 = 0; | ^^^^^^^^^^^^^^^^^^ error: associated `static` items are not allowed - --> $DIR/assoc-static-semantic-fail.rs:27:5 + --> $DIR/assoc-static-semantic-fail.rs:26:5 | LL | static TB: u8; | ^^^^^^^^^^^^^^ error: a static item cannot be `default` - --> $DIR/assoc-static-semantic-fail.rs:29:5 + --> $DIR/assoc-static-semantic-fail.rs:28:5 | LL | default static TC: u8 = 0; | ^^^^^^^ `default` because of this @@ -59,13 +59,13 @@ LL | default static TC: u8 = 0; = note: only associated `fn`, `const`, and `type` items can be `default` error: associated `static` items are not allowed - --> $DIR/assoc-static-semantic-fail.rs:29:5 + --> $DIR/assoc-static-semantic-fail.rs:28:5 | LL | default static TC: u8 = 0; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: a static item cannot be `default` - --> $DIR/assoc-static-semantic-fail.rs:32:16 + --> $DIR/assoc-static-semantic-fail.rs:31:16 | LL | pub(crate) default static TD: u8; | ^^^^^^^ `default` because of this @@ -73,25 +73,25 @@ LL | pub(crate) default static TD: u8; = note: only associated `fn`, `const`, and `type` items can be `default` error: associated `static` items are not allowed - --> $DIR/assoc-static-semantic-fail.rs:32:5 + --> $DIR/assoc-static-semantic-fail.rs:31:5 | LL | pub(crate) default static TD: u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: associated `static` items are not allowed - --> $DIR/assoc-static-semantic-fail.rs:39:5 + --> $DIR/assoc-static-semantic-fail.rs:38:5 | LL | static TA: u8 = 0; | ^^^^^^^^^^^^^^^^^^ error: associated `static` items are not allowed - --> $DIR/assoc-static-semantic-fail.rs:41:5 + --> $DIR/assoc-static-semantic-fail.rs:40:5 | LL | static TB: u8; | ^^^^^^^^^^^^^^ error: a static item cannot be `default` - --> $DIR/assoc-static-semantic-fail.rs:44:5 + --> $DIR/assoc-static-semantic-fail.rs:43:5 | LL | default static TC: u8 = 0; | ^^^^^^^ `default` because of this @@ -99,13 +99,13 @@ LL | default static TC: u8 = 0; = note: only associated `fn`, `const`, and `type` items can be `default` error: associated `static` items are not allowed - --> $DIR/assoc-static-semantic-fail.rs:44:5 + --> $DIR/assoc-static-semantic-fail.rs:43:5 | LL | default static TC: u8 = 0; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: a static item cannot be `default` - --> $DIR/assoc-static-semantic-fail.rs:47:9 + --> $DIR/assoc-static-semantic-fail.rs:46:9 | LL | pub default static TD: u8; | ^^^^^^^ `default` because of this @@ -113,13 +113,13 @@ LL | pub default static TD: u8; = note: only associated `fn`, `const`, and `type` items can be `default` error: associated `static` items are not allowed - --> $DIR/assoc-static-semantic-fail.rs:47:5 + --> $DIR/assoc-static-semantic-fail.rs:46:5 | LL | pub default static TD: u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: associated constant in `impl` without body - --> $DIR/assoc-static-semantic-fail.rs:12:5 + --> $DIR/assoc-static-semantic-fail.rs:11:5 | LL | static IB: u8; | ^^^^^^^^^^^^^- @@ -127,7 +127,7 @@ LL | static IB: u8; | help: provide a definition for the constant: `= ;` error: associated constant in `impl` without body - --> $DIR/assoc-static-semantic-fail.rs:18:5 + --> $DIR/assoc-static-semantic-fail.rs:17:5 | LL | pub(crate) default static ID: u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- @@ -135,7 +135,7 @@ LL | pub(crate) default static ID: u8; | help: provide a definition for the constant: `= ;` error[E0449]: visibility qualifiers are not permitted here - --> $DIR/assoc-static-semantic-fail.rs:32:5 + --> $DIR/assoc-static-semantic-fail.rs:31:5 | LL | pub(crate) default static TD: u8; | ^^^^^^^^^^ help: remove the qualifier @@ -143,7 +143,7 @@ LL | pub(crate) default static TD: u8; = note: trait items always share the visibility of their trait error: associated constant in `impl` without body - --> $DIR/assoc-static-semantic-fail.rs:41:5 + --> $DIR/assoc-static-semantic-fail.rs:40:5 | LL | static TB: u8; | ^^^^^^^^^^^^^- @@ -151,7 +151,7 @@ LL | static TB: u8; | help: provide a definition for the constant: `= ;` error: associated constant in `impl` without body - --> $DIR/assoc-static-semantic-fail.rs:47:5 + --> $DIR/assoc-static-semantic-fail.rs:46:5 | LL | pub default static TD: u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^- @@ -159,23 +159,13 @@ LL | pub default static TD: u8; | help: provide a definition for the constant: `= ;` error[E0449]: visibility qualifiers are not permitted here - --> $DIR/assoc-static-semantic-fail.rs:47:5 + --> $DIR/assoc-static-semantic-fail.rs:46:5 | LL | pub default static TD: u8; | ^^^ help: remove the qualifier | = note: trait items always share the visibility of their trait -warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/assoc-static-semantic-fail.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: aborting due to 24 previous errors; 1 warning emitted +error: aborting due to 24 previous errors For more information about this error, try `rustc --explain E0449`. diff --git a/tests/ui/parser/default.rs b/tests/ui/parser/default.rs index d1058ceb2a1c4..81821ce238774 100644 --- a/tests/ui/parser/default.rs +++ b/tests/ui/parser/default.rs @@ -1,7 +1,6 @@ // Test successful and unsuccessful parsing of the `default` contextual keyword #![feature(specialization)] -//~^ WARN the feature `specialization` is incomplete trait Foo { fn foo() -> T; diff --git a/tests/ui/parser/default.stderr b/tests/ui/parser/default.stderr index c420e5a774d20..1f2312d0c6e8f 100644 --- a/tests/ui/parser/default.stderr +++ b/tests/ui/parser/default.stderr @@ -1,5 +1,5 @@ error: `default` is not followed by an item - --> $DIR/default.rs:23:5 + --> $DIR/default.rs:22:5 | LL | default pub fn foo() -> T { T::default() } | ^^^^^^^ the `default` qualifier @@ -7,7 +7,7 @@ LL | default pub fn foo() -> T { T::default() } = note: only `fn`, `const`, `type`, or `impl` items may be prefixed by `default` error: non-item in item list - --> $DIR/default.rs:23:13 + --> $DIR/default.rs:22:13 | LL | impl Foo for u32 { | - item list starts here @@ -18,25 +18,15 @@ LL | } | - item list ends here error[E0449]: visibility qualifiers are not permitted here - --> $DIR/default.rs:17:5 + --> $DIR/default.rs:16:5 | LL | pub default fn foo() -> T { | ^^^ help: remove the qualifier | = note: trait items always share the visibility of their trait -warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/default.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[E0046]: not all trait items implemented, missing: `foo` - --> $DIR/default.rs:22:1 + --> $DIR/default.rs:21:1 | LL | fn foo() -> T; | -------------------------- `foo` from trait @@ -44,7 +34,7 @@ LL | fn foo() -> T; LL | impl Foo for u32 { | ^^^^^^^^^^^^^^^^ missing `foo` in implementation -error: aborting due to 4 previous errors; 1 warning emitted +error: aborting due to 4 previous errors Some errors have detailed explanations: E0046, E0449. For more information about an error, try `rustc --explain E0046`. diff --git a/tests/ui/parser/defaultness-invalid-places-fail-semantic.rs b/tests/ui/parser/defaultness-invalid-places-fail-semantic.rs index bff53f66e19d8..f274040083134 100644 --- a/tests/ui/parser/defaultness-invalid-places-fail-semantic.rs +++ b/tests/ui/parser/defaultness-invalid-places-fail-semantic.rs @@ -1,4 +1,4 @@ -#![feature(specialization)] //~ WARN the feature `specialization` is incomplete +#![feature(specialization)] fn main() {} diff --git a/tests/ui/parser/defaultness-invalid-places-fail-semantic.stderr b/tests/ui/parser/defaultness-invalid-places-fail-semantic.stderr index 41fad3a5de34d..4adb0ab25c6f1 100644 --- a/tests/ui/parser/defaultness-invalid-places-fail-semantic.stderr +++ b/tests/ui/parser/defaultness-invalid-places-fail-semantic.stderr @@ -70,15 +70,5 @@ LL | default fn h() {} | | | `default` because of this -warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/defaultness-invalid-places-fail-semantic.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: aborting due to 9 previous errors; 1 warning emitted +error: aborting due to 9 previous errors diff --git a/tests/ui/pattern/usefulness/empty-types.exhaustive_patterns.stderr b/tests/ui/pattern/usefulness/empty-types.exhaustive_patterns.stderr index d26ba93e72117..75a633cd49a3d 100644 --- a/tests/ui/pattern/usefulness/empty-types.exhaustive_patterns.stderr +++ b/tests/ui/pattern/usefulness/empty-types.exhaustive_patterns.stderr @@ -1,5 +1,5 @@ error: unreachable pattern - --> $DIR/empty-types.rs:48:9 + --> $DIR/empty-types.rs:47:9 | LL | _ => {} | ^------ @@ -9,13 +9,13 @@ LL | _ => {} | = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types note: the lint level is defined here - --> $DIR/empty-types.rs:14:9 + --> $DIR/empty-types.rs:13:9 | LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ error: unreachable pattern - --> $DIR/empty-types.rs:51:9 + --> $DIR/empty-types.rs:50:9 | LL | _x => {} | ^^------ @@ -26,7 +26,7 @@ LL | _x => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0004]: non-exhaustive patterns: type `&!` is non-empty - --> $DIR/empty-types.rs:55:11 + --> $DIR/empty-types.rs:54:11 | LL | match ref_never {} | ^^^^^^^^^ @@ -41,7 +41,7 @@ LL ~ } | error: unreachable pattern - --> $DIR/empty-types.rs:69:9 + --> $DIR/empty-types.rs:68:9 | LL | (_, _) => {} | ^^^^^^------ @@ -52,7 +52,7 @@ LL | (_, _) => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:75:9 + --> $DIR/empty-types.rs:74:9 | LL | _ => {} | ^------ @@ -63,7 +63,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:78:9 + --> $DIR/empty-types.rs:77:9 | LL | (_, _) => {} | ^^^^^^------ @@ -74,7 +74,7 @@ LL | (_, _) => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:82:9 + --> $DIR/empty-types.rs:81:9 | LL | _ => {} | ^------ @@ -85,7 +85,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0004]: non-exhaustive patterns: `Ok(_)` not covered - --> $DIR/empty-types.rs:86:11 + --> $DIR/empty-types.rs:85:11 | LL | match res_u32_never {} | ^^^^^^^^^^^^^ pattern `Ok(_)` not covered @@ -104,7 +104,7 @@ LL ~ } | error: unreachable pattern - --> $DIR/empty-types.rs:93:9 + --> $DIR/empty-types.rs:92:9 | LL | Err(_) => {} | ^^^^^^------ @@ -115,7 +115,7 @@ LL | Err(_) => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:98:9 + --> $DIR/empty-types.rs:97:9 | LL | Err(_) => {} | ^^^^^^------ @@ -126,7 +126,7 @@ LL | Err(_) => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0004]: non-exhaustive patterns: `Ok(1_u32..=u32::MAX)` not covered - --> $DIR/empty-types.rs:95:11 + --> $DIR/empty-types.rs:94:11 | LL | match res_u32_never { | ^^^^^^^^^^^^^ pattern `Ok(1_u32..=u32::MAX)` not covered @@ -144,7 +144,7 @@ LL ~ Ok(1_u32..=u32::MAX) => todo!() | error[E0005]: refutable pattern in local binding - --> $DIR/empty-types.rs:101:9 + --> $DIR/empty-types.rs:100:9 | LL | let Ok(_x) = res_u32_never.as_ref(); | ^^^^^^ pattern `Err(_)` not covered @@ -158,7 +158,7 @@ LL | let Ok(_x) = res_u32_never.as_ref() else { todo!() }; | ++++++++++++++++ error: unreachable pattern - --> $DIR/empty-types.rs:111:9 + --> $DIR/empty-types.rs:110:9 | LL | _ => {} | ^------ @@ -169,7 +169,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:114:9 + --> $DIR/empty-types.rs:113:9 | LL | Ok(_) => {} | ^^^^^------ @@ -180,7 +180,7 @@ LL | Ok(_) => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:117:9 + --> $DIR/empty-types.rs:116:9 | LL | Ok(_) => {} | ^^^^^------ @@ -191,7 +191,7 @@ LL | Ok(_) => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:118:9 + --> $DIR/empty-types.rs:117:9 | LL | _ => {} | ^------ @@ -202,7 +202,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:121:9 + --> $DIR/empty-types.rs:120:9 | LL | Ok(_) => {} | ^^^^^------ @@ -213,7 +213,7 @@ LL | Ok(_) => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:122:9 + --> $DIR/empty-types.rs:121:9 | LL | Err(_) => {} | ^^^^^^------ @@ -224,7 +224,7 @@ LL | Err(_) => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:131:13 + --> $DIR/empty-types.rs:130:13 | LL | _ => {} | ^------ @@ -235,7 +235,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:134:13 + --> $DIR/empty-types.rs:133:13 | LL | _ if false => {} | ^--------------- @@ -246,7 +246,7 @@ LL | _ if false => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:142:13 + --> $DIR/empty-types.rs:141:13 | LL | Some(_) => {} | ^^^^^^^------ @@ -257,7 +257,7 @@ LL | Some(_) => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:146:13 + --> $DIR/empty-types.rs:145:13 | LL | None => {} | ---- matches all the relevant values @@ -265,7 +265,7 @@ LL | _ => {} | ^ no value can reach this error: unreachable pattern - --> $DIR/empty-types.rs:198:13 + --> $DIR/empty-types.rs:197:13 | LL | _ => {} | ^------ @@ -276,7 +276,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:203:13 + --> $DIR/empty-types.rs:202:13 | LL | _ => {} | ^------ @@ -287,7 +287,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:208:13 + --> $DIR/empty-types.rs:207:13 | LL | _ => {} | ^------ @@ -298,7 +298,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:213:13 + --> $DIR/empty-types.rs:212:13 | LL | _ => {} | ^------ @@ -309,7 +309,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:219:13 + --> $DIR/empty-types.rs:218:13 | LL | _ => {} | ^------ @@ -320,7 +320,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:280:9 + --> $DIR/empty-types.rs:279:9 | LL | _ => {} | ^------ @@ -331,7 +331,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:283:9 + --> $DIR/empty-types.rs:282:9 | LL | (_, _) => {} | ^^^^^^------ @@ -342,7 +342,7 @@ LL | (_, _) => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:286:9 + --> $DIR/empty-types.rs:285:9 | LL | Ok(_) => {} | ^^^^^------ @@ -353,7 +353,7 @@ LL | Ok(_) => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:287:9 + --> $DIR/empty-types.rs:286:9 | LL | Err(_) => {} | ^^^^^^------ @@ -364,7 +364,7 @@ LL | Err(_) => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0004]: non-exhaustive patterns: type `&[!]` is non-empty - --> $DIR/empty-types.rs:326:11 + --> $DIR/empty-types.rs:325:11 | LL | match slice_never {} | ^^^^^^^^^^^ @@ -378,7 +378,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: `&[]` not covered - --> $DIR/empty-types.rs:337:11 + --> $DIR/empty-types.rs:336:11 | LL | match slice_never { | ^^^^^^^^^^^ pattern `&[]` not covered @@ -391,7 +391,7 @@ LL + &[] => todo!() | error[E0004]: non-exhaustive patterns: `&[]` not covered - --> $DIR/empty-types.rs:351:11 + --> $DIR/empty-types.rs:350:11 | LL | match slice_never { | ^^^^^^^^^^^ pattern `&[]` not covered @@ -405,7 +405,7 @@ LL + &[] => todo!() | error[E0004]: non-exhaustive patterns: type `[!]` is non-empty - --> $DIR/empty-types.rs:358:11 + --> $DIR/empty-types.rs:357:11 | LL | match *slice_never {} | ^^^^^^^^^^^^ @@ -419,7 +419,7 @@ LL ~ } | error: unreachable pattern - --> $DIR/empty-types.rs:367:9 + --> $DIR/empty-types.rs:366:9 | LL | _ => {} | ^------ @@ -430,7 +430,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:370:9 + --> $DIR/empty-types.rs:369:9 | LL | [_, _, _] => {} | ^^^^^^^^^------ @@ -441,7 +441,7 @@ LL | [_, _, _] => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:373:9 + --> $DIR/empty-types.rs:372:9 | LL | [_, ..] => {} | ^^^^^^^------ @@ -452,7 +452,7 @@ LL | [_, ..] => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0004]: non-exhaustive patterns: type `[!; 0]` is non-empty - --> $DIR/empty-types.rs:387:11 + --> $DIR/empty-types.rs:386:11 | LL | match array_0_never {} | ^^^^^^^^^^^^^ @@ -466,7 +466,7 @@ LL ~ } | error: unreachable pattern - --> $DIR/empty-types.rs:394:9 + --> $DIR/empty-types.rs:393:9 | LL | [] => {} | -- matches all the relevant values @@ -474,7 +474,7 @@ LL | _ => {} | ^ no value can reach this error[E0004]: non-exhaustive patterns: `[]` not covered - --> $DIR/empty-types.rs:396:11 + --> $DIR/empty-types.rs:395:11 | LL | match array_0_never { | ^^^^^^^^^^^^^ pattern `[]` not covered @@ -488,7 +488,7 @@ LL + [] => todo!() | error: unreachable pattern - --> $DIR/empty-types.rs:415:9 + --> $DIR/empty-types.rs:414:9 | LL | Some(_) => {} | ^^^^^^^------ @@ -499,7 +499,7 @@ LL | Some(_) => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:420:9 + --> $DIR/empty-types.rs:419:9 | LL | Some(_a) => {} | ^^^^^^^^------ @@ -510,7 +510,7 @@ LL | Some(_a) => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:425:9 + --> $DIR/empty-types.rs:424:9 | LL | None => {} | ---- matches all the relevant values @@ -519,7 +519,7 @@ LL | _ => {} | ^ no value can reach this error: unreachable pattern - --> $DIR/empty-types.rs:430:9 + --> $DIR/empty-types.rs:429:9 | LL | None => {} | ---- matches all the relevant values @@ -528,7 +528,7 @@ LL | _a => {} | ^^ no value can reach this error: unreachable pattern - --> $DIR/empty-types.rs:602:9 + --> $DIR/empty-types.rs:601:9 | LL | _ => {} | ^------ @@ -539,7 +539,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:605:9 + --> $DIR/empty-types.rs:604:9 | LL | _x => {} | ^^------ @@ -550,7 +550,7 @@ LL | _x => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:608:9 + --> $DIR/empty-types.rs:607:9 | LL | _ if false => {} | ^--------------- @@ -561,7 +561,7 @@ LL | _ if false => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:611:9 + --> $DIR/empty-types.rs:610:9 | LL | _x if false => {} | ^^--------------- diff --git a/tests/ui/pattern/usefulness/empty-types.never_pats.stderr b/tests/ui/pattern/usefulness/empty-types.never_pats.stderr index 55d6eb82a3463..046c0d5f6588f 100644 --- a/tests/ui/pattern/usefulness/empty-types.never_pats.stderr +++ b/tests/ui/pattern/usefulness/empty-types.never_pats.stderr @@ -1,14 +1,5 @@ -warning: the feature `never_patterns` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/empty-types.rs:11:33 - | -LL | #![cfg_attr(never_pats, feature(never_patterns))] - | ^^^^^^^^^^^^^^ - | - = note: see issue #118155 for more information - = note: `#[warn(incomplete_features)]` on by default - error: unreachable pattern - --> $DIR/empty-types.rs:48:9 + --> $DIR/empty-types.rs:47:9 | LL | _ => {} | ^------ @@ -18,13 +9,13 @@ LL | _ => {} | = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types note: the lint level is defined here - --> $DIR/empty-types.rs:14:9 + --> $DIR/empty-types.rs:13:9 | LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ error: unreachable pattern - --> $DIR/empty-types.rs:51:9 + --> $DIR/empty-types.rs:50:9 | LL | _x => {} | ^^------ @@ -35,7 +26,7 @@ LL | _x => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0004]: non-exhaustive patterns: type `&!` is non-empty - --> $DIR/empty-types.rs:55:11 + --> $DIR/empty-types.rs:54:11 | LL | match ref_never {} | ^^^^^^^^^ @@ -50,7 +41,7 @@ LL ~ } | error: unreachable pattern - --> $DIR/empty-types.rs:82:9 + --> $DIR/empty-types.rs:81:9 | LL | _ => {} | ^------ @@ -61,7 +52,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0004]: non-exhaustive patterns: `Ok(_)` not covered - --> $DIR/empty-types.rs:86:11 + --> $DIR/empty-types.rs:85:11 | LL | match res_u32_never {} | ^^^^^^^^^^^^^ pattern `Ok(_)` not covered @@ -80,7 +71,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: `Ok(1_u32..=u32::MAX)` not covered - --> $DIR/empty-types.rs:95:11 + --> $DIR/empty-types.rs:94:11 | LL | match res_u32_never { | ^^^^^^^^^^^^^ pattern `Ok(1_u32..=u32::MAX)` not covered @@ -98,7 +89,7 @@ LL ~ Ok(1_u32..=u32::MAX) => todo!() | error[E0005]: refutable pattern in local binding - --> $DIR/empty-types.rs:101:9 + --> $DIR/empty-types.rs:100:9 | LL | let Ok(_x) = res_u32_never.as_ref(); | ^^^^^^ pattern `Err(_)` not covered @@ -112,7 +103,7 @@ LL | let Ok(_x) = res_u32_never.as_ref() else { todo!() }; | ++++++++++++++++ error[E0005]: refutable pattern in local binding - --> $DIR/empty-types.rs:105:9 + --> $DIR/empty-types.rs:104:9 | LL | let Ok(_x) = &res_u32_never; | ^^^^^^ pattern `&Err(!)` not covered @@ -126,7 +117,7 @@ LL | let Ok(_x) = &res_u32_never else { todo!() }; | ++++++++++++++++ error: unreachable pattern - --> $DIR/empty-types.rs:131:13 + --> $DIR/empty-types.rs:130:13 | LL | _ => {} | ^------ @@ -137,7 +128,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:134:13 + --> $DIR/empty-types.rs:133:13 | LL | _ if false => {} | ^--------------- @@ -148,7 +139,7 @@ LL | _ if false => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0004]: non-exhaustive patterns: `Some(!)` not covered - --> $DIR/empty-types.rs:155:15 + --> $DIR/empty-types.rs:154:15 | LL | match *ref_opt_void { | ^^^^^^^^^^^^^ pattern `Some(!)` not covered @@ -167,7 +158,7 @@ LL + Some(!) | error: unreachable pattern - --> $DIR/empty-types.rs:198:13 + --> $DIR/empty-types.rs:197:13 | LL | _ => {} | ^------ @@ -178,7 +169,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:203:13 + --> $DIR/empty-types.rs:202:13 | LL | _ => {} | ^------ @@ -189,7 +180,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:208:13 + --> $DIR/empty-types.rs:207:13 | LL | _ => {} | ^------ @@ -200,7 +191,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:213:13 + --> $DIR/empty-types.rs:212:13 | LL | _ => {} | ^------ @@ -211,7 +202,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:219:13 + --> $DIR/empty-types.rs:218:13 | LL | _ => {} | ^------ @@ -222,7 +213,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:280:9 + --> $DIR/empty-types.rs:279:9 | LL | _ => {} | ^------ @@ -233,7 +224,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0005]: refutable pattern in local binding - --> $DIR/empty-types.rs:296:13 + --> $DIR/empty-types.rs:295:13 | LL | let Ok(_) = *ptr_result_never_err; | ^^^^^ pattern `Err(!)` not covered @@ -247,7 +238,7 @@ LL | if let Ok(_) = *ptr_result_never_err { todo!() }; | ++ +++++++++++ error[E0004]: non-exhaustive patterns: type `(u32, !)` is non-empty - --> $DIR/empty-types.rs:315:11 + --> $DIR/empty-types.rs:314:11 | LL | match *x {} | ^^ @@ -261,7 +252,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: type `(!, !)` is non-empty - --> $DIR/empty-types.rs:317:11 + --> $DIR/empty-types.rs:316:11 | LL | match *x {} | ^^ @@ -275,7 +266,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: `Ok(!)` and `Err(!)` not covered - --> $DIR/empty-types.rs:319:11 + --> $DIR/empty-types.rs:318:11 | LL | match *x {} | ^^ patterns `Ok(!)` and `Err(!)` not covered @@ -297,7 +288,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: type `[!; 3]` is non-empty - --> $DIR/empty-types.rs:321:11 + --> $DIR/empty-types.rs:320:11 | LL | match *x {} | ^^ @@ -311,7 +302,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: type `&[!]` is non-empty - --> $DIR/empty-types.rs:326:11 + --> $DIR/empty-types.rs:325:11 | LL | match slice_never {} | ^^^^^^^^^^^ @@ -325,7 +316,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: `&[!, ..]` not covered - --> $DIR/empty-types.rs:328:11 + --> $DIR/empty-types.rs:327:11 | LL | match slice_never { | ^^^^^^^^^^^ pattern `&[!, ..]` not covered @@ -339,7 +330,7 @@ LL + &[!, ..] | error[E0004]: non-exhaustive patterns: `&[]`, `&[!]` and `&[!, !]` not covered - --> $DIR/empty-types.rs:337:11 + --> $DIR/empty-types.rs:336:11 | LL | match slice_never { | ^^^^^^^^^^^ patterns `&[]`, `&[!]` and `&[!, !]` not covered @@ -352,7 +343,7 @@ LL + &[] | &[!] | &[!, !] => todo!() | error[E0004]: non-exhaustive patterns: `&[]` and `&[!, ..]` not covered - --> $DIR/empty-types.rs:351:11 + --> $DIR/empty-types.rs:350:11 | LL | match slice_never { | ^^^^^^^^^^^ patterns `&[]` and `&[!, ..]` not covered @@ -366,7 +357,7 @@ LL + &[] | &[!, ..] => todo!() | error[E0004]: non-exhaustive patterns: type `[!]` is non-empty - --> $DIR/empty-types.rs:358:11 + --> $DIR/empty-types.rs:357:11 | LL | match *slice_never {} | ^^^^^^^^^^^^ @@ -380,7 +371,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: type `[!; 0]` is non-empty - --> $DIR/empty-types.rs:387:11 + --> $DIR/empty-types.rs:386:11 | LL | match array_0_never {} | ^^^^^^^^^^^^^ @@ -394,7 +385,7 @@ LL ~ } | error: unreachable pattern - --> $DIR/empty-types.rs:394:9 + --> $DIR/empty-types.rs:393:9 | LL | [] => {} | -- matches all the relevant values @@ -402,7 +393,7 @@ LL | _ => {} | ^ no value can reach this error[E0004]: non-exhaustive patterns: `[]` not covered - --> $DIR/empty-types.rs:396:11 + --> $DIR/empty-types.rs:395:11 | LL | match array_0_never { | ^^^^^^^^^^^^^ pattern `[]` not covered @@ -416,7 +407,7 @@ LL + [] => todo!() | error[E0004]: non-exhaustive patterns: `&Some(!)` not covered - --> $DIR/empty-types.rs:450:11 + --> $DIR/empty-types.rs:449:11 | LL | match ref_opt_never { | ^^^^^^^^^^^^^ pattern `&Some(!)` not covered @@ -435,7 +426,7 @@ LL + &Some(!) | error[E0004]: non-exhaustive patterns: `Some(!)` not covered - --> $DIR/empty-types.rs:491:11 + --> $DIR/empty-types.rs:490:11 | LL | match *ref_opt_never { | ^^^^^^^^^^^^^^ pattern `Some(!)` not covered @@ -454,7 +445,7 @@ LL + Some(!) | error[E0004]: non-exhaustive patterns: `Err(!)` not covered - --> $DIR/empty-types.rs:539:11 + --> $DIR/empty-types.rs:538:11 | LL | match *ref_res_never { | ^^^^^^^^^^^^^^ pattern `Err(!)` not covered @@ -473,7 +464,7 @@ LL + Err(!) | error[E0004]: non-exhaustive patterns: `Err(!)` not covered - --> $DIR/empty-types.rs:550:11 + --> $DIR/empty-types.rs:549:11 | LL | match *ref_res_never { | ^^^^^^^^^^^^^^ pattern `Err(!)` not covered @@ -492,7 +483,7 @@ LL + Err(!) | error[E0004]: non-exhaustive patterns: type `(u32, !)` is non-empty - --> $DIR/empty-types.rs:569:11 + --> $DIR/empty-types.rs:568:11 | LL | match *ref_tuple_half_never {} | ^^^^^^^^^^^^^^^^^^^^^ @@ -506,7 +497,7 @@ LL ~ } | error: unreachable pattern - --> $DIR/empty-types.rs:602:9 + --> $DIR/empty-types.rs:601:9 | LL | _ => {} | ^------ @@ -517,7 +508,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:605:9 + --> $DIR/empty-types.rs:604:9 | LL | _x => {} | ^^------ @@ -528,7 +519,7 @@ LL | _x => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:608:9 + --> $DIR/empty-types.rs:607:9 | LL | _ if false => {} | ^--------------- @@ -539,7 +530,7 @@ LL | _ if false => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:611:9 + --> $DIR/empty-types.rs:610:9 | LL | _x if false => {} | ^^--------------- @@ -550,7 +541,7 @@ LL | _x if false => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0004]: non-exhaustive patterns: `&!` not covered - --> $DIR/empty-types.rs:636:11 + --> $DIR/empty-types.rs:635:11 | LL | match ref_never { | ^^^^^^^^^ pattern `&!` not covered @@ -566,7 +557,7 @@ LL + &! | error[E0004]: non-exhaustive patterns: `Ok(!)` not covered - --> $DIR/empty-types.rs:652:11 + --> $DIR/empty-types.rs:651:11 | LL | match *ref_result_never { | ^^^^^^^^^^^^^^^^^ pattern `Ok(!)` not covered @@ -585,7 +576,7 @@ LL + Ok(!) | error[E0004]: non-exhaustive patterns: `Some(!)` not covered - --> $DIR/empty-types.rs:672:11 + --> $DIR/empty-types.rs:671:11 | LL | match *x { | ^^ pattern `Some(!)` not covered @@ -603,7 +594,7 @@ LL ~ None => {}, LL + Some(!) | -error: aborting due to 42 previous errors; 1 warning emitted +error: aborting due to 42 previous errors Some errors have detailed explanations: E0004, E0005. For more information about an error, try `rustc --explain E0004`. diff --git a/tests/ui/pattern/usefulness/empty-types.normal.stderr b/tests/ui/pattern/usefulness/empty-types.normal.stderr index 0ed8c21199673..ba158c1176b35 100644 --- a/tests/ui/pattern/usefulness/empty-types.normal.stderr +++ b/tests/ui/pattern/usefulness/empty-types.normal.stderr @@ -1,5 +1,5 @@ error: unreachable pattern - --> $DIR/empty-types.rs:48:9 + --> $DIR/empty-types.rs:47:9 | LL | _ => {} | ^------ @@ -9,13 +9,13 @@ LL | _ => {} | = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types note: the lint level is defined here - --> $DIR/empty-types.rs:14:9 + --> $DIR/empty-types.rs:13:9 | LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ error: unreachable pattern - --> $DIR/empty-types.rs:51:9 + --> $DIR/empty-types.rs:50:9 | LL | _x => {} | ^^------ @@ -26,7 +26,7 @@ LL | _x => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0004]: non-exhaustive patterns: type `&!` is non-empty - --> $DIR/empty-types.rs:55:11 + --> $DIR/empty-types.rs:54:11 | LL | match ref_never {} | ^^^^^^^^^ @@ -41,7 +41,7 @@ LL ~ } | error: unreachable pattern - --> $DIR/empty-types.rs:82:9 + --> $DIR/empty-types.rs:81:9 | LL | _ => {} | ^------ @@ -52,7 +52,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0004]: non-exhaustive patterns: `Ok(_)` not covered - --> $DIR/empty-types.rs:86:11 + --> $DIR/empty-types.rs:85:11 | LL | match res_u32_never {} | ^^^^^^^^^^^^^ pattern `Ok(_)` not covered @@ -71,7 +71,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: `Ok(1_u32..=u32::MAX)` not covered - --> $DIR/empty-types.rs:95:11 + --> $DIR/empty-types.rs:94:11 | LL | match res_u32_never { | ^^^^^^^^^^^^^ pattern `Ok(1_u32..=u32::MAX)` not covered @@ -89,7 +89,7 @@ LL ~ Ok(1_u32..=u32::MAX) => todo!() | error[E0005]: refutable pattern in local binding - --> $DIR/empty-types.rs:101:9 + --> $DIR/empty-types.rs:100:9 | LL | let Ok(_x) = res_u32_never.as_ref(); | ^^^^^^ pattern `Err(_)` not covered @@ -103,7 +103,7 @@ LL | let Ok(_x) = res_u32_never.as_ref() else { todo!() }; | ++++++++++++++++ error[E0005]: refutable pattern in local binding - --> $DIR/empty-types.rs:105:9 + --> $DIR/empty-types.rs:104:9 | LL | let Ok(_x) = &res_u32_never; | ^^^^^^ pattern `&Err(_)` not covered @@ -117,7 +117,7 @@ LL | let Ok(_x) = &res_u32_never else { todo!() }; | ++++++++++++++++ error: unreachable pattern - --> $DIR/empty-types.rs:131:13 + --> $DIR/empty-types.rs:130:13 | LL | _ => {} | ^------ @@ -128,7 +128,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:134:13 + --> $DIR/empty-types.rs:133:13 | LL | _ if false => {} | ^--------------- @@ -139,7 +139,7 @@ LL | _ if false => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0004]: non-exhaustive patterns: `Some(_)` not covered - --> $DIR/empty-types.rs:155:15 + --> $DIR/empty-types.rs:154:15 | LL | match *ref_opt_void { | ^^^^^^^^^^^^^ pattern `Some(_)` not covered @@ -158,7 +158,7 @@ LL + Some(_) => todo!() | error: unreachable pattern - --> $DIR/empty-types.rs:198:13 + --> $DIR/empty-types.rs:197:13 | LL | _ => {} | ^------ @@ -169,7 +169,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:203:13 + --> $DIR/empty-types.rs:202:13 | LL | _ => {} | ^------ @@ -180,7 +180,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:208:13 + --> $DIR/empty-types.rs:207:13 | LL | _ => {} | ^------ @@ -191,7 +191,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:213:13 + --> $DIR/empty-types.rs:212:13 | LL | _ => {} | ^------ @@ -202,7 +202,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:219:13 + --> $DIR/empty-types.rs:218:13 | LL | _ => {} | ^------ @@ -213,7 +213,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:280:9 + --> $DIR/empty-types.rs:279:9 | LL | _ => {} | ^------ @@ -224,7 +224,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0005]: refutable pattern in local binding - --> $DIR/empty-types.rs:296:13 + --> $DIR/empty-types.rs:295:13 | LL | let Ok(_) = *ptr_result_never_err; | ^^^^^ pattern `Err(_)` not covered @@ -238,7 +238,7 @@ LL | if let Ok(_) = *ptr_result_never_err { todo!() }; | ++ +++++++++++ error[E0004]: non-exhaustive patterns: type `(u32, !)` is non-empty - --> $DIR/empty-types.rs:315:11 + --> $DIR/empty-types.rs:314:11 | LL | match *x {} | ^^ @@ -252,7 +252,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: type `(!, !)` is non-empty - --> $DIR/empty-types.rs:317:11 + --> $DIR/empty-types.rs:316:11 | LL | match *x {} | ^^ @@ -266,7 +266,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: `Ok(_)` and `Err(_)` not covered - --> $DIR/empty-types.rs:319:11 + --> $DIR/empty-types.rs:318:11 | LL | match *x {} | ^^ patterns `Ok(_)` and `Err(_)` not covered @@ -288,7 +288,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: type `[!; 3]` is non-empty - --> $DIR/empty-types.rs:321:11 + --> $DIR/empty-types.rs:320:11 | LL | match *x {} | ^^ @@ -302,7 +302,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: type `&[!]` is non-empty - --> $DIR/empty-types.rs:326:11 + --> $DIR/empty-types.rs:325:11 | LL | match slice_never {} | ^^^^^^^^^^^ @@ -316,7 +316,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: `&[_, ..]` not covered - --> $DIR/empty-types.rs:328:11 + --> $DIR/empty-types.rs:327:11 | LL | match slice_never { | ^^^^^^^^^^^ pattern `&[_, ..]` not covered @@ -330,7 +330,7 @@ LL + &[_, ..] => todo!() | error[E0004]: non-exhaustive patterns: `&[]`, `&[_]` and `&[_, _]` not covered - --> $DIR/empty-types.rs:337:11 + --> $DIR/empty-types.rs:336:11 | LL | match slice_never { | ^^^^^^^^^^^ patterns `&[]`, `&[_]` and `&[_, _]` not covered @@ -343,7 +343,7 @@ LL + &[] | &[_] | &[_, _] => todo!() | error[E0004]: non-exhaustive patterns: `&[]` and `&[_, ..]` not covered - --> $DIR/empty-types.rs:351:11 + --> $DIR/empty-types.rs:350:11 | LL | match slice_never { | ^^^^^^^^^^^ patterns `&[]` and `&[_, ..]` not covered @@ -357,7 +357,7 @@ LL + &[] | &[_, ..] => todo!() | error[E0004]: non-exhaustive patterns: type `[!]` is non-empty - --> $DIR/empty-types.rs:358:11 + --> $DIR/empty-types.rs:357:11 | LL | match *slice_never {} | ^^^^^^^^^^^^ @@ -371,7 +371,7 @@ LL ~ } | error[E0004]: non-exhaustive patterns: type `[!; 0]` is non-empty - --> $DIR/empty-types.rs:387:11 + --> $DIR/empty-types.rs:386:11 | LL | match array_0_never {} | ^^^^^^^^^^^^^ @@ -385,7 +385,7 @@ LL ~ } | error: unreachable pattern - --> $DIR/empty-types.rs:394:9 + --> $DIR/empty-types.rs:393:9 | LL | [] => {} | -- matches all the relevant values @@ -393,7 +393,7 @@ LL | _ => {} | ^ no value can reach this error[E0004]: non-exhaustive patterns: `[]` not covered - --> $DIR/empty-types.rs:396:11 + --> $DIR/empty-types.rs:395:11 | LL | match array_0_never { | ^^^^^^^^^^^^^ pattern `[]` not covered @@ -407,7 +407,7 @@ LL + [] => todo!() | error[E0004]: non-exhaustive patterns: `&Some(_)` not covered - --> $DIR/empty-types.rs:450:11 + --> $DIR/empty-types.rs:449:11 | LL | match ref_opt_never { | ^^^^^^^^^^^^^ pattern `&Some(_)` not covered @@ -426,7 +426,7 @@ LL + &Some(_) => todo!() | error[E0004]: non-exhaustive patterns: `Some(_)` not covered - --> $DIR/empty-types.rs:491:11 + --> $DIR/empty-types.rs:490:11 | LL | match *ref_opt_never { | ^^^^^^^^^^^^^^ pattern `Some(_)` not covered @@ -445,7 +445,7 @@ LL + Some(_) => todo!() | error[E0004]: non-exhaustive patterns: `Err(_)` not covered - --> $DIR/empty-types.rs:539:11 + --> $DIR/empty-types.rs:538:11 | LL | match *ref_res_never { | ^^^^^^^^^^^^^^ pattern `Err(_)` not covered @@ -464,7 +464,7 @@ LL + Err(_) => todo!() | error[E0004]: non-exhaustive patterns: `Err(_)` not covered - --> $DIR/empty-types.rs:550:11 + --> $DIR/empty-types.rs:549:11 | LL | match *ref_res_never { | ^^^^^^^^^^^^^^ pattern `Err(_)` not covered @@ -483,7 +483,7 @@ LL + Err(_) => todo!() | error[E0004]: non-exhaustive patterns: type `(u32, !)` is non-empty - --> $DIR/empty-types.rs:569:11 + --> $DIR/empty-types.rs:568:11 | LL | match *ref_tuple_half_never {} | ^^^^^^^^^^^^^^^^^^^^^ @@ -497,7 +497,7 @@ LL ~ } | error: unreachable pattern - --> $DIR/empty-types.rs:602:9 + --> $DIR/empty-types.rs:601:9 | LL | _ => {} | ^------ @@ -508,7 +508,7 @@ LL | _ => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:605:9 + --> $DIR/empty-types.rs:604:9 | LL | _x => {} | ^^------ @@ -519,7 +519,7 @@ LL | _x => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:608:9 + --> $DIR/empty-types.rs:607:9 | LL | _ if false => {} | ^--------------- @@ -530,7 +530,7 @@ LL | _ if false => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error: unreachable pattern - --> $DIR/empty-types.rs:611:9 + --> $DIR/empty-types.rs:610:9 | LL | _x if false => {} | ^^--------------- @@ -541,7 +541,7 @@ LL | _x if false => {} = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types error[E0004]: non-exhaustive patterns: `&_` not covered - --> $DIR/empty-types.rs:636:11 + --> $DIR/empty-types.rs:635:11 | LL | match ref_never { | ^^^^^^^^^ pattern `&_` not covered @@ -557,7 +557,7 @@ LL + &_ => todo!() | error[E0004]: non-exhaustive patterns: `Ok(_)` not covered - --> $DIR/empty-types.rs:652:11 + --> $DIR/empty-types.rs:651:11 | LL | match *ref_result_never { | ^^^^^^^^^^^^^^^^^ pattern `Ok(_)` not covered @@ -576,7 +576,7 @@ LL + Ok(_) => todo!() | error[E0004]: non-exhaustive patterns: `Some(_)` not covered - --> $DIR/empty-types.rs:672:11 + --> $DIR/empty-types.rs:671:11 | LL | match *x { | ^^ pattern `Some(_)` not covered diff --git a/tests/ui/pattern/usefulness/empty-types.rs b/tests/ui/pattern/usefulness/empty-types.rs index a503295fc8741..d4fdb7c1dd46a 100644 --- a/tests/ui/pattern/usefulness/empty-types.rs +++ b/tests/ui/pattern/usefulness/empty-types.rs @@ -9,7 +9,6 @@ #![feature(never_type)] #![cfg_attr(exhaustive_patterns, feature(exhaustive_patterns))] #![cfg_attr(never_pats, feature(never_patterns))] -//[never_pats]~^ WARN the feature `never_patterns` is incomplete #![allow(dead_code, unreachable_code)] #![deny(unreachable_patterns)] diff --git a/tests/ui/pin-ergonomics/coerce-non-pointer-pin.rs b/tests/ui/pin-ergonomics/coerce-non-pointer-pin.rs index a95665f126d1e..b5a0c6e4404e6 100644 --- a/tests/ui/pin-ergonomics/coerce-non-pointer-pin.rs +++ b/tests/ui/pin-ergonomics/coerce-non-pointer-pin.rs @@ -1,7 +1,6 @@ //@ check-pass #![feature(pin_ergonomics)] -//~^ WARN the feature `pin_ergonomics` is incomplete use std::pin::Pin; diff --git a/tests/ui/pin-ergonomics/coerce-non-pointer-pin.stderr b/tests/ui/pin-ergonomics/coerce-non-pointer-pin.stderr deleted file mode 100644 index 2deb5b09884c3..0000000000000 --- a/tests/ui/pin-ergonomics/coerce-non-pointer-pin.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `pin_ergonomics` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/coerce-non-pointer-pin.rs:3:12 - | -LL | #![feature(pin_ergonomics)] - | ^^^^^^^^^^^^^^ - | - = note: see issue #130494 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/never-pattern-is-a-read.rs b/tests/ui/rfcs/rfc-0000-never_patterns/never-pattern-is-a-read.rs index a66c446441778..8dff48de60aa5 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/never-pattern-is-a-read.rs +++ b/tests/ui/rfcs/rfc-0000-never_patterns/never-pattern-is-a-read.rs @@ -1,7 +1,6 @@ // Make sure we consider `!` to be a union read. #![feature(never_type, never_patterns)] -//~^ WARN the feature `never_patterns` is incomplete union U { a: !, diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/never-pattern-is-a-read.stderr b/tests/ui/rfcs/rfc-0000-never_patterns/never-pattern-is-a-read.stderr index d7dc7a47e7283..c415e26f6e277 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/never-pattern-is-a-read.stderr +++ b/tests/ui/rfcs/rfc-0000-never_patterns/never-pattern-is-a-read.stderr @@ -1,20 +1,11 @@ -warning: the feature `never_patterns` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/never-pattern-is-a-read.rs:3:24 - | -LL | #![feature(never_type, never_patterns)] - | ^^^^^^^^^^^^^^ - | - = note: see issue #118155 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0133]: access to union field is unsafe and requires unsafe function or block - --> $DIR/never-pattern-is-a-read.rs:12:16 + --> $DIR/never-pattern-is-a-read.rs:11:16 | LL | let U { a: ! } = u; | ^ access to union field | = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior -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 E0133`. diff --git a/tests/ui/transmutability/dont-assume-err-is-yes-issue-126377.rs b/tests/ui/transmutability/dont-assume-err-is-yes-issue-126377.rs index eeb0777c8566a..67e5760fb242d 100644 --- a/tests/ui/transmutability/dont-assume-err-is-yes-issue-126377.rs +++ b/tests/ui/transmutability/dont-assume-err-is-yes-issue-126377.rs @@ -1,6 +1,5 @@ #![feature(transmutability)] #![feature(generic_const_exprs)] -//~^ WARN the feature `generic_const_exprs` is incomplete use std::mem::{Assume, TransmuteFrom}; diff --git a/tests/ui/transmutability/dont-assume-err-is-yes-issue-126377.stderr b/tests/ui/transmutability/dont-assume-err-is-yes-issue-126377.stderr index 6f7e9e1bfa33c..5c59fb9e175ea 100644 --- a/tests/ui/transmutability/dont-assume-err-is-yes-issue-126377.stderr +++ b/tests/ui/transmutability/dont-assume-err-is-yes-issue-126377.stderr @@ -1,26 +1,17 @@ -warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/dont-assume-err-is-yes-issue-126377.rs:2:12 - | -LL | #![feature(generic_const_exprs)] - | ^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #76560 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0308]: mismatched types - --> $DIR/dont-assume-err-is-yes-issue-126377.rs:14:23 + --> $DIR/dont-assume-err-is-yes-issue-126377.rs:13:23 | LL | is_transmutable::<{}>(); | ^^ expected `bool`, found `()` error[E0277]: the trait bound `(): TransmuteFrom<(), { Assume::SAFETY }>` is not satisfied - --> $DIR/dont-assume-err-is-yes-issue-126377.rs:14:23 + --> $DIR/dont-assume-err-is-yes-issue-126377.rs:13:23 | LL | is_transmutable::<{}>(); | ^^ the nightly-only, unstable trait `TransmuteFrom<(), { Assume::SAFETY }>` is not implemented for `()` | note: required by a bound in `is_transmutable` - --> $DIR/dont-assume-err-is-yes-issue-126377.rs:9:9 + --> $DIR/dont-assume-err-is-yes-issue-126377.rs:8:9 | LL | pub fn is_transmutable() | --------------- required by a bound in this function @@ -28,7 +19,7 @@ LL | where LL | (): TransmuteFrom<(), { Assume::SAFETY }>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_transmutable` -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/transmutability/non_scalar_alignment_value.rs b/tests/ui/transmutability/non_scalar_alignment_value.rs index 45c9e61fcfe28..3b21cdd1c84c3 100644 --- a/tests/ui/transmutability/non_scalar_alignment_value.rs +++ b/tests/ui/transmutability/non_scalar_alignment_value.rs @@ -1,5 +1,4 @@ #![feature(min_generic_const_args)] -//~^ WARN the feature `min_generic_const_args` is incomplete #![feature(transmutability)] diff --git a/tests/ui/transmutability/non_scalar_alignment_value.stderr b/tests/ui/transmutability/non_scalar_alignment_value.stderr index d22c6d0b27e82..99d1852b7790b 100644 --- a/tests/ui/transmutability/non_scalar_alignment_value.stderr +++ b/tests/ui/transmutability/non_scalar_alignment_value.stderr @@ -1,35 +1,26 @@ -warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/non_scalar_alignment_value.rs:1:12 - | -LL | #![feature(min_generic_const_args)] - | ^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #132980 for more information - = note: `#[warn(incomplete_features)]` on by default - error: struct expression with missing field initialiser for `alignment` - --> $DIR/non_scalar_alignment_value.rs:15:32 + --> $DIR/non_scalar_alignment_value.rs:14:32 | LL | alignment: Assume {}, | ^^^^^^^^^ error: struct expression with missing field initialiser for `lifetimes` - --> $DIR/non_scalar_alignment_value.rs:15:32 + --> $DIR/non_scalar_alignment_value.rs:14:32 | LL | alignment: Assume {}, | ^^^^^^^^^ error: struct expression with missing field initialiser for `safety` - --> $DIR/non_scalar_alignment_value.rs:15:32 + --> $DIR/non_scalar_alignment_value.rs:14:32 | LL | alignment: Assume {}, | ^^^^^^^^^ error: struct expression with missing field initialiser for `validity` - --> $DIR/non_scalar_alignment_value.rs:15:32 + --> $DIR/non_scalar_alignment_value.rs:14:32 | LL | alignment: Assume {}, | ^^^^^^^^^ -error: aborting due to 4 previous errors; 1 warning emitted +error: aborting due to 4 previous errors diff --git a/tests/ui/unsafe-binders/binder-sized-crit.rs b/tests/ui/unsafe-binders/binder-sized-crit.rs index 37677c0ef69b9..cda807119ef9b 100644 --- a/tests/ui/unsafe-binders/binder-sized-crit.rs +++ b/tests/ui/unsafe-binders/binder-sized-crit.rs @@ -1,7 +1,6 @@ //@ check-pass #![feature(unsafe_binders)] -//~^ WARN the feature `unsafe_binders` is incomplete use std::unsafe_binder::wrap_binder; diff --git a/tests/ui/unsafe-binders/binder-sized-crit.stderr b/tests/ui/unsafe-binders/binder-sized-crit.stderr deleted file mode 100644 index 3ba6cf2ef8c1d..0000000000000 --- a/tests/ui/unsafe-binders/binder-sized-crit.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `unsafe_binders` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/binder-sized-crit.rs:3:12 - | -LL | #![feature(unsafe_binders)] - | ^^^^^^^^^^^^^^ - | - = note: see issue #130516 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/unsafe-binders/expr.rs b/tests/ui/unsafe-binders/expr.rs index d437d8f8ac07e..9feb29439187d 100644 --- a/tests/ui/unsafe-binders/expr.rs +++ b/tests/ui/unsafe-binders/expr.rs @@ -1,7 +1,6 @@ //@ check-pass #![feature(unsafe_binders)] -//~^ WARN the feature `unsafe_binders` is incomplete use std::unsafe_binder::{wrap_binder, unwrap_binder}; diff --git a/tests/ui/unsafe-binders/expr.stderr b/tests/ui/unsafe-binders/expr.stderr deleted file mode 100644 index 07026e18e1252..0000000000000 --- a/tests/ui/unsafe-binders/expr.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `unsafe_binders` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/expr.rs:3:12 - | -LL | #![feature(unsafe_binders)] - | ^^^^^^^^^^^^^^ - | - = note: see issue #130516 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/unsafe-binders/lifetime-resolution.rs b/tests/ui/unsafe-binders/lifetime-resolution.rs index d243154011947..9935edffaa53f 100644 --- a/tests/ui/unsafe-binders/lifetime-resolution.rs +++ b/tests/ui/unsafe-binders/lifetime-resolution.rs @@ -1,5 +1,4 @@ #![feature(unsafe_binders)] -//~^ WARN the feature `unsafe_binders` is incomplete fn foo<'a>() { let good: unsafe<'b> &'a &'b (); diff --git a/tests/ui/unsafe-binders/lifetime-resolution.stderr b/tests/ui/unsafe-binders/lifetime-resolution.stderr index 69660c271bfc9..2f445e9a02b46 100644 --- a/tests/ui/unsafe-binders/lifetime-resolution.stderr +++ b/tests/ui/unsafe-binders/lifetime-resolution.stderr @@ -1,5 +1,5 @@ error[E0261]: use of undeclared lifetime name `'missing` - --> $DIR/lifetime-resolution.rs:7:28 + --> $DIR/lifetime-resolution.rs:6:28 | LL | let missing: unsafe<> &'missing (); | ^^^^^^^^ undeclared lifetime @@ -15,7 +15,7 @@ LL | fn foo<'missing, 'a>() { | +++++++++ error[E0401]: can't use generic parameters from outer item - --> $DIR/lifetime-resolution.rs:11:30 + --> $DIR/lifetime-resolution.rs:10:30 | LL | fn foo<'a>() { | -- lifetime parameter from outer item @@ -32,16 +32,7 @@ help: consider introducing lifetime `'a` here LL | fn inner<'a, 'b>() { | +++ -warning: the feature `unsafe_binders` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/lifetime-resolution.rs:1:12 - | -LL | #![feature(unsafe_binders)] - | ^^^^^^^^^^^^^^ - | - = note: see issue #130516 for more information - = note: `#[warn(incomplete_features)]` on by default - -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors Some errors have detailed explanations: E0261, E0401. For more information about an error, try `rustc --explain E0261`. diff --git a/tests/ui/unsafe-binders/mismatch.rs b/tests/ui/unsafe-binders/mismatch.rs index 840d938cbe98c..8da94ccebb73f 100644 --- a/tests/ui/unsafe-binders/mismatch.rs +++ b/tests/ui/unsafe-binders/mismatch.rs @@ -1,5 +1,4 @@ #![feature(unsafe_binders)] -//~^ WARN the feature `unsafe_binders` is incomplete use std::unsafe_binder::{wrap_binder, unwrap_binder}; diff --git a/tests/ui/unsafe-binders/mismatch.stderr b/tests/ui/unsafe-binders/mismatch.stderr index f64db92eb655a..5e0720feddf01 100644 --- a/tests/ui/unsafe-binders/mismatch.stderr +++ b/tests/ui/unsafe-binders/mismatch.stderr @@ -1,14 +1,5 @@ -warning: the feature `unsafe_binders` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/mismatch.rs:1:12 - | -LL | #![feature(unsafe_binders)] - | ^^^^^^^^^^^^^^ - | - = note: see issue #130516 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0308]: mismatched types - --> $DIR/mismatch.rs:7:46 + --> $DIR/mismatch.rs:6:46 | LL | let _: unsafe<'a> &'a i32 = wrap_binder!(&()); | ^^^ expected `&i32`, found `&()` @@ -17,7 +8,7 @@ LL | let _: unsafe<'a> &'a i32 = wrap_binder!(&()); found reference `&()` error: `wrap_binder!()` can only wrap into unsafe binder, not `i32` - --> $DIR/mismatch.rs:12:18 + --> $DIR/mismatch.rs:11:18 | LL | let _: i32 = wrap_binder!(&()); | ^^^^^^^^^^^^^^^^^ @@ -26,7 +17,7 @@ LL | let _: i32 = wrap_binder!(&()); = note: this error originates in the macro `wrap_binder` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected unsafe binder, found integer as input of `unwrap_binder!()` - --> $DIR/mismatch.rs:18:20 + --> $DIR/mismatch.rs:17:20 | LL | unwrap_binder!(y); | ^ @@ -34,7 +25,7 @@ LL | unwrap_binder!(y); = note: only an unsafe binder type can be unwrapped error[E0282]: type annotations needed - --> $DIR/mismatch.rs:23:9 + --> $DIR/mismatch.rs:22:9 | LL | let unknown = Default::default(); | ^^^^^^^ @@ -48,12 +39,12 @@ LL | let unknown: /* Type */ = Default::default(); | ++++++++++++ error[E0282]: type annotations needed - --> $DIR/mismatch.rs:29:26 + --> $DIR/mismatch.rs:28:26 | LL | let x = wrap_binder!(&42); | ^^^ cannot infer type -error: aborting due to 5 previous errors; 1 warning emitted +error: aborting due to 5 previous errors Some errors have detailed explanations: E0282, E0308. For more information about an error, try `rustc --explain E0282`. diff --git a/tests/ui/unsafe-binders/moves.rs b/tests/ui/unsafe-binders/moves.rs index 9397c2bc20f97..df2cb2265e663 100644 --- a/tests/ui/unsafe-binders/moves.rs +++ b/tests/ui/unsafe-binders/moves.rs @@ -1,5 +1,4 @@ #![feature(unsafe_binders)] -//~^ WARN the feature `unsafe_binders` is incomplete use std::mem::{ManuallyDrop, drop}; use std::unsafe_binder::{unwrap_binder, wrap_binder}; diff --git a/tests/ui/unsafe-binders/moves.stderr b/tests/ui/unsafe-binders/moves.stderr index bd48015707782..a6d6380a0c52f 100644 --- a/tests/ui/unsafe-binders/moves.stderr +++ b/tests/ui/unsafe-binders/moves.stderr @@ -1,14 +1,5 @@ -warning: the feature `unsafe_binders` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/moves.rs:1:12 - | -LL | #![feature(unsafe_binders)] - | ^^^^^^^^^^^^^^ - | - = note: see issue #130516 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0382]: use of moved value: `base` - --> $DIR/moves.rs:15:14 + --> $DIR/moves.rs:14:14 | LL | let base = NotCopy::default(); | ---- move occurs because `base` has type `ManuallyDrop`, which does not implement the `Copy` trait @@ -18,7 +9,7 @@ LL | drop(base); | ^^^^ value used here after move | note: if `NotCopyInner` implemented `Clone`, you could clone the value - --> $DIR/moves.rs:8:1 + --> $DIR/moves.rs:7:1 | LL | struct NotCopyInner; | ^^^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type @@ -27,7 +18,7 @@ LL | let binder: unsafe<> NotCopy = wrap_binder!(base); | ---- you could clone this value error[E0382]: use of moved value: `binder` - --> $DIR/moves.rs:24:14 + --> $DIR/moves.rs:23:14 | LL | drop(unwrap_binder!(binder)); | ---------------------- value moved here @@ -38,7 +29,7 @@ LL | drop(unwrap_binder!(binder)); = note: this error originates in the macro `unwrap_binder` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0382]: use of moved value: `binder.0` - --> $DIR/moves.rs:36:14 + --> $DIR/moves.rs:35:14 | LL | drop(unwrap_binder!(binder).0); | ------------------------ value moved here @@ -48,6 +39,6 @@ LL | drop(unwrap_binder!(binder).0); | = note: move occurs because `binder.0` has type `ManuallyDrop`, which does not implement the `Copy` trait -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 E0382`. diff --git a/tests/ui/unsafe-binders/simple.rs b/tests/ui/unsafe-binders/simple.rs index 6172a9e1e7bb2..99f20d6b2ec96 100644 --- a/tests/ui/unsafe-binders/simple.rs +++ b/tests/ui/unsafe-binders/simple.rs @@ -1,7 +1,6 @@ //@ check-pass #![feature(unsafe_binders)] -//~^ WARN the feature `unsafe_binders` is incomplete fn main() { let x: unsafe<'a> &'a (); diff --git a/tests/ui/unsafe-binders/simple.stderr b/tests/ui/unsafe-binders/simple.stderr deleted file mode 100644 index e4b82c12b066e..0000000000000 --- a/tests/ui/unsafe-binders/simple.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `unsafe_binders` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/simple.rs:3:12 - | -LL | #![feature(unsafe_binders)] - | ^^^^^^^^^^^^^^ - | - = note: see issue #130516 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted - diff --git a/tests/ui/unsafe-binders/type-mismatch.rs b/tests/ui/unsafe-binders/type-mismatch.rs index 9ac4e817c28b3..22937bb09e827 100644 --- a/tests/ui/unsafe-binders/type-mismatch.rs +++ b/tests/ui/unsafe-binders/type-mismatch.rs @@ -1,5 +1,4 @@ #![feature(unsafe_binders)] -//~^ WARN the feature `unsafe_binders` is incomplete fn main() { let x: unsafe<> i32 = 0; diff --git a/tests/ui/unsafe-binders/type-mismatch.stderr b/tests/ui/unsafe-binders/type-mismatch.stderr index e694b5d464d8e..6262620ff6b0a 100644 --- a/tests/ui/unsafe-binders/type-mismatch.stderr +++ b/tests/ui/unsafe-binders/type-mismatch.stderr @@ -1,14 +1,5 @@ -warning: the feature `unsafe_binders` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-mismatch.rs:1:12 - | -LL | #![feature(unsafe_binders)] - | ^^^^^^^^^^^^^^ - | - = note: see issue #130516 for more information - = note: `#[warn(incomplete_features)]` on by default - error[E0308]: mismatched types - --> $DIR/type-mismatch.rs:5:27 + --> $DIR/type-mismatch.rs:4:27 | LL | let x: unsafe<> i32 = 0; | ------------ ^ expected `unsafe<> i32`, found integer @@ -19,7 +10,7 @@ LL | let x: unsafe<> i32 = 0; found type `{integer}` error[E0308]: mismatched types - --> $DIR/type-mismatch.rs:7:33 + --> $DIR/type-mismatch.rs:6:33 | LL | let x: unsafe<'a> &'a i32 = &0; | ------------------ ^^ expected `unsafe<'a> &i32`, found `&{integer}` @@ -29,6 +20,6 @@ LL | let x: unsafe<'a> &'a i32 = &0; = note: expected unsafe binder `unsafe<'a> &'a i32` found reference `&{integer}` -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 E0308`. diff --git a/tests/ui/unsafe-binders/unsafe-binders-debuginfo.rs b/tests/ui/unsafe-binders/unsafe-binders-debuginfo.rs index 15245d9ba4f23..21f8fe7fdf8fd 100644 --- a/tests/ui/unsafe-binders/unsafe-binders-debuginfo.rs +++ b/tests/ui/unsafe-binders/unsafe-binders-debuginfo.rs @@ -3,7 +3,6 @@ //@ compile-flags: -Cdebuginfo=2 //@ ignore-backends: gcc #![feature(unsafe_binders)] -//~^ WARN the feature `unsafe_binders` is incomplete use std::unsafe_binder::wrap_binder; fn main() { diff --git a/tests/ui/unsafe-binders/unsafe-binders-debuginfo.stderr b/tests/ui/unsafe-binders/unsafe-binders-debuginfo.stderr deleted file mode 100644 index 283b8b9c04f6f..0000000000000 --- a/tests/ui/unsafe-binders/unsafe-binders-debuginfo.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `unsafe_binders` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/unsafe-binders-debuginfo.rs:5:12 - | -LL | #![feature(unsafe_binders)] - | ^^^^^^^^^^^^^^ - | - = note: see issue #130516 for more information - = note: `#[warn(incomplete_features)]` on by default - -warning: 1 warning emitted -