diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index 95663204ec368..88880a6dd58b7 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -24,7 +24,7 @@ use rustc_middle::ty::layout::{LayoutError, LayoutOfHelpers, TyAndLayout}; use rustc_middle::ty::print::{PrintError, PrintTraitRefExt as _, Printer, with_no_trimmed_paths}; use rustc_middle::ty::{self, GenericArg, RegisteredTools, Ty, TyCtxt, TypingEnv, TypingMode}; use rustc_session::lint::{FutureIncompatibleInfo, Lint, LintBuffer, LintExpectationId, LintId}; -use rustc_session::{LintStoreMarker, Session}; +use rustc_session::{DynLintStore, Session}; use rustc_span::edit_distance::find_best_match_for_names; use rustc_span::{Ident, Span, Symbol, sym}; use tracing::debug; @@ -62,7 +62,13 @@ pub struct LintStore { lint_groups: FxIndexMap<&'static str, LintGroup>, } -impl LintStoreMarker for LintStore {} +impl DynLintStore for LintStore { + fn lint_groups_iter(&self) -> Box + '_> { + Box::new(self.get_lint_groups().map(|(name, lints, is_externally_loaded)| { + rustc_session::LintGroup { name, lints, is_externally_loaded } + })) + } +} /// The target of the `by_name` map, which accounts for renaming/deprecation. #[derive(Debug)] diff --git a/compiler/rustc_middle/src/lint.rs b/compiler/rustc_middle/src/lint.rs index 341a735f88fe0..f70b7b6fad7a7 100644 --- a/compiler/rustc_middle/src/lint.rs +++ b/compiler/rustc_middle/src/lint.rs @@ -211,11 +211,28 @@ impl LintExpectation { } fn explain_lint_level_source( + sess: &Session, lint: &'static Lint, level: Level, src: LintLevelSource, err: &mut Diag<'_, ()>, ) { + // Find the name of the lint group that contains the given lint. + // Assumes the lint only belongs to one group. + let lint_group_name = |lint| { + let lint_groups_iter = sess.lint_groups_iter(); + let lint_id = LintId::of(lint); + lint_groups_iter + .filter(|lint_group| !lint_group.is_externally_loaded) + .find(|lint_group| { + lint_group + .lints + .iter() + .find(|lint_group_lint| **lint_group_lint == lint_id) + .is_some() + }) + .map(|lint_group| lint_group.name) + }; let name = lint.name_lower(); if let Level::Allow = level { // Do not point at `#[allow(compat_lint)]` as the reason for a compatibility lint @@ -224,7 +241,15 @@ fn explain_lint_level_source( } match src { LintLevelSource::Default => { - err.note_once(format!("`#[{}({})]` on by default", level.as_str(), name)); + let level_str = level.as_str(); + match lint_group_name(lint) { + Some(group_name) => { + err.note_once(format!("`#[{level_str}({name})]` (part of `#[{level_str}({group_name})]`) on by default")); + } + None => { + err.note_once(format!("`#[{level_str}({name})]` on by default")); + } + } } LintLevelSource::CommandLine(lint_flag_val, orig_level) => { let flag = orig_level.to_cmd_flag(); @@ -427,7 +452,7 @@ pub fn lint_level( decorate(&mut err); } - explain_lint_level_source(lint, level, src, &mut err); + explain_lint_level_source(sess, lint, level, src, &mut err); err.emit() } lint_level_impl(sess, lint, level, span, Box::new(decorate)) diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index bad2581ae31b9..8a7d434ad3ad8 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -44,6 +44,7 @@ use crate::config::{ SwitchWithOptPath, }; use crate::filesearch::FileSearch; +use crate::lint::LintId; use crate::parse::{ParseSess, add_feature_diagnostics}; use crate::search_paths::SearchPath; use crate::{errors, filesearch, lint}; @@ -139,7 +140,10 @@ pub struct CompilerIO { pub temps_dir: Option, } -pub trait LintStoreMarker: Any + DynSync + DynSend {} +pub trait DynLintStore: Any + DynSync + DynSend { + /// Provides a way to access lint groups without depending on `rustc_lint` + fn lint_groups_iter(&self) -> Box + '_>; +} /// Represents the data associated with a compilation /// session for a single crate. @@ -164,7 +168,7 @@ pub struct Session { pub code_stats: CodeStats, /// This only ever stores a `LintStore` but we don't want a dependency on that type here. - pub lint_store: Option>, + pub lint_store: Option>, /// Cap lint level specified by a driver specifically. pub driver_lint_caps: FxHashMap, @@ -240,6 +244,12 @@ impl CodegenUnits { } } +pub struct LintGroup { + pub name: &'static str, + pub lints: Vec, + pub is_externally_loaded: bool, +} + impl Session { pub fn miri_unleashed_feature(&self, span: Span, feature_gate: Option) { self.miri_unleashed_features.lock().push((span, feature_gate)); @@ -603,6 +613,13 @@ impl Session { (&*self.target.staticlib_prefix, &*self.target.staticlib_suffix) } } + + pub fn lint_groups_iter(&self) -> Box + '_> { + match self.lint_store { + Some(ref lint_store) => lint_store.lint_groups_iter(), + None => Box::new(std::iter::empty()), + } + } } // JUSTIFICATION: defn of the suggested wrapper fns diff --git a/src/tools/clippy/tests/ui/checked_unwrap/simple_conditionals.stderr b/src/tools/clippy/tests/ui/checked_unwrap/simple_conditionals.stderr index a4bf00992445e..ec377d75c1c48 100644 --- a/src/tools/clippy/tests/ui/checked_unwrap/simple_conditionals.stderr +++ b/src/tools/clippy/tests/ui/checked_unwrap/simple_conditionals.stderr @@ -330,7 +330,7 @@ LL | if X.is_some() { | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[deny(static_mut_refs)]` on by default + = note: `#[deny(static_mut_refs)]` (part of `#[deny(rust_2024_compatibility)]`) on by default error: aborting due to 36 previous errors diff --git a/tests/ui/associated-consts/associated-const-type-parameters.stderr b/tests/ui/associated-consts/associated-const-type-parameters.stderr index 6ee2a5de1b6ad..c94cffd69c10e 100644 --- a/tests/ui/associated-consts/associated-const-type-parameters.stderr +++ b/tests/ui/associated-consts/associated-const-type-parameters.stderr @@ -4,7 +4,7 @@ warning: trait `Bar` is never used LL | trait Bar: Foo { | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/associated-type-bounds/rpit.stderr b/tests/ui/associated-type-bounds/rpit.stderr index 1091a4c573b02..4c9594569329c 100644 --- a/tests/ui/associated-type-bounds/rpit.stderr +++ b/tests/ui/associated-type-bounds/rpit.stderr @@ -6,7 +6,7 @@ LL | trait Tr2<'a> { fn tr2(self) -> &'a Self; } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/associated-types/associated-types-issue-20220.stderr b/tests/ui/associated-types/associated-types-issue-20220.stderr index c682f46e1409b..572889bbe74cb 100644 --- a/tests/ui/associated-types/associated-types-issue-20220.stderr +++ b/tests/ui/associated-types/associated-types-issue-20220.stderr @@ -4,7 +4,7 @@ warning: trait `IntoIteratorX` is never used LL | trait IntoIteratorX { | ^^^^^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/associated-types/associated-types-nested-projections.stderr b/tests/ui/associated-types/associated-types-nested-projections.stderr index 1b69fcfacf52e..e360d33763939 100644 --- a/tests/ui/associated-types/associated-types-nested-projections.stderr +++ b/tests/ui/associated-types/associated-types-nested-projections.stderr @@ -7,7 +7,7 @@ LL | trait IntoIterator { LL | fn into_iter(self) -> Self::Iter; | ^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.stderr b/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.stderr index c26ed79a026e4..ddfe9eb69679e 100644 --- a/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.stderr +++ b/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.stderr @@ -7,7 +7,7 @@ LL | trait Int LL | fn dummy(&self) { } | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/async-await/issues/issue-54752-async-block.stderr b/tests/ui/async-await/issues/issue-54752-async-block.stderr index 8cc849dd98544..4a2975a4c409d 100644 --- a/tests/ui/async-await/issues/issue-54752-async-block.stderr +++ b/tests/ui/async-await/issues/issue-54752-async-block.stderr @@ -4,7 +4,7 @@ warning: unnecessary parentheses around assigned value LL | fn main() { let _a = (async { }); } | ^ ^ | - = note: `#[warn(unused_parens)]` on by default + = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default help: remove these parentheses | LL - fn main() { let _a = (async { }); } diff --git a/tests/ui/attributes/key-value-expansion-scope.stderr b/tests/ui/attributes/key-value-expansion-scope.stderr index 91a602e57d9e4..1418ebd3c6ec4 100644 --- a/tests/ui/attributes/key-value-expansion-scope.stderr +++ b/tests/ui/attributes/key-value-expansion-scope.stderr @@ -135,7 +135,7 @@ LL | #![doc = in_root!()] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #124535 = help: import `macro_rules` with `use` to make it callable above its definition - = note: `#[warn(out_of_scope_macro_calls)]` on by default + = note: `#[warn(out_of_scope_macro_calls)]` (part of `#[warn(future_incompatible)]`) on by default warning: cannot find macro `in_mod_escape` in the current scope when looking from the crate root --> $DIR/key-value-expansion-scope.rs:4:10 diff --git a/tests/ui/attributes/lint_on_root.stderr b/tests/ui/attributes/lint_on_root.stderr index aaa46e6f54ba0..a4cfa7643b513 100644 --- a/tests/ui/attributes/lint_on_root.stderr +++ b/tests/ui/attributes/lint_on_root.stderr @@ -6,7 +6,7 @@ LL | #![inline = ""] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error diff --git a/tests/ui/auto-traits/auto-traits.stderr b/tests/ui/auto-traits/auto-traits.stderr index 34be8d3f67b8d..1ac1a9922001e 100644 --- a/tests/ui/auto-traits/auto-traits.stderr +++ b/tests/ui/auto-traits/auto-traits.stderr @@ -4,7 +4,7 @@ warning: trait `AutoInner` is never used LL | auto trait AutoInner {} | ^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: trait `AutoUnsafeInner` is never used --> $DIR/auto-traits.rs:23:23 diff --git a/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.stderr b/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.stderr index 4e19fd81735e1..d2a73cc5081e9 100644 --- a/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.stderr +++ b/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.stderr @@ -6,7 +6,7 @@ LL | let sfoo: *mut Foo = &mut SFOO; | = note: for more information, see = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `&raw mut` instead to create a raw pointer | LL | let sfoo: *mut Foo = &raw mut SFOO; diff --git a/tests/ui/borrowck/ice-mutability-error-slicing-121807.stderr b/tests/ui/borrowck/ice-mutability-error-slicing-121807.stderr index 02d5231f7134d..8e1cd800b3721 100644 --- a/tests/ui/borrowck/ice-mutability-error-slicing-121807.stderr +++ b/tests/ui/borrowck/ice-mutability-error-slicing-121807.stderr @@ -21,7 +21,7 @@ LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 - = note: `#[warn(anonymous_parameters)]` on by default + = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default error[E0185]: method `read_dword` has a `&self` declaration in the impl, but not in the trait --> $DIR/ice-mutability-error-slicing-121807.rs:17:5 diff --git a/tests/ui/borrowck/trait-impl-argument-difference-ice.stderr b/tests/ui/borrowck/trait-impl-argument-difference-ice.stderr index a656bb67bcba0..3d54d5269ae2b 100644 --- a/tests/ui/borrowck/trait-impl-argument-difference-ice.stderr +++ b/tests/ui/borrowck/trait-impl-argument-difference-ice.stderr @@ -6,7 +6,7 @@ LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 - = note: `#[warn(anonymous_parameters)]` on by default + = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default error[E0185]: method `read_dword` has a `&self` declaration in the impl, but not in the trait --> $DIR/trait-impl-argument-difference-ice.rs:14:5 diff --git a/tests/ui/cast/cast-rfc0401-vtable-kinds.stderr b/tests/ui/cast/cast-rfc0401-vtable-kinds.stderr index 01277fd632e10..5f5238dd891bb 100644 --- a/tests/ui/cast/cast-rfc0401-vtable-kinds.stderr +++ b/tests/ui/cast/cast-rfc0401-vtable-kinds.stderr @@ -4,7 +4,7 @@ warning: trait `Bar` is never used LL | trait Bar { | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/cast/fat-ptr-cast-rpass.stderr b/tests/ui/cast/fat-ptr-cast-rpass.stderr index d01688e0cc3b0..b314f397c4f1e 100644 --- a/tests/ui/cast/fat-ptr-cast-rpass.stderr +++ b/tests/ui/cast/fat-ptr-cast-rpass.stderr @@ -6,7 +6,7 @@ LL | trait Foo { LL | fn foo(&self) {} | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/closures/2229_closure_analysis/match/issue-87097.stderr b/tests/ui/closures/2229_closure_analysis/match/issue-87097.stderr index 39ec71ba22a18..df6e84c0f65d7 100644 --- a/tests/ui/closures/2229_closure_analysis/match/issue-87097.stderr +++ b/tests/ui/closures/2229_closure_analysis/match/issue-87097.stderr @@ -7,7 +7,7 @@ LL | A, LL | B, | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: unused closure that must be used --> $DIR/issue-87097.rs:17:5 @@ -19,7 +19,7 @@ LL | | }; | |_____^ | = note: closures are lazy and do nothing unless called - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: unused closure that must be used --> $DIR/issue-87097.rs:26:5 diff --git a/tests/ui/closures/issue-1460.stderr b/tests/ui/closures/issue-1460.stderr index 15eaf7a9a11ab..8d6851640f9c6 100644 --- a/tests/ui/closures/issue-1460.stderr +++ b/tests/ui/closures/issue-1460.stderr @@ -5,7 +5,7 @@ LL | {|i: u32| if 1 == i { }}; | ^^^^^^^^^^^^^^^^^^^^^^ | = note: closures are lazy and do nothing unless called - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/closures/old-closure-expr-precedence.stderr b/tests/ui/closures/old-closure-expr-precedence.stderr index fabece1ad4a11..2ab1995075f63 100644 --- a/tests/ui/closures/old-closure-expr-precedence.stderr +++ b/tests/ui/closures/old-closure-expr-precedence.stderr @@ -4,7 +4,7 @@ warning: unnecessary trailing semicolons LL | if (true) { 12; };;; -num; | ^^ help: remove these semicolons | - = note: `#[warn(redundant_semicolons)]` on by default + = note: `#[warn(redundant_semicolons)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coercion/issue-14589.stderr b/tests/ui/coercion/issue-14589.stderr index 5d7b840a8d7db..b98444ab7e401 100644 --- a/tests/ui/coercion/issue-14589.stderr +++ b/tests/ui/coercion/issue-14589.stderr @@ -6,7 +6,7 @@ LL | trait Foo { fn dummy(&self) { }} | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr b/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr index 01694eaf5d11b..41164e99e6d0b 100644 --- a/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr +++ b/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr @@ -9,7 +9,7 @@ LL | impl<'a> Trait for fn(fn(&'a ())) {} = warning: the behavior may change in a future release = note: for more information, see issue #56105 = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details - = note: `#[warn(coherence_leak_check)]` on by default + = note: `#[warn(coherence_leak_check)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/coherence-fn-inputs.stderr b/tests/ui/coherence/coherence-fn-inputs.stderr index 56f3a14833e25..75df33913a97c 100644 --- a/tests/ui/coherence/coherence-fn-inputs.stderr +++ b/tests/ui/coherence/coherence-fn-inputs.stderr @@ -9,7 +9,7 @@ LL | impl Trait for for<'c> fn(&'c u32, &'c u32) { = warning: the behavior may change in a future release = note: for more information, see issue #56105 = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details - = note: `#[warn(coherence_leak_check)]` on by default + = note: `#[warn(coherence_leak_check)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/coherence-subtyping.stderr b/tests/ui/coherence/coherence-subtyping.stderr index 42f256ace78f4..f380ea878291a 100644 --- a/tests/ui/coherence/coherence-subtyping.stderr +++ b/tests/ui/coherence/coherence-subtyping.stderr @@ -10,7 +10,7 @@ LL | impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 { = warning: the behavior may change in a future release = note: for more information, see issue #56105 = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details - = note: `#[warn(coherence_leak_check)]` on by default + = note: `#[warn(coherence_leak_check)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/orphan-check-alias.classic.stderr b/tests/ui/coherence/orphan-check-alias.classic.stderr index 3fd62b05b4df0..25fde6ee1d23d 100644 --- a/tests/ui/coherence/orphan-check-alias.classic.stderr +++ b/tests/ui/coherence/orphan-check-alias.classic.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait2 for ::Assoc { = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/orphan-check-alias.next.stderr b/tests/ui/coherence/orphan-check-alias.next.stderr index 3fd62b05b4df0..25fde6ee1d23d 100644 --- a/tests/ui/coherence/orphan-check-alias.next.stderr +++ b/tests/ui/coherence/orphan-check-alias.next.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait2 for ::Assoc { = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.classic.stderr b/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.classic.stderr index d83a56c0bd0ea..464413e9f38c8 100644 --- a/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.classic.stderr +++ b/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.classic.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait1 for ::Output {} = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.next.stderr b/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.next.stderr index d83a56c0bd0ea..464413e9f38c8 100644 --- a/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.next.stderr +++ b/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.next.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait1 for ::Output {} = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.classic.stderr b/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.classic.stderr index 8964fefedd490..0465fad21194f 100644 --- a/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.classic.stderr +++ b/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.classic.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait0 for <() as Trait>::Assoc {} = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning[E0210]: type parameter `U` must be covered by another type when it appears before the first local type (`LocalTy`) --> $DIR/orphan-check-projections-not-covering-multiple-params.rs:17:9 diff --git a/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.next.stderr b/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.next.stderr index 8964fefedd490..0465fad21194f 100644 --- a/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.next.stderr +++ b/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.next.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait0 for <() as Trait>::Assoc {} = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning[E0210]: type parameter `U` must be covered by another type when it appears before the first local type (`LocalTy`) --> $DIR/orphan-check-projections-not-covering-multiple-params.rs:17:9 diff --git a/tests/ui/coherence/orphan-check-projections-not-covering.classic.stderr b/tests/ui/coherence/orphan-check-projections-not-covering.classic.stderr index 28b8c3f4a94bc..de34ef7cfd3a1 100644 --- a/tests/ui/coherence/orphan-check-projections-not-covering.classic.stderr +++ b/tests/ui/coherence/orphan-check-projections-not-covering.classic.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait0 for ::Output {} = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`) --> $DIR/orphan-check-projections-not-covering.rs:27:6 diff --git a/tests/ui/coherence/orphan-check-projections-not-covering.next.stderr b/tests/ui/coherence/orphan-check-projections-not-covering.next.stderr index 28b8c3f4a94bc..de34ef7cfd3a1 100644 --- a/tests/ui/coherence/orphan-check-projections-not-covering.next.stderr +++ b/tests/ui/coherence/orphan-check-projections-not-covering.next.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait0 for ::Output {} = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`) --> $DIR/orphan-check-projections-not-covering.rs:27:6 diff --git a/tests/ui/coherence/orphan-check-projections-unsat-bounds.classic.stderr b/tests/ui/coherence/orphan-check-projections-unsat-bounds.classic.stderr index 0346a9d665cf5..e729bcf225eb1 100644 --- a/tests/ui/coherence/orphan-check-projections-unsat-bounds.classic.stderr +++ b/tests/ui/coherence/orphan-check-projections-unsat-bounds.classic.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait1 for as Discard>::Output = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/orphan-check-projections-unsat-bounds.next.stderr b/tests/ui/coherence/orphan-check-projections-unsat-bounds.next.stderr index 0346a9d665cf5..e729bcf225eb1 100644 --- a/tests/ui/coherence/orphan-check-projections-unsat-bounds.next.stderr +++ b/tests/ui/coherence/orphan-check-projections-unsat-bounds.next.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait1 for as Discard>::Output = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/const-generics/dyn-supertraits.stderr b/tests/ui/const-generics/dyn-supertraits.stderr index 38b67ef4403a1..2b59cdb9418ca 100644 --- a/tests/ui/const-generics/dyn-supertraits.stderr +++ b/tests/ui/const-generics/dyn-supertraits.stderr @@ -4,7 +4,7 @@ warning: trait `Baz` is never used LL | trait Baz: Foo<3> {} | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: trait `Boz` is never used --> $DIR/dyn-supertraits.rs:26:7 diff --git a/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr b/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr index 6b095f3818a16..23e126d870205 100644 --- a/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr +++ b/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr @@ -24,7 +24,7 @@ LL | [0; size_of::<*mut T>()]; // lint on stable, error with `generic_const_ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #76200 - = note: `#[warn(const_evaluatable_unchecked)]` on by default + = note: `#[warn(const_evaluatable_unchecked)]` (part of `#[warn(future_incompatible)]`) on by default warning: cannot use constants which depend on generic parameters in types --> $DIR/dependence_lint.rs:18:9 diff --git a/tests/ui/const-generics/generic_const_exprs/function-call.stderr b/tests/ui/const-generics/generic_const_exprs/function-call.stderr index 84abfe57876cd..806bc3e89a9f6 100644 --- a/tests/ui/const-generics/generic_const_exprs/function-call.stderr +++ b/tests/ui/const-generics/generic_const_exprs/function-call.stderr @@ -6,7 +6,7 @@ LL | let _ = [0; foo::()]; | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #76200 - = note: `#[warn(const_evaluatable_unchecked)]` on by default + = note: `#[warn(const_evaluatable_unchecked)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr index cf0bdd0e9a150..453079e3c1575 100644 --- a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr +++ b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr @@ -46,7 +46,7 @@ warning: type `v11` should have an upper camel case name LL | pub type v11 = [[usize; v4]; v4]; | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `V11` | - = note: `#[warn(non_camel_case_types)]` on by default + = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default warning: type `v17` should have an upper camel case name --> $DIR/unevaluated-const-ice-119731.rs:16:16 diff --git a/tests/ui/const-generics/invariant.stderr b/tests/ui/const-generics/invariant.stderr index b4e46e5526836..095219f6e5fae 100644 --- a/tests/ui/const-generics/invariant.stderr +++ b/tests/ui/const-generics/invariant.stderr @@ -10,7 +10,7 @@ LL | impl SadBee for fn(&'static ()) { = warning: the behavior may change in a future release = note: for more information, see issue #56105 = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details - = note: `#[warn(coherence_leak_check)]` on by default + = note: `#[warn(coherence_leak_check)]` (part of `#[warn(future_incompatible)]`) on by default error[E0308]: mismatched types --> $DIR/invariant.rs:25:5 diff --git a/tests/ui/const-generics/issues/issue-69654-run-pass.stderr b/tests/ui/const-generics/issues/issue-69654-run-pass.stderr index 7b3cd4f375fd0..abde9a95f89ba 100644 --- a/tests/ui/const-generics/issues/issue-69654-run-pass.stderr +++ b/tests/ui/const-generics/issues/issue-69654-run-pass.stderr @@ -4,7 +4,7 @@ warning: trait `Bar` is never used LL | trait Bar {} | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/const-generics/issues/issue-83466.stderr b/tests/ui/const-generics/issues/issue-83466.stderr index 91451a799b0c2..5a0f5cbd131be 100644 --- a/tests/ui/const-generics/issues/issue-83466.stderr +++ b/tests/ui/const-generics/issues/issue-83466.stderr @@ -9,7 +9,7 @@ LL | S.func::<'a, 10_u32>() | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42868 - = note: `#[warn(late_bound_lifetime_arguments)]` on by default + = note: `#[warn(late_bound_lifetime_arguments)]` (part of `#[warn(future_incompatible)]`) on by default error[E0747]: constant provided when a type was expected --> $DIR/issue-83466.rs:11:18 diff --git a/tests/ui/const-generics/issues/issue-86535-2.stderr b/tests/ui/const-generics/issues/issue-86535-2.stderr index 0ba748365754c..870d97d7d2ebe 100644 --- a/tests/ui/const-generics/issues/issue-86535-2.stderr +++ b/tests/ui/const-generics/issues/issue-86535-2.stderr @@ -4,7 +4,7 @@ warning: struct `Bar` is never constructed LL | struct Bar; | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/const-generics/issues/issue-86535.stderr b/tests/ui/const-generics/issues/issue-86535.stderr index 84d6c1c11ff6a..6bb362de261e9 100644 --- a/tests/ui/const-generics/issues/issue-86535.stderr +++ b/tests/ui/const-generics/issues/issue-86535.stderr @@ -4,7 +4,7 @@ warning: struct `F` is never constructed LL | struct F; | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/const-generics/min_const_generics/complex-expression.stderr b/tests/ui/const-generics/min_const_generics/complex-expression.stderr index 35039bb41090d..ed3fa840cdfed 100644 --- a/tests/ui/const-generics/min_const_generics/complex-expression.stderr +++ b/tests/ui/const-generics/min_const_generics/complex-expression.stderr @@ -69,7 +69,7 @@ LL | let _ = [0; size_of::<*mut T>() + 1]; | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #76200 - = note: `#[warn(const_evaluatable_unchecked)]` on by default + = note: `#[warn(const_evaluatable_unchecked)]` (part of `#[warn(future_incompatible)]`) on by default error: aborting due to 7 previous errors; 1 warning emitted diff --git a/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.stderr b/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.stderr index 8003dfa407172..cf72c0aa0df75 100644 --- a/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.stderr +++ b/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.stderr @@ -6,7 +6,7 @@ LL | [0; std::mem::size_of::<*mut T>()]; | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #76200 - = note: `#[warn(const_evaluatable_unchecked)]` on by default + = note: `#[warn(const_evaluatable_unchecked)]` (part of `#[warn(future_incompatible)]`) on by default warning: cannot use constants which depend on generic parameters in types --> $DIR/const-evaluatable-unchecked.rs:17:21 diff --git a/tests/ui/consts/const-block-item.stderr b/tests/ui/consts/const-block-item.stderr index 04658742b56ce..b325976a60b69 100644 --- a/tests/ui/consts/const-block-item.stderr +++ b/tests/ui/consts/const-block-item.stderr @@ -4,7 +4,7 @@ warning: trait `Value` is never used LL | pub trait Value { | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/consts/const-eval/const_panic_stability.e2018.stderr b/tests/ui/consts/const-eval/const_panic_stability.e2018.stderr index 3553a18d3883c..a188f63793d05 100644 --- a/tests/ui/consts/const-eval/const_panic_stability.e2018.stderr +++ b/tests/ui/consts/const-eval/const_panic_stability.e2018.stderr @@ -6,7 +6,7 @@ LL | panic!({ "foo" }); | = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 = note: for more information, see - = note: `#[warn(non_fmt_panics)]` on by default + = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: add a "{}" format string to `Display` the message | LL | panic!("{}", { "foo" }); diff --git a/tests/ui/consts/const_let_assign2.stderr b/tests/ui/consts/const_let_assign2.stderr index 1bb560437b60e..70316689f2383 100644 --- a/tests/ui/consts/const_let_assign2.stderr +++ b/tests/ui/consts/const_let_assign2.stderr @@ -6,7 +6,7 @@ LL | let ptr = unsafe { &mut BB }; | = note: for more information, see = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `&raw mut` instead to create a raw pointer | LL | let ptr = unsafe { &raw mut BB }; diff --git a/tests/ui/consts/const_refs_to_static-ice-121413.stderr b/tests/ui/consts/const_refs_to_static-ice-121413.stderr index 3980a7e9b93ba..e05396bbee230 100644 --- a/tests/ui/consts/const_refs_to_static-ice-121413.stderr +++ b/tests/ui/consts/const_refs_to_static-ice-121413.stderr @@ -17,7 +17,7 @@ LL | static FOO: Sync = AtomicUsize::new(0); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | static FOO: dyn Sync = AtomicUsize::new(0); diff --git a/tests/ui/consts/packed_pattern.stderr b/tests/ui/consts/packed_pattern.stderr index dc26078fb63ec..83bb3e5b6a7c3 100644 --- a/tests/ui/consts/packed_pattern.stderr +++ b/tests/ui/consts/packed_pattern.stderr @@ -6,7 +6,7 @@ LL | Foo { field: (5, 6, 7, 8) } => {}, LL | FOO => unreachable!(), | ^^^ no value can reach this | - = note: `#[warn(unreachable_patterns)]` on by default + = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/consts/packed_pattern2.stderr b/tests/ui/consts/packed_pattern2.stderr index 013f61f733c9e..8a09e708cb7ce 100644 --- a/tests/ui/consts/packed_pattern2.stderr +++ b/tests/ui/consts/packed_pattern2.stderr @@ -6,7 +6,7 @@ LL | Bar { a: Foo { field: (5, 6) } } => {}, LL | FOO => unreachable!(), | ^^^ no value can reach this | - = note: `#[warn(unreachable_patterns)]` on by default + = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/gen_block_panic.stderr b/tests/ui/coroutine/gen_block_panic.stderr index a0a6d1063c458..a43c9e03691a5 100644 --- a/tests/ui/coroutine/gen_block_panic.stderr +++ b/tests/ui/coroutine/gen_block_panic.stderr @@ -6,7 +6,7 @@ LL | panic!("foo"); LL | yield 69; | ^^^^^^^^^ unreachable statement | - = note: `#[warn(unreachable_code)]` on by default + = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/issue-52398.stderr b/tests/ui/coroutine/issue-52398.stderr index 806690cc33276..b3bf2e4a4e6d6 100644 --- a/tests/ui/coroutine/issue-52398.stderr +++ b/tests/ui/coroutine/issue-52398.stderr @@ -8,7 +8,7 @@ LL | | }; | |_____^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: unused coroutine that must be used --> $DIR/issue-52398.rs:24:18 diff --git a/tests/ui/coroutine/issue-57084.stderr b/tests/ui/coroutine/issue-57084.stderr index 81bd27da91905..0e2359f2f817d 100644 --- a/tests/ui/coroutine/issue-57084.stderr +++ b/tests/ui/coroutine/issue-57084.stderr @@ -11,7 +11,7 @@ LL | | }; | |_____^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/match-bindings.stderr b/tests/ui/coroutine/match-bindings.stderr index 1318e6931f550..98877bbcba5d2 100644 --- a/tests/ui/coroutine/match-bindings.stderr +++ b/tests/ui/coroutine/match-bindings.stderr @@ -11,7 +11,7 @@ LL | | }; | |_____^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/reborrow-mut-upvar.stderr b/tests/ui/coroutine/reborrow-mut-upvar.stderr index a05e84c5f3ef2..a77121a25dc5d 100644 --- a/tests/ui/coroutine/reborrow-mut-upvar.stderr +++ b/tests/ui/coroutine/reborrow-mut-upvar.stderr @@ -12,7 +12,7 @@ LL | | }; | |_____^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/too-live-local-in-immovable-gen.stderr b/tests/ui/coroutine/too-live-local-in-immovable-gen.stderr index 4fad40363001b..0bc6cb603705a 100644 --- a/tests/ui/coroutine/too-live-local-in-immovable-gen.stderr +++ b/tests/ui/coroutine/too-live-local-in-immovable-gen.stderr @@ -9,7 +9,7 @@ LL | | }; | |_________^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/yield-in-args-rev.stderr b/tests/ui/coroutine/yield-in-args-rev.stderr index 10829d661854d..d1650cee6cb01 100644 --- a/tests/ui/coroutine/yield-in-args-rev.stderr +++ b/tests/ui/coroutine/yield-in-args-rev.stderr @@ -9,7 +9,7 @@ LL | | }; | |_____^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/yield-in-initializer.stderr b/tests/ui/coroutine/yield-in-initializer.stderr index eff5a0fdccffe..a01be9e8e73da 100644 --- a/tests/ui/coroutine/yield-in-initializer.stderr +++ b/tests/ui/coroutine/yield-in-initializer.stderr @@ -9,7 +9,7 @@ LL | | }; | |_____^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/yield-subtype.stderr b/tests/ui/coroutine/yield-subtype.stderr index 973415327a5d8..b2bf219822bc7 100644 --- a/tests/ui/coroutine/yield-subtype.stderr +++ b/tests/ui/coroutine/yield-subtype.stderr @@ -9,7 +9,7 @@ LL | | }; | |_____^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/delegation/target-expr-pass.stderr b/tests/ui/delegation/target-expr-pass.stderr index c8d73ec6e5aa6..4924d95208a16 100644 --- a/tests/ui/delegation/target-expr-pass.stderr +++ b/tests/ui/delegation/target-expr-pass.stderr @@ -4,7 +4,7 @@ warning: trait `Trait` is never used LL | trait Trait { | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: struct `F` is never constructed --> $DIR/target-expr-pass.rs:21:8 diff --git a/tests/ui/did_you_mean/bad-assoc-ty.edition2015.stderr b/tests/ui/did_you_mean/bad-assoc-ty.edition2015.stderr index fe1ce5ad18b14..f16b2e690e3eb 100644 --- a/tests/ui/did_you_mean/bad-assoc-ty.edition2015.stderr +++ b/tests/ui/did_you_mean/bad-assoc-ty.edition2015.stderr @@ -187,7 +187,7 @@ LL | type H = Fn(u8) -> (u8)::Output; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | type H = (u8)>::Output; diff --git a/tests/ui/drop/drop-struct-as-object.stderr b/tests/ui/drop/drop-struct-as-object.stderr index 16f6d1110babd..bde4e6074f31d 100644 --- a/tests/ui/drop/drop-struct-as-object.stderr +++ b/tests/ui/drop/drop-struct-as-object.stderr @@ -6,7 +6,7 @@ LL | trait Dummy { LL | fn get(&self) -> usize; | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr index b811ef40c26b4..665432e3abf66 100644 --- a/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr +++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr @@ -6,7 +6,7 @@ LL | fn id(f: Copy) -> usize { | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | fn id(f: dyn Copy) -> usize { diff --git a/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr index 8b4f3f52ee934..f8c67b137b90c 100644 --- a/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr +++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr @@ -6,7 +6,7 @@ LL | trait B { fn f(a: A) -> A; } | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | trait B { fn f(a: dyn A) -> A; } diff --git a/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr index dbfe91e181149..4007c21552c96 100644 --- a/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr +++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr @@ -24,7 +24,7 @@ LL | fn call_this(f: F) : Fn(&str) + call_that {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | fn call_this(f: F) : dyn Fn(&str) + call_that {} diff --git a/tests/ui/dynamically-sized-types/dst-coercions.stderr b/tests/ui/dynamically-sized-types/dst-coercions.stderr index e7c48783df0ee..ebc025a98ccfb 100644 --- a/tests/ui/dynamically-sized-types/dst-coercions.stderr +++ b/tests/ui/dynamically-sized-types/dst-coercions.stderr @@ -6,7 +6,7 @@ LL | trait T { fn dummy(&self) { } } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/editions/never-type-fallback-breaking.e2021.stderr b/tests/ui/editions/never-type-fallback-breaking.e2021.stderr index 6b84a64fffe2d..a9ae21f5f3595 100644 --- a/tests/ui/editions/never-type-fallback-breaking.e2021.stderr +++ b/tests/ui/editions/never-type-fallback-breaking.e2021.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | true => Default::default(), | ^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let x: () = match true { @@ -111,7 +111,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | true => Default::default(), | ^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let x: () = match true { @@ -132,7 +132,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | deserialize()?; | ^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | deserialize::<()>()?; @@ -153,7 +153,7 @@ note: in edition 2024, the requirement `(): From` will fail | LL | help(1)?; | ^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | help::<(), _>(1)?; @@ -174,7 +174,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | takes_apit(|| Default::default())?; | ^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | takes_apit::<()>(|| Default::default())?; @@ -195,7 +195,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | takes_apit2(mk()?); | ^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | takes_apit2(mk::<()>()?); diff --git a/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr b/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr index 7f3022c29233e..e43ce92dff3a0 100644 --- a/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr +++ b/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr @@ -6,7 +6,7 @@ LL | let _ = MyIterator::next; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | let _ = ::next; diff --git a/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.stderr b/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.stderr index d9acdbea3fc02..462819c138f42 100644 --- a/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.stderr +++ b/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.stderr @@ -9,7 +9,7 @@ LL | | )) {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 - = note: `#[warn(anonymous_parameters)]` on by default + = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default help: try naming the parameter or explicitly ignoring it | LL | fn test(x: u32, _: ( diff --git a/tests/ui/expr/if/if-ret.stderr b/tests/ui/expr/if/if-ret.stderr index e5464affd2f15..e53a1e3b08131 100644 --- a/tests/ui/expr/if/if-ret.stderr +++ b/tests/ui/expr/if/if-ret.stderr @@ -6,7 +6,7 @@ LL | fn foo() { if (return) { } } | | | any code following this expression is unreachable | - = note: `#[warn(unreachable_code)]` on by default + = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/extern/no-mangle-associated-fn.stderr b/tests/ui/extern/no-mangle-associated-fn.stderr index 772cbf6cf7dd7..79d8144448f0f 100644 --- a/tests/ui/extern/no-mangle-associated-fn.stderr +++ b/tests/ui/extern/no-mangle-associated-fn.stderr @@ -4,7 +4,7 @@ warning: trait `Bar` is never used LL | trait Bar { | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/feature-gates/feature-gate-repr-simd.stderr b/tests/ui/feature-gates/feature-gate-repr-simd.stderr index 3bf8ec6170597..0f1929038fe00 100644 --- a/tests/ui/feature-gates/feature-gate-repr-simd.stderr +++ b/tests/ui/feature-gates/feature-gate-repr-simd.stderr @@ -49,7 +49,7 @@ LL | #[repr(simd)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default error[E0517]: attribute should be applied to a struct --> $DIR/feature-gate-repr-simd.rs:9:8 @@ -85,5 +85,5 @@ LL | #[repr(simd)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs index 7fb11b7bde73b..d6d3e98a3f0f9 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs @@ -46,7 +46,7 @@ mod inline { #[inline = "2100"] fn f() { } //~^ ERROR valid forms for the attribute are //~| WARN this was previously accepted - //~| NOTE #[deny(ill_formed_attribute_input)]` on by default + //~| NOTE `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default //~| NOTE for more information, see issue #57571 #[inline] struct S; diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr index 1620bf7292293..30e8af4a82453 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr @@ -312,7 +312,7 @@ LL | #[inline = "2100"] fn f() { } | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 38 previous errors diff --git a/tests/ui/fn/error-recovery-mismatch.stderr b/tests/ui/fn/error-recovery-mismatch.stderr index c046302cb91cf..8a9a3653d669c 100644 --- a/tests/ui/fn/error-recovery-mismatch.stderr +++ b/tests/ui/fn/error-recovery-mismatch.stderr @@ -27,7 +27,7 @@ LL | fn fold(&self, _: T, &self._) {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 - = note: `#[warn(anonymous_parameters)]` on by default + = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions --> $DIR/error-recovery-mismatch.rs:11:35 diff --git a/tests/ui/generics/empty-generic-brackets-equiv.stderr b/tests/ui/generics/empty-generic-brackets-equiv.stderr index 151ee4697b4ca..aef4aa7cbf1e8 100644 --- a/tests/ui/generics/empty-generic-brackets-equiv.stderr +++ b/tests/ui/generics/empty-generic-brackets-equiv.stderr @@ -4,7 +4,7 @@ warning: trait `T` is never used LL | trait T<> {} | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/generics/overlapping-errors-span-issue-123861.stderr b/tests/ui/generics/overlapping-errors-span-issue-123861.stderr index 7d08d8fed9f92..7762f6540d3ba 100644 --- a/tests/ui/generics/overlapping-errors-span-issue-123861.stderr +++ b/tests/ui/generics/overlapping-errors-span-issue-123861.stderr @@ -23,7 +23,7 @@ LL | fn mainIterator<_ = _> {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions --> $DIR/overlapping-errors-span-issue-123861.rs:1:21 @@ -43,5 +43,5 @@ LL | fn mainIterator<_ = _> {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/impl-trait/example-st.stderr b/tests/ui/impl-trait/example-st.stderr index f722d7f658215..eb998bf3bb312 100644 --- a/tests/ui/impl-trait/example-st.stderr +++ b/tests/ui/impl-trait/example-st.stderr @@ -4,7 +4,7 @@ warning: trait `Bind` is never used LL | trait Bind { | ^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr b/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr index 418f9acf5899a..28d1b1096dcbd 100644 --- a/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr +++ b/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr @@ -6,7 +6,7 @@ LL | fn ice() -> impl AsRef { | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | fn ice() -> impl AsRef { diff --git a/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr b/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr index d3729b6c97370..8bc3c8b647c08 100644 --- a/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr +++ b/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr @@ -25,7 +25,7 @@ LL | fn iter(&self) -> impl 'a + Iterator> { | = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate = note: we are soliciting feedback, see issue #121718 for more information - = note: `#[warn(refining_impl_trait_reachable)]` on by default + = note: `#[warn(refining_impl_trait_reachable)]` (part of `#[warn(refining_impl_trait)]`) on by default help: replace the return type so that it matches the trait | LL - fn iter(&self) -> impl 'a + Iterator> { diff --git a/tests/ui/impl-trait/in-trait/expeced-refree-to-map-to-reearlybound-ice-108580.stderr b/tests/ui/impl-trait/in-trait/expeced-refree-to-map-to-reearlybound-ice-108580.stderr index 7c064cc717699..0a73a36378601 100644 --- a/tests/ui/impl-trait/in-trait/expeced-refree-to-map-to-reearlybound-ice-108580.stderr +++ b/tests/ui/impl-trait/in-trait/expeced-refree-to-map-to-reearlybound-ice-108580.stderr @@ -9,7 +9,7 @@ LL | fn bar(&self) -> impl Iterator + '_ { | = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate = note: we are soliciting feedback, see issue #121718 for more information - = note: `#[warn(refining_impl_trait_internal)]` on by default + = note: `#[warn(refining_impl_trait_internal)]` (part of `#[warn(refining_impl_trait)]`) on by default help: replace the return type so that it matches the trait | LL | fn bar(&self) -> impl Iterator + '_ { diff --git a/tests/ui/impl-trait/in-trait/refine-captures.stderr b/tests/ui/impl-trait/in-trait/refine-captures.stderr index 6f213f1614499..f7ba99c076342 100644 --- a/tests/ui/impl-trait/in-trait/refine-captures.stderr +++ b/tests/ui/impl-trait/in-trait/refine-captures.stderr @@ -6,7 +6,7 @@ LL | fn test() -> impl Sized + use<> {} | = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate = note: we are soliciting feedback, see issue #121718 for more information - = note: `#[warn(refining_impl_trait_internal)]` on by default + = note: `#[warn(refining_impl_trait_internal)]` (part of `#[warn(refining_impl_trait)]`) on by default help: modify the `use<..>` bound to capture the same lifetimes that the trait does | LL | fn test() -> impl Sized + use<'a> {} diff --git a/tests/ui/impl-trait/type-alias-generic-param.stderr b/tests/ui/impl-trait/type-alias-generic-param.stderr index e4115dc1319d1..0a063eed25735 100644 --- a/tests/ui/impl-trait/type-alias-generic-param.stderr +++ b/tests/ui/impl-trait/type-alias-generic-param.stderr @@ -4,7 +4,7 @@ warning: trait `Meow` is never used LL | trait Meow { | ^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/impl-trait/where-allowed.stderr b/tests/ui/impl-trait/where-allowed.stderr index 052ae5a99315c..f77aa28766adc 100644 --- a/tests/ui/impl-trait/where-allowed.stderr +++ b/tests/ui/impl-trait/where-allowed.stderr @@ -376,7 +376,7 @@ LL | fn in_method_generic_param_default(_: T) {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions --> $DIR/where-allowed.rs:239:7 @@ -444,7 +444,7 @@ LL | fn in_method_generic_param_default(_: T) {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions @@ -455,5 +455,5 @@ LL | impl T {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/imports/ambiguous-1.stderr b/tests/ui/imports/ambiguous-1.stderr index 61b3077c354e5..03ac26bcf3c64 100644 --- a/tests/ui/imports/ambiguous-1.stderr +++ b/tests/ui/imports/ambiguous-1.stderr @@ -30,7 +30,7 @@ note: `id` could also refer to the function imported here LL | pub use self::handwritten::*; | ^^^^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `id` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default warning: 2 warnings emitted diff --git a/tests/ui/imports/ambiguous-10.stderr b/tests/ui/imports/ambiguous-10.stderr index 704af616b4385..f4be662c6489b 100644 --- a/tests/ui/imports/ambiguous-10.stderr +++ b/tests/ui/imports/ambiguous-10.stderr @@ -19,7 +19,7 @@ note: `Token` could also refer to the enum imported here LL | use crate::b::*; | ^^^^^^^^^^^ = help: consider adding an explicit import of `Token` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/imports/ambiguous-12.stderr b/tests/ui/imports/ambiguous-12.stderr index 4725c38849c27..593dfccd5bc52 100644 --- a/tests/ui/imports/ambiguous-12.stderr +++ b/tests/ui/imports/ambiguous-12.stderr @@ -19,7 +19,7 @@ note: `b` could also refer to the function imported here LL | use crate::public::*; | ^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `b` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/imports/ambiguous-13.stderr b/tests/ui/imports/ambiguous-13.stderr index 3e78100b658f0..d063ec8985967 100644 --- a/tests/ui/imports/ambiguous-13.stderr +++ b/tests/ui/imports/ambiguous-13.stderr @@ -19,7 +19,7 @@ note: `Rect` could also refer to the struct imported here LL | use crate::content::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `Rect` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/imports/ambiguous-14.stderr b/tests/ui/imports/ambiguous-14.stderr index bece585366826..4b0428362c6a0 100644 --- a/tests/ui/imports/ambiguous-14.stderr +++ b/tests/ui/imports/ambiguous-14.stderr @@ -19,7 +19,7 @@ note: `foo` could also refer to the function imported here LL | pub use b::*; | ^^^^ = help: consider adding an explicit import of `foo` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/imports/ambiguous-15.stderr b/tests/ui/imports/ambiguous-15.stderr index 838256752d0ca..0c01f0ce5b3e2 100644 --- a/tests/ui/imports/ambiguous-15.stderr +++ b/tests/ui/imports/ambiguous-15.stderr @@ -19,7 +19,7 @@ note: `Error` could also refer to the enum imported here LL | pub use t2::*; | ^^^^^ = help: consider adding an explicit import of `Error` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/imports/ambiguous-16.stderr b/tests/ui/imports/ambiguous-16.stderr index 7366cabc47a61..97394f17eecb9 100644 --- a/tests/ui/imports/ambiguous-16.stderr +++ b/tests/ui/imports/ambiguous-16.stderr @@ -19,7 +19,7 @@ note: `ConfirmedTranscriptHashInput` could also refer to the struct imported her LL | pub use self::public_message_in::*; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `ConfirmedTranscriptHashInput` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/imports/ambiguous-17.stderr b/tests/ui/imports/ambiguous-17.stderr index 55bc01095c7b0..da8901e6e0009 100644 --- a/tests/ui/imports/ambiguous-17.stderr +++ b/tests/ui/imports/ambiguous-17.stderr @@ -29,7 +29,7 @@ note: `id` could also refer to the function imported here LL | pub use handwritten::*; | ^^^^^^^^^^^^^^ = help: consider adding an explicit import of `id` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default warning: 2 warnings emitted diff --git a/tests/ui/imports/ambiguous-3.stderr b/tests/ui/imports/ambiguous-3.stderr index f019f6d895749..d3104be8664fa 100644 --- a/tests/ui/imports/ambiguous-3.stderr +++ b/tests/ui/imports/ambiguous-3.stderr @@ -19,7 +19,7 @@ note: `x` could also refer to the function imported here LL | pub use self::c::*; | ^^^^^^^^^^ = help: consider adding an explicit import of `x` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/imports/ambiguous-4-extern.stderr b/tests/ui/imports/ambiguous-4-extern.stderr index 0011973212bc6..f03ea872448ea 100644 --- a/tests/ui/imports/ambiguous-4-extern.stderr +++ b/tests/ui/imports/ambiguous-4-extern.stderr @@ -29,7 +29,7 @@ note: `id` could also refer to the function imported here LL | pub use handwritten::*; | ^^^^^^^^^^^^^^ = help: consider adding an explicit import of `id` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default warning: 2 warnings emitted diff --git a/tests/ui/imports/ambiguous-5.stderr b/tests/ui/imports/ambiguous-5.stderr index 4bc35f86d3ad1..9b23851947a77 100644 --- a/tests/ui/imports/ambiguous-5.stderr +++ b/tests/ui/imports/ambiguous-5.stderr @@ -19,7 +19,7 @@ note: `Class` could also refer to the struct imported here LL | use super::gsubgpos::*; | ^^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `Class` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/imports/ambiguous-6.stderr b/tests/ui/imports/ambiguous-6.stderr index d7871a0b8cbe3..117fde1f1ff14 100644 --- a/tests/ui/imports/ambiguous-6.stderr +++ b/tests/ui/imports/ambiguous-6.stderr @@ -19,7 +19,7 @@ note: `C` could also refer to the constant imported here LL | pub use mod2::*; | ^^^^^^^ = help: consider adding an explicit import of `C` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/imports/ambiguous-9.stderr b/tests/ui/imports/ambiguous-9.stderr index 6c7d79174daf6..d7cfe042b7273 100644 --- a/tests/ui/imports/ambiguous-9.stderr +++ b/tests/ui/imports/ambiguous-9.stderr @@ -29,7 +29,7 @@ note: `date_range` could also refer to the function imported here LL | use super::prelude::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `date_range` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default warning: ambiguous glob re-exports --> $DIR/ambiguous-9.rs:16:13 diff --git a/tests/ui/imports/duplicate.stderr b/tests/ui/imports/duplicate.stderr index f7dc7312b9da6..0db89d34734d2 100644 --- a/tests/ui/imports/duplicate.stderr +++ b/tests/ui/imports/duplicate.stderr @@ -89,7 +89,7 @@ note: `foo` could also refer to the function imported here LL | pub use crate::b::*; | ^^^^^^^^^^^ = help: consider adding an explicit import of `foo` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default error: aborting due to 4 previous errors; 1 warning emitted diff --git a/tests/ui/imports/local-modularized-tricky-fail-2.stderr b/tests/ui/imports/local-modularized-tricky-fail-2.stderr index 49f5c72947f43..344446b6b4df1 100644 --- a/tests/ui/imports/local-modularized-tricky-fail-2.stderr +++ b/tests/ui/imports/local-modularized-tricky-fail-2.stderr @@ -16,7 +16,7 @@ LL | | } ... LL | define_exported!(); | ------------------ in this macro invocation - = note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` on by default + = note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the macro `define_exported` (in Nightly builds, run with -Z macro-backtrace for more info) error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths diff --git a/tests/ui/imports/unresolved-seg-after-ambiguous.stderr b/tests/ui/imports/unresolved-seg-after-ambiguous.stderr index 9e0efd4a75f84..0b99fab69f810 100644 --- a/tests/ui/imports/unresolved-seg-after-ambiguous.stderr +++ b/tests/ui/imports/unresolved-seg-after-ambiguous.stderr @@ -25,7 +25,7 @@ note: `E` could also refer to the struct imported here LL | pub use self::d::*; | ^^^^^^^^^^ = help: consider adding an explicit import of `E` to disambiguate - = note: `#[warn(ambiguous_glob_imports)]` on by default + = note: `#[warn(ambiguous_glob_imports)]` (part of `#[warn(future_incompatible)]`) on by default error: aborting due to 1 previous error; 1 warning emitted diff --git a/tests/ui/inference/inference-variable-behind-raw-pointer.stderr b/tests/ui/inference/inference-variable-behind-raw-pointer.stderr index 3dea09e7f5282..fe4e16c332869 100644 --- a/tests/ui/inference/inference-variable-behind-raw-pointer.stderr +++ b/tests/ui/inference/inference-variable-behind-raw-pointer.stderr @@ -6,7 +6,7 @@ LL | if data.is_null() {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #46906 - = note: `#[warn(tyvar_behind_raw_pointer)]` on by default + = note: `#[warn(tyvar_behind_raw_pointer)]` (part of `#[warn(rust_2018_compatibility)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/inference/inference_unstable.stderr b/tests/ui/inference/inference_unstable.stderr index 395dcb2661f11..0072175d51403 100644 --- a/tests/ui/inference/inference_unstable.stderr +++ b/tests/ui/inference/inference_unstable.stderr @@ -7,7 +7,7 @@ LL | assert_eq!('x'.ipu_flatten(), 1); = warning: once this associated item is added to the standard library, the ambiguity may cause an error or change in behavior! = note: for more information, see issue #48919 = help: call with fully qualified syntax `inference_unstable_itertools::IpuItertools::ipu_flatten(...)` to keep using the current method - = note: `#[warn(unstable_name_collisions)]` on by default + = note: `#[warn(unstable_name_collisions)]` (part of `#[warn(future_incompatible)]`) on by default help: add `#![feature(ipu_flatten)]` to the crate attributes to enable `inference_unstable_iterator::IpuIterator::ipu_flatten` | LL + #![feature(ipu_flatten)] diff --git a/tests/ui/issues/issue-11958.stderr b/tests/ui/issues/issue-11958.stderr index 5dca4c2f01d56..feb4399c9adf2 100644 --- a/tests/ui/issues/issue-11958.stderr +++ b/tests/ui/issues/issue-11958.stderr @@ -5,7 +5,7 @@ LL | let _thunk = Box::new(move|| { x = 2; }); | ^ | = help: maybe it is overwritten before being read? - = note: `#[warn(unused_assignments)]` on by default + = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default warning: unused variable: `x` --> $DIR/issue-11958.rs:8:36 @@ -14,7 +14,7 @@ LL | let _thunk = Box::new(move|| { x = 2; }); | ^ | = help: did you mean to capture by reference instead? - = note: `#[warn(unused_variables)]` on by default + = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default warning: 2 warnings emitted diff --git a/tests/ui/issues/issue-14399.stderr b/tests/ui/issues/issue-14399.stderr index 5821c3cc3899a..4783cba62eb02 100644 --- a/tests/ui/issues/issue-14399.stderr +++ b/tests/ui/issues/issue-14399.stderr @@ -6,7 +6,7 @@ LL | trait A { fn foo(&self) {} } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-15858.stderr b/tests/ui/issues/issue-15858.stderr index 0c082cc086218..b34de5a1ce7fe 100644 --- a/tests/ui/issues/issue-15858.stderr +++ b/tests/ui/issues/issue-15858.stderr @@ -6,7 +6,7 @@ LL | trait Bar { LL | fn do_something(&mut self); | ^^^^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-16256.stderr b/tests/ui/issues/issue-16256.stderr index 75c3ec1bd1c7f..972b1716d22fe 100644 --- a/tests/ui/issues/issue-16256.stderr +++ b/tests/ui/issues/issue-16256.stderr @@ -5,7 +5,7 @@ LL | |c: u8| buf.push(c); | ^^^^^^^^^^^^^^^^^^^ | = note: closures are lazy and do nothing unless called - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-17351.stderr b/tests/ui/issues/issue-17351.stderr index e4c84ab9315ab..043d4ffc78082 100644 --- a/tests/ui/issues/issue-17351.stderr +++ b/tests/ui/issues/issue-17351.stderr @@ -6,7 +6,7 @@ LL | trait Str { fn foo(&self) {} } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-20055-box-trait.stderr b/tests/ui/issues/issue-20055-box-trait.stderr index db9d359e2252c..b1cbb2a571733 100644 --- a/tests/ui/issues/issue-20055-box-trait.stderr +++ b/tests/ui/issues/issue-20055-box-trait.stderr @@ -6,7 +6,7 @@ LL | trait Boo { LL | fn dummy(&self) { } | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-23485.stderr b/tests/ui/issues/issue-23485.stderr index ed2d2400d0d93..7ad518e449bd9 100644 --- a/tests/ui/issues/issue-23485.stderr +++ b/tests/ui/issues/issue-23485.stderr @@ -7,7 +7,7 @@ LL | trait Iterator { LL | fn clone_first(mut self) -> Option<::Target> where | ^^^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-26812.stderr b/tests/ui/issues/issue-26812.stderr index bb60d67e2876e..01230dc547f09 100644 --- a/tests/ui/issues/issue-26812.stderr +++ b/tests/ui/issues/issue-26812.stderr @@ -12,7 +12,7 @@ LL | fn avg(_: T) {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 2 previous errors @@ -26,5 +26,5 @@ LL | fn avg(_: T) {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/issues/issue-28344.stderr b/tests/ui/issues/issue-28344.stderr index 7bc965536e9a1..d45e7163b8e1b 100644 --- a/tests/ui/issues/issue-28344.stderr +++ b/tests/ui/issues/issue-28344.stderr @@ -6,7 +6,7 @@ LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | let x: u8 = ::bitor(0 as u8, 0 as u8); diff --git a/tests/ui/issues/issue-2989.stderr b/tests/ui/issues/issue-2989.stderr index 57181607cecd3..500ace8f2753e 100644 --- a/tests/ui/issues/issue-2989.stderr +++ b/tests/ui/issues/issue-2989.stderr @@ -4,7 +4,7 @@ warning: trait `methods` is never used LL | trait methods { | ^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-34503.stderr b/tests/ui/issues/issue-34503.stderr index 60d8d76a61965..1877e20bbc14d 100644 --- a/tests/ui/issues/issue-34503.stderr +++ b/tests/ui/issues/issue-34503.stderr @@ -8,7 +8,7 @@ LL | fn foo(&self) where (T, Option): Ord {} LL | fn bar(&self, x: &Option) -> bool | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-39367.stderr b/tests/ui/issues/issue-39367.stderr index df21c09983e26..1a6b4b5706c77 100644 --- a/tests/ui/issues/issue-39367.stderr +++ b/tests/ui/issues/issue-39367.stderr @@ -11,7 +11,7 @@ LL | | }); | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-47094.stderr b/tests/ui/issues/issue-47094.stderr index 1c6693403b85b..da414d68214a8 100644 --- a/tests/ui/issues/issue-47094.stderr +++ b/tests/ui/issues/issue-47094.stderr @@ -6,7 +6,7 @@ LL | #[repr(C, u8)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default error[E0566]: conflicting representation hints --> $DIR/issue-47094.rs:8:8 @@ -32,7 +32,7 @@ LL | #[repr(C, u8)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error[E0566]: conflicting representation hints @@ -46,5 +46,5 @@ LL | #[repr(u8)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/issues/issue-58734.stderr b/tests/ui/issues/issue-58734.stderr index e5dad000b510a..13c83a45a47ae 100644 --- a/tests/ui/issues/issue-58734.stderr +++ b/tests/ui/issues/issue-58734.stderr @@ -6,7 +6,7 @@ LL | Trait::nonexistent(()); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | ::nonexistent(()); diff --git a/tests/ui/issues/issue-72278.stderr b/tests/ui/issues/issue-72278.stderr index 5468837a30591..91efada3d8d12 100644 --- a/tests/ui/issues/issue-72278.stderr +++ b/tests/ui/issues/issue-72278.stderr @@ -9,7 +9,7 @@ LL | S.func::<'a, U>() | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42868 - = note: `#[warn(late_bound_lifetime_arguments)]` on by default + = note: `#[warn(late_bound_lifetime_arguments)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-7575.stderr b/tests/ui/issues/issue-7575.stderr index 2f987d19c80ce..4fc93f96b70a6 100644 --- a/tests/ui/issues/issue-7575.stderr +++ b/tests/ui/issues/issue-7575.stderr @@ -4,7 +4,7 @@ warning: trait `Foo` is never used LL | trait Foo { | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-7911.stderr b/tests/ui/issues/issue-7911.stderr index ead7ee191ac9b..1a08411828004 100644 --- a/tests/ui/issues/issue-7911.stderr +++ b/tests/ui/issues/issue-7911.stderr @@ -6,7 +6,7 @@ LL | trait FooBar { LL | fn dummy(&self) { } | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-8248.stderr b/tests/ui/issues/issue-8248.stderr index 8570bfaefadbe..898e541573281 100644 --- a/tests/ui/issues/issue-8248.stderr +++ b/tests/ui/issues/issue-8248.stderr @@ -6,7 +6,7 @@ LL | trait A { LL | fn dummy(&self) { } | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-86756.stderr b/tests/ui/issues/issue-86756.stderr index 0f68b7648503c..9e72a6cb1cc67 100644 --- a/tests/ui/issues/issue-86756.stderr +++ b/tests/ui/issues/issue-86756.stderr @@ -20,7 +20,7 @@ LL | eq:: | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | eq:: diff --git a/tests/ui/issues/issue-9951.stderr b/tests/ui/issues/issue-9951.stderr index 62ed9f3e0cc07..83c4f4cee2757 100644 --- a/tests/ui/issues/issue-9951.stderr +++ b/tests/ui/issues/issue-9951.stderr @@ -6,7 +6,7 @@ LL | trait Bar { LL | fn noop(&self); | ^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/iterators/into-iter-on-arrays-2018.stderr b/tests/ui/iterators/into-iter-on-arrays-2018.stderr index d4055c74f7cef..ad368012529f6 100644 --- a/tests/ui/iterators/into-iter-on-arrays-2018.stderr +++ b/tests/ui/iterators/into-iter-on-arrays-2018.stderr @@ -6,7 +6,7 @@ LL | let _: Iter<'_, i32> = array.into_iter(); | = warning: this changes meaning in Rust 2021 = note: for more information, see - = note: `#[warn(array_into_iter)]` on by default + = note: `#[warn(array_into_iter)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL - let _: Iter<'_, i32> = array.into_iter(); diff --git a/tests/ui/iterators/into-iter-on-arrays-lint.stderr b/tests/ui/iterators/into-iter-on-arrays-lint.stderr index fb8fe79c7c966..8087edcd51e4f 100644 --- a/tests/ui/iterators/into-iter-on-arrays-lint.stderr +++ b/tests/ui/iterators/into-iter-on-arrays-lint.stderr @@ -6,7 +6,7 @@ LL | small.into_iter(); | = warning: this changes meaning in Rust 2021 = note: for more information, see - = note: `#[warn(array_into_iter)]` on by default + = note: `#[warn(array_into_iter)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL - small.into_iter(); diff --git a/tests/ui/iterators/into-iter-on-boxed-slices-2021.stderr b/tests/ui/iterators/into-iter-on-boxed-slices-2021.stderr index 7a5a2be5ef068..f7cb90e10cd78 100644 --- a/tests/ui/iterators/into-iter-on-boxed-slices-2021.stderr +++ b/tests/ui/iterators/into-iter-on-boxed-slices-2021.stderr @@ -6,7 +6,7 @@ LL | let _: Iter<'_, i32> = boxed_slice.into_iter(); | = warning: this changes meaning in Rust 2024 = note: for more information, see - = note: `#[warn(boxed_slice_into_iter)]` on by default + = note: `#[warn(boxed_slice_into_iter)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL - let _: Iter<'_, i32> = boxed_slice.into_iter(); diff --git a/tests/ui/iterators/into-iter-on-boxed-slices-lint.stderr b/tests/ui/iterators/into-iter-on-boxed-slices-lint.stderr index 6762ed28d368a..5b48370f874dd 100644 --- a/tests/ui/iterators/into-iter-on-boxed-slices-lint.stderr +++ b/tests/ui/iterators/into-iter-on-boxed-slices-lint.stderr @@ -6,7 +6,7 @@ LL | boxed.into_iter(); | = warning: this changes meaning in Rust 2024 = note: for more information, see - = note: `#[warn(boxed_slice_into_iter)]` on by default + = note: `#[warn(boxed_slice_into_iter)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL - boxed.into_iter(); diff --git a/tests/ui/lang-items/issue-83471.stderr b/tests/ui/lang-items/issue-83471.stderr index e913c0bf10fd0..28fa552fbeb4d 100644 --- a/tests/ui/lang-items/issue-83471.stderr +++ b/tests/ui/lang-items/issue-83471.stderr @@ -48,7 +48,7 @@ LL | fn call(export_name); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 - = note: `#[warn(anonymous_parameters)]` on by default + = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default error[E0718]: `fn` lang item must be applied to a trait with 1 generic argument --> $DIR/issue-83471.rs:19:1 diff --git a/tests/ui/lifetimes/unusual-rib-combinations.stderr b/tests/ui/lifetimes/unusual-rib-combinations.stderr index 7373ca8cf8434..959274262730d 100644 --- a/tests/ui/lifetimes/unusual-rib-combinations.stderr +++ b/tests/ui/lifetimes/unusual-rib-combinations.stderr @@ -30,7 +30,7 @@ LL | fn c() {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default error[E0308]: mismatched types --> $DIR/unusual-rib-combinations.rs:5:16 @@ -51,5 +51,5 @@ LL | fn c() {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/link-native-libs/link-attr-validation-early.stderr b/tests/ui/link-native-libs/link-attr-validation-early.stderr index 24ad9d825f8d3..1616c427b7198 100644 --- a/tests/ui/link-native-libs/link-attr-validation-early.stderr +++ b/tests/ui/link-native-libs/link-attr-validation-early.stderr @@ -6,7 +6,7 @@ LL | #[link] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]` --> $DIR/link-attr-validation-early.rs:4:1 diff --git a/tests/ui/lint/bare-trait-objects-path.stderr b/tests/ui/lint/bare-trait-objects-path.stderr index 25f3e857806f2..c07ad27cb0ab5 100644 --- a/tests/ui/lint/bare-trait-objects-path.stderr +++ b/tests/ui/lint/bare-trait-objects-path.stderr @@ -6,7 +6,7 @@ LL | Dyn::func(); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | ::func(); diff --git a/tests/ui/lint/default-groups-issue-65464.rs b/tests/ui/lint/default-groups-issue-65464.rs new file mode 100644 index 0000000000000..5db7cc02baade --- /dev/null +++ b/tests/ui/lint/default-groups-issue-65464.rs @@ -0,0 +1,22 @@ +//@ check-pass + +// Verify information about membership to builtin lint group is included in the lint message when +// explaining lint level and source for builtin lints with default settings. +// +// Ideally, we'd like to use lints that are part of `unused` group as shown in the issue. +// This is not possible in a ui test, because `unused` lints are enabled with `-A unused` +// in such tests, and the we're testing a scenario with no modification to the default settings. + +fn main() { + // additional context is provided only if the level is not explicitly set + let WrongCase = 1; + //~^ WARN [non_snake_case] + //~| NOTE `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default + + // unchanged message if the level is explicitly set + // even if the level is the same as the default + #[warn(nonstandard_style)] //~ NOTE the lint level is defined here + let WrongCase = 2; + //~^ WARN [non_snake_case] + //~| NOTE `#[warn(non_snake_case)]` implied by `#[warn(nonstandard_style)]` +} diff --git a/tests/ui/lint/default-groups-issue-65464.stderr b/tests/ui/lint/default-groups-issue-65464.stderr new file mode 100644 index 0000000000000..c106ecbf7b92b --- /dev/null +++ b/tests/ui/lint/default-groups-issue-65464.stderr @@ -0,0 +1,23 @@ +warning: variable `WrongCase` should have a snake case name + --> $DIR/default-groups-issue-65464.rs:12:9 + | +LL | let WrongCase = 1; + | ^^^^^^^^^ help: convert the identifier to snake case: `wrong_case` + | + = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default + +warning: variable `WrongCase` should have a snake case name + --> $DIR/default-groups-issue-65464.rs:19:9 + | +LL | let WrongCase = 2; + | ^^^^^^^^^ help: convert the identifier to snake case: `wrong_case` + | +note: the lint level is defined here + --> $DIR/default-groups-issue-65464.rs:18:12 + | +LL | #[warn(nonstandard_style)] + | ^^^^^^^^^^^^^^^^^ + = note: `#[warn(non_snake_case)]` implied by `#[warn(nonstandard_style)]` + +warning: 2 warnings emitted + diff --git a/tests/ui/lint/forbid-group-member.stderr b/tests/ui/lint/forbid-group-member.stderr index 2e0147693f333..54f56ecbe64a8 100644 --- a/tests/ui/lint/forbid-group-member.stderr +++ b/tests/ui/lint/forbid-group-member.stderr @@ -9,7 +9,7 @@ LL | #[allow(unused_variables)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #81670 - = note: `#[warn(forbidden_lint_groups)]` on by default + = note: `#[warn(forbidden_lint_groups)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted @@ -25,5 +25,5 @@ LL | #[allow(unused_variables)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #81670 - = note: `#[warn(forbidden_lint_groups)]` on by default + = note: `#[warn(forbidden_lint_groups)]` (part of `#[warn(future_incompatible)]`) on by default diff --git a/tests/ui/lint/future-incompatible-lint-group.stderr b/tests/ui/lint/future-incompatible-lint-group.stderr index 87b9ebec08b37..4157cd0c77d94 100644 --- a/tests/ui/lint/future-incompatible-lint-group.stderr +++ b/tests/ui/lint/future-incompatible-lint-group.stderr @@ -6,7 +6,7 @@ LL | fn f(u8) {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 - = note: `#[warn(anonymous_parameters)]` on by default + = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default error: ambiguous associated item --> $DIR/future-incompatible-lint-group.rs:18:17 diff --git a/tests/ui/lint/let_underscore/let_underscore_lock.stderr b/tests/ui/lint/let_underscore/let_underscore_lock.stderr index a54a23e364b3b..d70dab32e3e08 100644 --- a/tests/ui/lint/let_underscore/let_underscore_lock.stderr +++ b/tests/ui/lint/let_underscore/let_underscore_lock.stderr @@ -4,7 +4,7 @@ error: non-binding let on a synchronization lock LL | let _ = data.lock().unwrap(); | ^ this lock is not assigned to a binding and is immediately dropped | - = note: `#[deny(let_underscore_lock)]` on by default + = note: `#[deny(let_underscore_lock)]` (part of `#[deny(let_underscore)]`) on by default help: consider binding to an unused variable to avoid immediately dropping the value | LL | let _unused = data.lock().unwrap(); diff --git a/tests/ui/lint/lint-non-uppercase-usages.stderr b/tests/ui/lint/lint-non-uppercase-usages.stderr index 7c7e573a88edc..afe573ffc07ae 100644 --- a/tests/ui/lint/lint-non-uppercase-usages.stderr +++ b/tests/ui/lint/lint-non-uppercase-usages.stderr @@ -4,7 +4,7 @@ warning: constant `my_static` should have an upper case name LL | const my_static: u32 = 0; | ^^^^^^^^^ | - = note: `#[warn(non_upper_case_globals)]` on by default + = note: `#[warn(non_upper_case_globals)]` (part of `#[warn(nonstandard_style)]`) on by default help: convert the identifier to upper case | LL - const my_static: u32 = 0; diff --git a/tests/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr b/tests/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr index 000545a060075..1ba4deded461c 100644 --- a/tests/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr +++ b/tests/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr @@ -33,7 +33,7 @@ warning: constant `µ` should have an upper case name LL | const µ: f64 = 0.000001; | ^ help: convert the identifier to upper case: `Μ` | - = note: `#[warn(non_upper_case_globals)]` on by default + = note: `#[warn(non_upper_case_globals)]` (part of `#[warn(nonstandard_style)]`) on by default error: aborting due to 3 previous errors; 1 warning emitted diff --git a/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.stderr b/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.stderr index 0fec4996f1a0a..efffb39b40503 100644 --- a/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.stderr +++ b/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.stderr @@ -9,7 +9,7 @@ LL | _ => foo!() | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79813 - = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default + = note: `#[warn(semicolon_in_expressions_from_macros)]` (part of `#[warn(future_incompatible)]`) on by default = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) warning: 1 warning emitted @@ -26,6 +26,6 @@ LL | _ => foo!() | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79813 - = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default + = note: `#[warn(semicolon_in_expressions_from_macros)]` (part of `#[warn(future_incompatible)]`) on by default = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/lint/special-upper-lower-cases.stderr b/tests/ui/lint/special-upper-lower-cases.stderr index 2aa13c33be3a6..0f5cf336aec2d 100644 --- a/tests/ui/lint/special-upper-lower-cases.stderr +++ b/tests/ui/lint/special-upper-lower-cases.stderr @@ -4,7 +4,7 @@ warning: type `𝕟𝕠𝕥𝕒𝕔𝕒𝕞𝕖𝕝` should have an upper camel LL | struct 𝕟𝕠𝕥𝕒𝕔𝕒𝕞𝕖𝕝; | ^^^^^^^^^ should have an UpperCamelCase name | - = note: `#[warn(non_camel_case_types)]` on by default + = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default warning: type `𝕟𝕠𝕥_𝕒_𝕔𝕒𝕞𝕖𝕝` should have an upper camel case name --> $DIR/special-upper-lower-cases.rs:14:8 @@ -18,7 +18,7 @@ warning: static variable `𝗻𝗼𝗻𝘂𝗽𝗽𝗲𝗿𝗰𝗮𝘀𝗲` shou LL | static 𝗻𝗼𝗻𝘂𝗽𝗽𝗲𝗿𝗰𝗮𝘀𝗲: i32 = 1; | ^^^^^^^^^^^^ should have an UPPER_CASE name | - = note: `#[warn(non_upper_case_globals)]` on by default + = note: `#[warn(non_upper_case_globals)]` (part of `#[warn(nonstandard_style)]`) on by default warning: variable `𝓢𝓝𝓐𝓐𝓐𝓐𝓚𝓔𝓢` should have a snake case name --> $DIR/special-upper-lower-cases.rs:21:9 @@ -26,7 +26,7 @@ warning: variable `𝓢𝓝𝓐𝓐𝓐𝓐𝓚𝓔𝓢` should have a snake cas LL | let 𝓢𝓝𝓐𝓐𝓐𝓐𝓚𝓔𝓢 = 1; | ^^^^^^^^^ should have a snake_case name | - = note: `#[warn(non_snake_case)]` on by default + = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default warning: 4 warnings emitted diff --git a/tests/ui/lint/static-mut-refs.e2021.stderr b/tests/ui/lint/static-mut-refs.e2021.stderr index 320e0cee8e8b7..71b91a80e2189 100644 --- a/tests/ui/lint/static-mut-refs.e2021.stderr +++ b/tests/ui/lint/static-mut-refs.e2021.stderr @@ -6,7 +6,7 @@ LL | let _y = &X; | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `&raw const` instead to create a raw pointer | LL | let _y = &raw const X; diff --git a/tests/ui/lint/static-mut-refs.e2024.stderr b/tests/ui/lint/static-mut-refs.e2024.stderr index bf7ffc62ce17b..9cd161fe2ecb9 100644 --- a/tests/ui/lint/static-mut-refs.e2024.stderr +++ b/tests/ui/lint/static-mut-refs.e2024.stderr @@ -6,7 +6,7 @@ LL | let _y = &X; | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[deny(static_mut_refs)]` on by default + = note: `#[deny(static_mut_refs)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `&raw const` instead to create a raw pointer | LL | let _y = &raw const X; diff --git a/tests/ui/lint/unused/issue-70041.stderr b/tests/ui/lint/unused/issue-70041.stderr index b2e6d1aeb3f50..4a2c4b8b90746 100644 --- a/tests/ui/lint/unused/issue-70041.stderr +++ b/tests/ui/lint/unused/issue-70041.stderr @@ -4,7 +4,7 @@ warning: unused macro definition: `regex` LL | macro_rules! regex { | ^^^^^ | - = note: `#[warn(unused_macros)]` on by default + = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default warning: unused import: `regex` --> $DIR/issue-70041.rs:10:5 @@ -12,7 +12,7 @@ warning: unused import: `regex` LL | use regex; | ^^^^^ | - = note: `#[warn(unused_imports)]` on by default + = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default warning: 2 warnings emitted diff --git a/tests/ui/macros/issue-111749.stderr b/tests/ui/macros/issue-111749.stderr index 7db2b8e6ad1ec..0c6bce27cced1 100644 --- a/tests/ui/macros/issue-111749.stderr +++ b/tests/ui/macros/issue-111749.stderr @@ -12,7 +12,7 @@ LL | cbor_map! { #[test(test)] 4}; | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 2 previous errors diff --git a/tests/ui/macros/lint-trailing-macro-call.stderr b/tests/ui/macros/lint-trailing-macro-call.stderr index 223b85e112ed6..9624e2f3e93d8 100644 --- a/tests/ui/macros/lint-trailing-macro-call.stderr +++ b/tests/ui/macros/lint-trailing-macro-call.stderr @@ -11,7 +11,7 @@ LL | expand_it!() = note: for more information, see issue #79813 = note: macro invocations at the end of a block are treated as expressions = note: to ignore the value produced by the macro, add a semicolon after the invocation of `expand_it` - = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default + = note: `#[warn(semicolon_in_expressions_from_macros)]` (part of `#[warn(future_incompatible)]`) on by default = note: this warning originates in the macro `expand_it` (in Nightly builds, run with -Z macro-backtrace for more info) warning: 1 warning emitted @@ -30,6 +30,6 @@ LL | expand_it!() = note: for more information, see issue #79813 = note: macro invocations at the end of a block are treated as expressions = note: to ignore the value produced by the macro, add a semicolon after the invocation of `expand_it` - = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default + = note: `#[warn(semicolon_in_expressions_from_macros)]` (part of `#[warn(future_incompatible)]`) on by default = note: this warning originates in the macro `expand_it` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/macros/macro-context.stderr b/tests/ui/macros/macro-context.stderr index 4820a43f00c79..3ef0d4fac2c12 100644 --- a/tests/ui/macros/macro-context.stderr +++ b/tests/ui/macros/macro-context.stderr @@ -75,7 +75,7 @@ LL | let i = m!(); | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79813 - = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default + = note: `#[warn(semicolon_in_expressions_from_macros)]` (part of `#[warn(future_incompatible)]`) on by default = note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 6 previous errors; 1 warning emitted @@ -94,6 +94,6 @@ LL | let i = m!(); | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79813 - = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default + = note: `#[warn(semicolon_in_expressions_from_macros)]` (part of `#[warn(future_incompatible)]`) on by default = note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/macros/macro-in-expression-context.fixed b/tests/ui/macros/macro-in-expression-context.fixed index 7c830707ffd9d..53ba27ebcce8d 100644 --- a/tests/ui/macros/macro-in-expression-context.fixed +++ b/tests/ui/macros/macro-in-expression-context.fixed @@ -8,7 +8,7 @@ macro_rules! foo { //~| NOTE macro invocations at the end of a block //~| NOTE to ignore the value produced by the macro //~| NOTE for more information - //~| NOTE `#[warn(semicolon_in_expressions_from_macros)]` on by default + //~| NOTE `#[warn(semicolon_in_expressions_from_macros)]` (part of `#[warn(future_incompatible)]`) on by default assert_eq!("B", "B"); } //~^^ ERROR macro expansion ignores `assert_eq` and any tokens following diff --git a/tests/ui/macros/macro-in-expression-context.rs b/tests/ui/macros/macro-in-expression-context.rs index da95017aa5f74..ee8e6d986c342 100644 --- a/tests/ui/macros/macro-in-expression-context.rs +++ b/tests/ui/macros/macro-in-expression-context.rs @@ -8,7 +8,7 @@ macro_rules! foo { //~| NOTE macro invocations at the end of a block //~| NOTE to ignore the value produced by the macro //~| NOTE for more information - //~| NOTE `#[warn(semicolon_in_expressions_from_macros)]` on by default + //~| NOTE `#[warn(semicolon_in_expressions_from_macros)]` (part of `#[warn(future_incompatible)]`) on by default assert_eq!("B", "B"); } //~^^ ERROR macro expansion ignores `assert_eq` and any tokens following diff --git a/tests/ui/macros/macro-in-expression-context.stderr b/tests/ui/macros/macro-in-expression-context.stderr index 43419f2678c22..f046d7397bf61 100644 --- a/tests/ui/macros/macro-in-expression-context.stderr +++ b/tests/ui/macros/macro-in-expression-context.stderr @@ -26,7 +26,7 @@ LL | foo!() = note: for more information, see issue #79813 = note: macro invocations at the end of a block are treated as expressions = note: to ignore the value produced by the macro, add a semicolon after the invocation of `foo` - = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default + = note: `#[warn(semicolon_in_expressions_from_macros)]` (part of `#[warn(future_incompatible)]`) on by default = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error; 1 warning emitted @@ -45,6 +45,6 @@ LL | foo!() = note: for more information, see issue #79813 = note: macro invocations at the end of a block are treated as expressions = note: to ignore the value produced by the macro, add a semicolon after the invocation of `foo` - = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default + = note: `#[warn(semicolon_in_expressions_from_macros)]` (part of `#[warn(future_incompatible)]`) on by default = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/macros/non-fmt-panic.stderr b/tests/ui/macros/non-fmt-panic.stderr index 30b63cb46e22b..ff82a551be4b8 100644 --- a/tests/ui/macros/non-fmt-panic.stderr +++ b/tests/ui/macros/non-fmt-panic.stderr @@ -5,7 +5,7 @@ LL | panic!("here's a brace: {"); | ^ | = note: this message is not used as a format string, but will be in Rust 2021 - = note: `#[warn(non_fmt_panics)]` on by default + = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: add a "{}" format string to use the message literally | LL | panic!("{}", "here's a brace: {"); diff --git a/tests/ui/malformed/malformed-regressions.stderr b/tests/ui/malformed/malformed-regressions.stderr index 535db55a13d61..58f444e866fd0 100644 --- a/tests/ui/malformed/malformed-regressions.stderr +++ b/tests/ui/malformed/malformed-regressions.stderr @@ -6,7 +6,7 @@ LL | #[doc] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default error: valid forms for the attribute are `#[ignore]` and `#[ignore = "reason"]` --> $DIR/malformed-regressions.rs:3:1 diff --git a/tests/ui/methods/method-call-lifetime-args-unresolved.stderr b/tests/ui/methods/method-call-lifetime-args-unresolved.stderr index d3bd74a49fb3d..a87c47a9f12a3 100644 --- a/tests/ui/methods/method-call-lifetime-args-unresolved.stderr +++ b/tests/ui/methods/method-call-lifetime-args-unresolved.stderr @@ -20,7 +20,7 @@ LL | 0.clone::<'a>(); | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42868 - = note: `#[warn(late_bound_lifetime_arguments)]` on by default + = note: `#[warn(late_bound_lifetime_arguments)]` (part of `#[warn(future_incompatible)]`) on by default error: aborting due to 1 previous error; 1 warning emitted diff --git a/tests/ui/methods/method-recursive-blanket-impl.stderr b/tests/ui/methods/method-recursive-blanket-impl.stderr index e358f80d3ff50..1074893744abd 100644 --- a/tests/ui/methods/method-recursive-blanket-impl.stderr +++ b/tests/ui/methods/method-recursive-blanket-impl.stderr @@ -4,7 +4,7 @@ warning: trait `Foo` is never used LL | trait Foo { | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/methods/method-two-trait-defer-resolution-2.stderr b/tests/ui/methods/method-two-trait-defer-resolution-2.stderr index 4501ea5d24334..17ceb745b900b 100644 --- a/tests/ui/methods/method-two-trait-defer-resolution-2.stderr +++ b/tests/ui/methods/method-two-trait-defer-resolution-2.stderr @@ -6,7 +6,7 @@ LL | trait MyCopy { fn foo(&self) { } } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr index fa87ce5cc49ff..40f9133705274 100644 --- a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr +++ b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr @@ -4,7 +4,7 @@ warning: trait `A` is never used LL | trait A { | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/mir/mir_raw_fat_ptr.stderr b/tests/ui/mir/mir_raw_fat_ptr.stderr index cd99d566654f9..d1f91a79acc1e 100644 --- a/tests/ui/mir/mir_raw_fat_ptr.stderr +++ b/tests/ui/mir/mir_raw_fat_ptr.stderr @@ -6,7 +6,7 @@ LL | trait Foo { fn foo(&self) -> usize; } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/moves/issue-22536-copy-mustnt-zero.stderr b/tests/ui/moves/issue-22536-copy-mustnt-zero.stderr index b1fcdfa44c33d..1be612af44c75 100644 --- a/tests/ui/moves/issue-22536-copy-mustnt-zero.stderr +++ b/tests/ui/moves/issue-22536-copy-mustnt-zero.stderr @@ -7,7 +7,7 @@ LL | type Buffer: Copy; LL | fn foo(&self) {} | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/never_type/defaulted-never-note.nofallback.stderr b/tests/ui/never_type/defaulted-never-note.nofallback.stderr index 6de323ad12c26..10ffc81abdc58 100644 --- a/tests/ui/never_type/defaulted-never-note.nofallback.stderr +++ b/tests/ui/never_type/defaulted-never-note.nofallback.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: ImplementedForUnitButNotNever` will f | LL | foo(_x); | ^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let _x: () = return; @@ -35,7 +35,7 @@ note: in edition 2024, the requirement `!: ImplementedForUnitButNotNever` will f | LL | foo(_x); | ^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let _x: () = return; diff --git a/tests/ui/never_type/dependency-on-fallback-to-unit.stderr b/tests/ui/never_type/dependency-on-fallback-to-unit.stderr index be8075662e0cf..0f2c16aa9c300 100644 --- a/tests/ui/never_type/dependency-on-fallback-to-unit.stderr +++ b/tests/ui/never_type/dependency-on-fallback-to-unit.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | false => <_>::default(), | ^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL - false => <_>::default(), @@ -55,7 +55,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | false => <_>::default(), | ^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL - false => <_>::default(), @@ -77,7 +77,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | deserialize()?; | ^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | deserialize::<()>()?; diff --git a/tests/ui/never_type/diverging-fallback-control-flow.nofallback.stderr b/tests/ui/never_type/diverging-fallback-control-flow.nofallback.stderr index 44ebdb4351043..9abb02add1e4f 100644 --- a/tests/ui/never_type/diverging-fallback-control-flow.nofallback.stderr +++ b/tests/ui/never_type/diverging-fallback-control-flow.nofallback.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: UnitDefault` will fail | LL | x = UnitDefault::default(); | ^^^^^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let x: (); @@ -54,7 +54,7 @@ note: in edition 2024, the requirement `!: UnitDefault` will fail | LL | x = UnitDefault::default(); | ^^^^^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let x: (); @@ -75,7 +75,7 @@ note: in edition 2024, the requirement `!: UnitDefault` will fail | LL | x = UnitDefault::default(); | ^^^^^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let x: (); diff --git a/tests/ui/never_type/diverging-fallback-no-leak.nofallback.stderr b/tests/ui/never_type/diverging-fallback-no-leak.nofallback.stderr index 4a8dea42a4d60..1880529f479b9 100644 --- a/tests/ui/never_type/diverging-fallback-no-leak.nofallback.stderr +++ b/tests/ui/never_type/diverging-fallback-no-leak.nofallback.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: Test` will fail | LL | unconstrained_arg(return); | ^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unconstrained_arg::<()>(return); @@ -35,7 +35,7 @@ note: in edition 2024, the requirement `!: Test` will fail | LL | unconstrained_arg(return); | ^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unconstrained_arg::<()>(return); diff --git a/tests/ui/never_type/diverging-fallback-unconstrained-return.nofallback.stderr b/tests/ui/never_type/diverging-fallback-unconstrained-return.nofallback.stderr index 803af39fd86f2..ba6e15312e069 100644 --- a/tests/ui/never_type/diverging-fallback-unconstrained-return.nofallback.stderr +++ b/tests/ui/never_type/diverging-fallback-unconstrained-return.nofallback.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: UnitReturn` will fail | LL | let _ = if true { unconstrained_return() } else { panic!() }; | ^^^^^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let _: () = if true { unconstrained_return() } else { panic!() }; @@ -35,7 +35,7 @@ note: in edition 2024, the requirement `!: UnitReturn` will fail | LL | let _ = if true { unconstrained_return() } else { panic!() }; | ^^^^^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let _: () = if true { unconstrained_return() } else { panic!() }; diff --git a/tests/ui/never_type/fallback-closure-ret.nofallback.stderr b/tests/ui/never_type/fallback-closure-ret.nofallback.stderr index cf19363a7d8b1..15c2d3d6c0926 100644 --- a/tests/ui/never_type/fallback-closure-ret.nofallback.stderr +++ b/tests/ui/never_type/fallback-closure-ret.nofallback.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: Bar` will fail | LL | foo(|| panic!()); | ^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | foo::<()>(|| panic!()); @@ -35,7 +35,7 @@ note: in edition 2024, the requirement `!: Bar` will fail | LL | foo(|| panic!()); | ^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | foo::<()>(|| panic!()); diff --git a/tests/ui/never_type/impl_trait_fallback.stderr b/tests/ui/never_type/impl_trait_fallback.stderr index 7250db127cd6f..eb8d0a0ce6b17 100644 --- a/tests/ui/never_type/impl_trait_fallback.stderr +++ b/tests/ui/never_type/impl_trait_fallback.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: T` will fail | LL | fn should_ret_unit() -> impl T { | ^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default warning: 1 warning emitted @@ -31,5 +31,5 @@ note: in edition 2024, the requirement `!: T` will fail | LL | fn should_ret_unit() -> impl T { | ^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default diff --git a/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr b/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr index c90efd2778459..c535bbe666788 100644 --- a/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr +++ b/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr @@ -7,7 +7,7 @@ LL | unsafe { mem::zeroed() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { mem::zeroed::<()>() } @@ -143,7 +143,7 @@ LL | unsafe { mem::zeroed() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { mem::zeroed::<()>() } @@ -159,7 +159,7 @@ LL | core::mem::transmute(Zst) = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | core::mem::transmute::<_, ()>(Zst) @@ -175,7 +175,7 @@ LL | unsafe { Union { a: () }.b } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default Future breakage diagnostic: warning: never type fallback affects this raw pointer dereference @@ -187,7 +187,7 @@ LL | unsafe { *ptr::from_ref(&()).cast() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { *ptr::from_ref(&()).cast::<()>() } @@ -203,7 +203,7 @@ LL | unsafe { internally_create(x) } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { internally_create::<()>(x) } @@ -219,7 +219,7 @@ LL | unsafe { zeroed() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let zeroed = mem::zeroed::<()>; @@ -235,7 +235,7 @@ LL | let zeroed = mem::zeroed; = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let zeroed = mem::zeroed::<()>; @@ -251,7 +251,7 @@ LL | let f = internally_create; = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let f = internally_create::<()>; @@ -267,7 +267,7 @@ LL | S(marker::PhantomData).create_out_of_thin_air() = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default Future breakage diagnostic: warning: never type fallback affects this call to an `unsafe` function @@ -282,6 +282,6 @@ LL | msg_send!(); = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default = note: this warning originates in the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr b/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr index 858d7381eeda6..377c5e03a9051 100644 --- a/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr +++ b/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr @@ -7,7 +7,7 @@ LL | unsafe { mem::zeroed() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { mem::zeroed::<()>() } @@ -152,7 +152,7 @@ LL | unsafe { mem::zeroed() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { mem::zeroed::<()>() } @@ -168,7 +168,7 @@ LL | core::mem::transmute(Zst) = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | core::mem::transmute::<_, ()>(Zst) @@ -184,7 +184,7 @@ LL | unsafe { Union { a: () }.b } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default Future breakage diagnostic: error: never type fallback affects this raw pointer dereference @@ -196,7 +196,7 @@ LL | unsafe { *ptr::from_ref(&()).cast() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { *ptr::from_ref(&()).cast::<()>() } @@ -212,7 +212,7 @@ LL | unsafe { internally_create(x) } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { internally_create::<()>(x) } @@ -228,7 +228,7 @@ LL | unsafe { zeroed() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let zeroed = mem::zeroed::<()>; @@ -244,7 +244,7 @@ LL | let zeroed = mem::zeroed; = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let zeroed = mem::zeroed::<()>; @@ -260,7 +260,7 @@ LL | let f = internally_create; = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let f = internally_create::<()>; @@ -276,7 +276,7 @@ LL | S(marker::PhantomData).create_out_of_thin_air() = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default Future breakage diagnostic: error: never type fallback affects this call to an `unsafe` function @@ -291,6 +291,6 @@ LL | msg_send!(); = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default = note: this error originates in the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.stderr b/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.stderr index 8268f5df23655..bf0fa95f8064e 100644 --- a/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.stderr +++ b/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.stderr @@ -6,7 +6,7 @@ LL | S1 { a: unsafe { &mut X1 } } | = note: for more information, see = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `&raw mut` instead to create a raw pointer | LL | S1 { a: unsafe { &raw mut X1 } } diff --git a/tests/ui/nll/issue-48623-coroutine.stderr b/tests/ui/nll/issue-48623-coroutine.stderr index 4e4cd28ef2ae9..2862d7b2a2f05 100644 --- a/tests/ui/nll/issue-48623-coroutine.stderr +++ b/tests/ui/nll/issue-48623-coroutine.stderr @@ -5,7 +5,7 @@ LL | #[coroutine] move || { d; yield; &mut *r }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/overloaded/issue-14958.stderr b/tests/ui/overloaded/issue-14958.stderr index e4f527319e7af..d07dba78dc3bf 100644 --- a/tests/ui/overloaded/issue-14958.stderr +++ b/tests/ui/overloaded/issue-14958.stderr @@ -6,7 +6,7 @@ LL | trait Foo { fn dummy(&self) { }} | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/overloaded/overloaded-index-in-field.stderr b/tests/ui/overloaded/overloaded-index-in-field.stderr index 10c0a3faeb59a..5ff15ba0bcb62 100644 --- a/tests/ui/overloaded/overloaded-index-in-field.stderr +++ b/tests/ui/overloaded/overloaded-index-in-field.stderr @@ -9,7 +9,7 @@ LL | fn get_from_ref(&self) -> isize; LL | fn inc(&mut self); | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/parser/recover/recover-pat-ranges.stderr b/tests/ui/parser/recover/recover-pat-ranges.stderr index 6c17182618b5e..467ceb8d0629d 100644 --- a/tests/ui/parser/recover/recover-pat-ranges.stderr +++ b/tests/ui/parser/recover/recover-pat-ranges.stderr @@ -192,7 +192,7 @@ LL | (1 + 4)...1 * 2 => (), | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + = note: `#[warn(ellipsis_inclusive_range_patterns)]` (part of `#[warn(rust_2021_compatibility)]`) on by default error: aborting due to 13 previous errors; 1 warning emitted diff --git a/tests/ui/parser/trait-object-trait-parens.stderr b/tests/ui/parser/trait-object-trait-parens.stderr index d75352b6811ea..1912dfc06eaa6 100644 --- a/tests/ui/parser/trait-object-trait-parens.stderr +++ b/tests/ui/parser/trait-object-trait-parens.stderr @@ -33,7 +33,7 @@ LL | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | let _: Box Trait<'a>)>; diff --git a/tests/ui/pattern/issue-22546.stderr b/tests/ui/pattern/issue-22546.stderr index e067a95e4226c..921c49f5c5707 100644 --- a/tests/ui/pattern/issue-22546.stderr +++ b/tests/ui/pattern/issue-22546.stderr @@ -4,7 +4,7 @@ warning: trait `Tr` is never used LL | trait Tr { | ^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/pattern/skipped-ref-pats-issue-125058.stderr b/tests/ui/pattern/skipped-ref-pats-issue-125058.stderr index f7fd4a4cc292a..9580bab2b4f68 100644 --- a/tests/ui/pattern/skipped-ref-pats-issue-125058.stderr +++ b/tests/ui/pattern/skipped-ref-pats-issue-125058.stderr @@ -4,7 +4,7 @@ warning: struct `Foo` is never constructed LL | struct Foo; | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: unused closure that must be used --> $DIR/skipped-ref-pats-issue-125058.rs:11:5 @@ -18,7 +18,7 @@ LL | | }; | |_____^ | = note: closures are lazy and do nothing unless called - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 2 warnings emitted diff --git a/tests/ui/proc-macro/derive-helper-shadowing.stderr b/tests/ui/proc-macro/derive-helper-shadowing.stderr index 1206778bb2352..c944404c0e376 100644 --- a/tests/ui/proc-macro/derive-helper-shadowing.stderr +++ b/tests/ui/proc-macro/derive-helper-shadowing.stderr @@ -69,7 +69,7 @@ LL | #[derive(Empty)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79202 - = note: `#[warn(legacy_derive_helpers)]` on by default + = note: `#[warn(legacy_derive_helpers)]` (part of `#[warn(future_incompatible)]`) on by default error: aborting due to 4 previous errors; 1 warning emitted diff --git a/tests/ui/proc-macro/generate-mod.stderr b/tests/ui/proc-macro/generate-mod.stderr index cbe6b14ca9af5..142ff1abeed6b 100644 --- a/tests/ui/proc-macro/generate-mod.stderr +++ b/tests/ui/proc-macro/generate-mod.stderr @@ -46,7 +46,7 @@ LL | #[derive(generate_mod::CheckDerive)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83583 - = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default + = note: `#[deny(proc_macro_derive_resolution_fallback)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot find type `OuterDerive` in this scope @@ -91,7 +91,7 @@ LL | #[derive(generate_mod::CheckDerive)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83583 - = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default + = note: `#[deny(proc_macro_derive_resolution_fallback)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) Future breakage diagnostic: @@ -103,7 +103,7 @@ LL | #[derive(generate_mod::CheckDerive)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83583 - = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default + = note: `#[deny(proc_macro_derive_resolution_fallback)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) Future breakage diagnostic: @@ -115,7 +115,7 @@ LL | #[derive(generate_mod::CheckDerive)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83583 - = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default + = note: `#[deny(proc_macro_derive_resolution_fallback)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) Future breakage diagnostic: @@ -127,7 +127,7 @@ LL | #[derive(generate_mod::CheckDerive)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83583 - = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default + = note: `#[deny(proc_macro_derive_resolution_fallback)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) Future breakage diagnostic: diff --git a/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr b/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr index 1c12a2804c6d3..88f25c03727f0 100644 --- a/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr +++ b/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr @@ -28,7 +28,7 @@ LL | #[derive(Empty)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79202 - = note: `#[warn(legacy_derive_helpers)]` on by default + = note: `#[warn(legacy_derive_helpers)]` (part of `#[warn(future_incompatible)]`) on by default error: aborting due to 1 previous error; 1 warning emitted diff --git a/tests/ui/proc-macro/issue-75930-derive-cfg.stderr b/tests/ui/proc-macro/issue-75930-derive-cfg.stderr index df1e36d739080..c9240befd48d3 100644 --- a/tests/ui/proc-macro/issue-75930-derive-cfg.stderr +++ b/tests/ui/proc-macro/issue-75930-derive-cfg.stderr @@ -9,7 +9,7 @@ LL | #[derive(Print)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79202 - = note: `#[warn(legacy_derive_helpers)]` on by default + = note: `#[warn(legacy_derive_helpers)]` (part of `#[warn(future_incompatible)]`) on by default warning: derive helper attribute is used before it is introduced --> $DIR/issue-75930-derive-cfg.rs:46:3 diff --git a/tests/ui/proc-macro/proc-macro-attributes.stderr b/tests/ui/proc-macro/proc-macro-attributes.stderr index 140d879069040..0eaded3376c63 100644 --- a/tests/ui/proc-macro/proc-macro-attributes.stderr +++ b/tests/ui/proc-macro/proc-macro-attributes.stderr @@ -87,7 +87,7 @@ LL | #[derive(B)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79202 - = note: `#[warn(legacy_derive_helpers)]` on by default + = note: `#[warn(legacy_derive_helpers)]` (part of `#[warn(future_incompatible)]`) on by default warning: derive helper attribute is used before it is introduced --> $DIR/proc-macro-attributes.rs:10:3 diff --git a/tests/ui/pub/pub-reexport-priv-extern-crate.stderr b/tests/ui/pub/pub-reexport-priv-extern-crate.stderr index 9bb64a3325b5d..dbb080e1b0940 100644 --- a/tests/ui/pub/pub-reexport-priv-extern-crate.stderr +++ b/tests/ui/pub/pub-reexport-priv-extern-crate.stderr @@ -30,7 +30,7 @@ LL | pub use core as reexported_core; | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #127909 - = note: `#[deny(pub_use_of_private_extern_crate)]` on by default + = note: `#[deny(pub_use_of_private_extern_crate)]` (part of `#[deny(future_incompatible)]`) on by default help: consider making the `extern crate` item publicly accessible | LL | pub extern crate core; @@ -49,7 +49,7 @@ LL | pub use core as reexported_core; | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #127909 - = note: `#[deny(pub_use_of_private_extern_crate)]` on by default + = note: `#[deny(pub_use_of_private_extern_crate)]` (part of `#[deny(future_incompatible)]`) on by default help: consider making the `extern crate` item publicly accessible | LL | pub extern crate core; diff --git a/tests/ui/repr/conflicting-repr-hints.stderr b/tests/ui/repr/conflicting-repr-hints.stderr index fbfa69e7fb145..4da3d454e037d 100644 --- a/tests/ui/repr/conflicting-repr-hints.stderr +++ b/tests/ui/repr/conflicting-repr-hints.stderr @@ -6,7 +6,7 @@ LL | #[repr(C, u64)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default error[E0566]: conflicting representation hints --> $DIR/conflicting-repr-hints.rs:19:8 @@ -90,7 +90,7 @@ LL | #[repr(C, u64)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error[E0566]: conflicting representation hints @@ -101,5 +101,5 @@ LL | #[repr(u32, u64)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.stderr b/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.stderr index 24b35a2ab3167..689ccb4bc9a86 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.stderr +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.stderr @@ -6,7 +6,7 @@ LL | if let _ = return true && false {}; | | | any code following this expression is unreachable | - = note: `#[warn(unreachable_code)]` on by default + = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/self/self-ctor-nongeneric.stderr b/tests/ui/self/self-ctor-nongeneric.stderr index 6c03c6f3e38a4..b53ecbe55b594 100644 --- a/tests/ui/self/self-ctor-nongeneric.stderr +++ b/tests/ui/self/self-ctor-nongeneric.stderr @@ -9,7 +9,7 @@ LL | const C: S0 = Self(0); | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #124186 - = note: `#[warn(self_constructor_from_outer_item)]` on by default + = note: `#[warn(self_constructor_from_outer_item)]` (part of `#[warn(future_incompatible)]`) on by default warning: can't reference `Self` constructor from outer item --> $DIR/self-ctor-nongeneric.rs:12:13 diff --git a/tests/ui/sized/coinductive-2.stderr b/tests/ui/sized/coinductive-2.stderr index 1390b1f8d7bf1..5faec7397e295 100644 --- a/tests/ui/sized/coinductive-2.stderr +++ b/tests/ui/sized/coinductive-2.stderr @@ -4,7 +4,7 @@ warning: trait `Collection` is never used LL | trait Collection: Sized { | ^^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/span/issue-24690.stderr b/tests/ui/span/issue-24690.stderr index 73e166e6403e4..8626108c0be44 100644 --- a/tests/ui/span/issue-24690.stderr +++ b/tests/ui/span/issue-24690.stderr @@ -17,7 +17,7 @@ warning: variable `theTwo` should have a snake case name LL | let theTwo = 2; | ^^^^^^ help: convert the identifier to snake case: `the_two` | - = note: `#[warn(non_snake_case)]` on by default + = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default warning: variable `theOtherTwo` should have a snake case name --> $DIR/issue-24690.rs:13:9 diff --git a/tests/ui/statics/issue-15261.stderr b/tests/ui/statics/issue-15261.stderr index d2dd762aa66eb..375682599c15a 100644 --- a/tests/ui/statics/issue-15261.stderr +++ b/tests/ui/statics/issue-15261.stderr @@ -6,7 +6,7 @@ LL | static n: &'static usize = unsafe { &n_mut }; | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `&raw const` instead to create a raw pointer | LL | static n: &'static usize = unsafe { &raw const n_mut }; diff --git a/tests/ui/statics/static-impl.stderr b/tests/ui/statics/static-impl.stderr index 83c3ffbefe1f2..77785d1df0e95 100644 --- a/tests/ui/statics/static-impl.stderr +++ b/tests/ui/statics/static-impl.stderr @@ -7,7 +7,7 @@ LL | fn length_(&self, ) -> usize; LL | fn iter_(&self, f: F) where F: FnMut(&T); | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/statics/static-mut-shared-parens.stderr b/tests/ui/statics/static-mut-shared-parens.stderr index 3825e8efc4277..48f8b35c2189f 100644 --- a/tests/ui/statics/static-mut-shared-parens.stderr +++ b/tests/ui/statics/static-mut-shared-parens.stderr @@ -6,7 +6,7 @@ LL | let _ = unsafe { (&TEST) as *const usize }; | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `&raw const` instead to create a raw pointer | LL | let _ = unsafe { (&raw const TEST) as *const usize }; diff --git a/tests/ui/statics/static-mut-xc.stderr b/tests/ui/statics/static-mut-xc.stderr index 2d7a0553e925f..4a76fe6d8a7cd 100644 --- a/tests/ui/statics/static-mut-xc.stderr +++ b/tests/ui/statics/static-mut-xc.stderr @@ -6,7 +6,7 @@ LL | assert_eq!(static_mut_xc::a, 3); | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default warning: creating a shared reference to mutable static --> $DIR/static-mut-xc.rs:22:16 diff --git a/tests/ui/statics/static-recursive.stderr b/tests/ui/statics/static-recursive.stderr index 252807e2e5dea..73a656c6aba1b 100644 --- a/tests/ui/statics/static-recursive.stderr +++ b/tests/ui/statics/static-recursive.stderr @@ -6,7 +6,7 @@ LL | static mut S: *const u8 = unsafe { &S as *const *const u8 as *const u8 }; | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `&raw const` instead to create a raw pointer | LL | static mut S: *const u8 = unsafe { &raw const S as *const *const u8 as *const u8 }; diff --git a/tests/ui/std/issue-3563-3.stderr b/tests/ui/std/issue-3563-3.stderr index bd65c1e3fd5b4..5885bafeb99f8 100644 --- a/tests/ui/std/issue-3563-3.stderr +++ b/tests/ui/std/issue-3563-3.stderr @@ -7,7 +7,7 @@ LL | trait Canvas { LL | fn add_points(&mut self, shapes: &[Point]) { | ^^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/stdlib-unit-tests/raw-fat-ptr.stderr b/tests/ui/stdlib-unit-tests/raw-fat-ptr.stderr index 670fa5bb9224b..8108296621c87 100644 --- a/tests/ui/stdlib-unit-tests/raw-fat-ptr.stderr +++ b/tests/ui/stdlib-unit-tests/raw-fat-ptr.stderr @@ -6,7 +6,7 @@ LL | trait Foo { fn foo(&self) -> usize; } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/structs-enums/enum-null-pointer-opt.stderr b/tests/ui/structs-enums/enum-null-pointer-opt.stderr index 64e93ffaffd60..178d76cd732cf 100644 --- a/tests/ui/structs-enums/enum-null-pointer-opt.stderr +++ b/tests/ui/structs-enums/enum-null-pointer-opt.stderr @@ -6,7 +6,7 @@ LL | trait Trait { fn dummy(&self) { } } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/suggestions/dont-try-removing-the-field.stderr b/tests/ui/suggestions/dont-try-removing-the-field.stderr index 263171a4ac456..e327b21417a6b 100644 --- a/tests/ui/suggestions/dont-try-removing-the-field.stderr +++ b/tests/ui/suggestions/dont-try-removing-the-field.stderr @@ -4,7 +4,7 @@ warning: unused variable: `baz` LL | let Foo { foo, bar, baz } = x; | ^^^ help: try ignoring the field: `baz: _` | - = note: `#[warn(unused_variables)]` on by default + = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr b/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr index 696151b6ee2c0..8bb2bb290d3dc 100644 --- a/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr +++ b/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr @@ -12,7 +12,7 @@ LL | std::ptr::from_ref(num).cast_mut().as_deref(); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #46906 - = note: `#[warn(tyvar_behind_raw_pointer)]` on by default + = note: `#[warn(tyvar_behind_raw_pointer)]` (part of `#[warn(rust_2018_compatibility)]`) on by default warning: type annotations needed --> $DIR/ice-unwrap-probe-many-result-125876.rs:5:40 diff --git a/tests/ui/suggestions/issue-116434-2015.stderr b/tests/ui/suggestions/issue-116434-2015.stderr index cad5812da6632..b30a44f642d42 100644 --- a/tests/ui/suggestions/issue-116434-2015.stderr +++ b/tests/ui/suggestions/issue-116434-2015.stderr @@ -6,7 +6,7 @@ LL | fn foo() -> Clone; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | fn foo() -> dyn Clone; diff --git a/tests/ui/suggestions/suggest-swapping-self-ty-and-trait.stderr b/tests/ui/suggestions/suggest-swapping-self-ty-and-trait.stderr index 929f893e34f5a..b9c4cfe37cd4e 100644 --- a/tests/ui/suggestions/suggest-swapping-self-ty-and-trait.stderr +++ b/tests/ui/suggestions/suggest-swapping-self-ty-and-trait.stderr @@ -69,7 +69,7 @@ LL | impl<'a, T> Struct for Trait<'a, T> {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | impl<'a, T> Struct for dyn Trait<'a, T> {} diff --git a/tests/ui/suggestions/try-removing-the-field.stderr b/tests/ui/suggestions/try-removing-the-field.stderr index 7a6013d4a6eab..aaf260bb86ede 100644 --- a/tests/ui/suggestions/try-removing-the-field.stderr +++ b/tests/ui/suggestions/try-removing-the-field.stderr @@ -6,7 +6,7 @@ LL | let Foo { foo, bar, .. } = x; | | | help: try removing the field | - = note: `#[warn(unused_variables)]` on by default + = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default warning: unused variable: `unused` --> $DIR/try-removing-the-field.rs:20:20 diff --git a/tests/ui/traits/alias/bounds.stderr b/tests/ui/traits/alias/bounds.stderr index 7fb8e918da36d..215a9b57fbf88 100644 --- a/tests/ui/traits/alias/bounds.stderr +++ b/tests/ui/traits/alias/bounds.stderr @@ -4,7 +4,7 @@ warning: trait `Empty` is never used LL | trait Empty {} | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/alias/style_lint.stderr b/tests/ui/traits/alias/style_lint.stderr index 91e2ea90eb9e8..e11e51c018f6b 100644 --- a/tests/ui/traits/alias/style_lint.stderr +++ b/tests/ui/traits/alias/style_lint.stderr @@ -4,7 +4,7 @@ warning: trait alias `bar` should have an upper camel case name LL | trait bar = std::fmt::Display + std::fmt::Debug; | ^^^ help: convert the identifier to upper camel case: `Bar` | - = note: `#[warn(non_camel_case_types)]` on by default + = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/bound/not-on-bare-trait.stderr b/tests/ui/traits/bound/not-on-bare-trait.stderr index 9028e66fa020c..6f53e8b9060bf 100644 --- a/tests/ui/traits/bound/not-on-bare-trait.stderr +++ b/tests/ui/traits/bound/not-on-bare-trait.stderr @@ -6,7 +6,7 @@ LL | fn foo(_x: Foo + Send) { | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | fn foo(_x: dyn Foo + Send) { diff --git a/tests/ui/traits/default-method/bound-subst4.stderr b/tests/ui/traits/default-method/bound-subst4.stderr index 548c46f123322..62be4c3a8fce4 100644 --- a/tests/ui/traits/default-method/bound-subst4.stderr +++ b/tests/ui/traits/default-method/bound-subst4.stderr @@ -7,7 +7,7 @@ LL | fn g(&self, x: usize) -> usize { x } LL | fn h(&self, x: T) { } | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/impl-inherent-prefer-over-trait.stderr b/tests/ui/traits/impl-inherent-prefer-over-trait.stderr index f0bb21402d873..14b3e4d903f0f 100644 --- a/tests/ui/traits/impl-inherent-prefer-over-trait.stderr +++ b/tests/ui/traits/impl-inherent-prefer-over-trait.stderr @@ -6,7 +6,7 @@ LL | trait Trait { LL | fn bar(&self); | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/impl-object-overlap-issue-23853.stderr b/tests/ui/traits/impl-object-overlap-issue-23853.stderr index 9fa7a36816e4d..bdab0ae3532a9 100644 --- a/tests/ui/traits/impl-object-overlap-issue-23853.stderr +++ b/tests/ui/traits/impl-object-overlap-issue-23853.stderr @@ -6,7 +6,7 @@ LL | trait Foo { fn dummy(&self) { } } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/impl.stderr b/tests/ui/traits/impl.stderr index 9216a33c1d075..c17957f1e64c7 100644 --- a/tests/ui/traits/impl.stderr +++ b/tests/ui/traits/impl.stderr @@ -6,7 +6,7 @@ LL | trait T { LL | fn t(&self) {} | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/issue-38033.stderr b/tests/ui/traits/issue-38033.stderr index 05385e8cf4d9d..fb713c564cf14 100644 --- a/tests/ui/traits/issue-38033.stderr +++ b/tests/ui/traits/issue-38033.stderr @@ -7,7 +7,7 @@ LL | trait IntoFuture { LL | fn into_future(self) -> Self::Future; | ^^^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/issue-6128.stderr b/tests/ui/traits/issue-6128.stderr index c9518ea41ea70..1c0460df69e83 100644 --- a/tests/ui/traits/issue-6128.stderr +++ b/tests/ui/traits/issue-6128.stderr @@ -8,7 +8,7 @@ LL | fn f(&self, _: Edge); LL | fn g(&self, _: Node); | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/missing-for-type-in-impl.e2015.stderr b/tests/ui/traits/missing-for-type-in-impl.e2015.stderr index c8a1329e3d0f6..aafab577e39aa 100644 --- a/tests/ui/traits/missing-for-type-in-impl.e2015.stderr +++ b/tests/ui/traits/missing-for-type-in-impl.e2015.stderr @@ -6,7 +6,7 @@ LL | impl Foo { | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | impl dyn Foo { diff --git a/tests/ui/traits/multidispatch-conditional-impl-not-considered.stderr b/tests/ui/traits/multidispatch-conditional-impl-not-considered.stderr index 25313a477f7af..8a9c2206331e0 100644 --- a/tests/ui/traits/multidispatch-conditional-impl-not-considered.stderr +++ b/tests/ui/traits/multidispatch-conditional-impl-not-considered.stderr @@ -4,7 +4,7 @@ warning: trait `Foo` is never used LL | trait Foo { | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/multidispatch-infer-convert-target.stderr b/tests/ui/traits/multidispatch-infer-convert-target.stderr index c8c1b64271950..fbf57e9327f5e 100644 --- a/tests/ui/traits/multidispatch-infer-convert-target.stderr +++ b/tests/ui/traits/multidispatch-infer-convert-target.stderr @@ -6,7 +6,7 @@ LL | trait Convert { LL | fn convert(&self) -> Target; | ^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/trait-upcasting/lifetime.stderr b/tests/ui/traits/trait-upcasting/lifetime.stderr index 589e9816d5adc..f41ea68053a7d 100644 --- a/tests/ui/traits/trait-upcasting/lifetime.stderr +++ b/tests/ui/traits/trait-upcasting/lifetime.stderr @@ -10,7 +10,7 @@ LL | fn z(&self) -> i32 { LL | fn y(&self) -> i32 { | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: method `w` is never used --> $DIR/lifetime.rs:22:8 diff --git a/tests/ui/traits/trait-upcasting/replace-vptr.stderr b/tests/ui/traits/trait-upcasting/replace-vptr.stderr index 1a8bfd1bfa6e5..932112470c00b 100644 --- a/tests/ui/traits/trait-upcasting/replace-vptr.stderr +++ b/tests/ui/traits/trait-upcasting/replace-vptr.stderr @@ -6,7 +6,7 @@ LL | trait A { LL | fn foo_a(&self); | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: method `foo_c` is never used --> $DIR/replace-vptr.rs:12:8 diff --git a/tests/ui/traits/unspecified-self-in-trait-ref.stderr b/tests/ui/traits/unspecified-self-in-trait-ref.stderr index 6f5ae786de6bc..ff26e4e544ba5 100644 --- a/tests/ui/traits/unspecified-self-in-trait-ref.stderr +++ b/tests/ui/traits/unspecified-self-in-trait-ref.stderr @@ -6,7 +6,7 @@ LL | let a = Foo::lol(); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | let a = ::lol(); diff --git a/tests/ui/trivial_casts-rpass.stderr b/tests/ui/trivial_casts-rpass.stderr index 74698b61ab4a4..58a134580d411 100644 --- a/tests/ui/trivial_casts-rpass.stderr +++ b/tests/ui/trivial_casts-rpass.stderr @@ -6,7 +6,7 @@ LL | trait Foo { LL | fn foo(&self) {} | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/type-alias-enum-variants/enum-variant-priority-lint-ambiguous_associated_items.stderr b/tests/ui/type-alias-enum-variants/enum-variant-priority-lint-ambiguous_associated_items.stderr index 0f42fcbe04d0a..79bd1f2adc17b 100644 --- a/tests/ui/type-alias-enum-variants/enum-variant-priority-lint-ambiguous_associated_items.stderr +++ b/tests/ui/type-alias-enum-variants/enum-variant-priority-lint-ambiguous_associated_items.stderr @@ -16,7 +16,7 @@ note: `V` could also refer to the associated type defined here | LL | type V; | ^^^^^^ - = note: `#[deny(ambiguous_associated_items)]` on by default + = note: `#[deny(ambiguous_associated_items)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error diff --git a/tests/ui/type/default_type_parameter_in_fn_or_impl.stderr b/tests/ui/type/default_type_parameter_in_fn_or_impl.stderr index a3205cd3c29ca..40b9c0ca89fcb 100644 --- a/tests/ui/type/default_type_parameter_in_fn_or_impl.stderr +++ b/tests/ui/type/default_type_parameter_in_fn_or_impl.stderr @@ -6,7 +6,7 @@ LL | fn avg(_: T) {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions --> $DIR/default_type_parameter_in_fn_or_impl.rs:8:6 @@ -28,7 +28,7 @@ LL | fn avg(_: T) {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions @@ -39,5 +39,5 @@ LL | impl S {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.stderr b/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.stderr index 6450cc30ac05f..190ef0f472463 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.stderr +++ b/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.stderr @@ -4,7 +4,7 @@ warning: unused variable: `item` LL | for item in y { | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` | - = note: `#[warn(unused_variables)]` on by default + = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default warning: value assigned to `counter` is never read --> $DIR/unboxed-closures-counter-not-moved.rs:24:9 @@ -13,7 +13,7 @@ LL | counter += 1; | ^^^^^^^ | = help: maybe it is overwritten before being read? - = note: `#[warn(unused_assignments)]` on by default + = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default warning: unused variable: `counter` --> $DIR/unboxed-closures-counter-not-moved.rs:24:9 diff --git a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr index 813e2eea56848..24590128107b3 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr +++ b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr @@ -5,7 +5,7 @@ LL | move || x += 1; | ^ | = help: did you mean to capture by reference instead? - = note: `#[warn(unused_variables)]` on by default + = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default warning: unused variable: `x` --> $DIR/unboxed-closures-move-mutable.rs:20:17 diff --git a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr index a02c6041e45fa..34a01baea1c22 100644 --- a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr +++ b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr @@ -11,7 +11,7 @@ note: an unsafe function restricts its caller, but its body is safe by default | LL | unsafe fn foo() { | ^^^^^^^^^^^^^^^ - = note: `#[warn(unsafe_op_in_unsafe_fn)]` on by default + = note: `#[warn(unsafe_op_in_unsafe_fn)]` (part of `#[warn(rust_2024_compatibility)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.stderr b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.stderr index 2ad1de5102d95..1e05f9f4e81f9 100644 --- a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.stderr +++ b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.stderr @@ -11,7 +11,7 @@ note: an unsafe function restricts its caller, but its body is safe by default | LL | unsafe fn foo() { | ^^^^^^^^^^^^^^^ - = note: `#[warn(unsafe_op_in_unsafe_fn)]` on by default + = note: `#[warn(unsafe_op_in_unsafe_fn)]` (part of `#[warn(rust_2024_compatibility)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr index a381f2acdce4f..098b2cae8a511 100644 --- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr +++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr @@ -6,7 +6,7 @@ LL | trait Foo> { | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | trait Foo> { diff --git a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr index 34ed8bd214674..ebe609af38a86 100644 --- a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr +++ b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr @@ -6,7 +6,7 @@ LL | trait TheTrait { fn dummy(&self) { } } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr b/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr index 9a8faf7a64e84..5161e2aabc169 100644 --- a/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr +++ b/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr @@ -6,7 +6,7 @@ LL | trait Foo { fn dummy(&self, arg: T) { } } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted