From 38d4c1b2fc6820a48fd1ad7e8e7b68cb71c0bf79 Mon Sep 17 00:00:00 2001 From: Scott McMurray Date: Thu, 20 Jun 2019 23:38:58 -0700 Subject: [PATCH 01/21] Fix the links in Vec(Deque)-from-Vec(Deque) Ok, I can't use `std` in doc-links, only in doc-tests. Try 7... --- src/liballoc/collections/vec_deque.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs index 71faf672962b3..0e98dd53ef7f1 100644 --- a/src/liballoc/collections/vec_deque.rs +++ b/src/liballoc/collections/vec_deque.rs @@ -2711,6 +2711,9 @@ impl fmt::Debug for VecDeque { impl From> for VecDeque { /// Turn a [`Vec`] into a [`VecDeque`]. /// + /// [`Vec`]: crate::vec::Vec + /// [`VecDeque`]: crate::collections::VecDeque + /// /// This avoids reallocating where possible, but the conditions for that are /// strict, and subject to change, and so shouldn't be relied upon unless the /// `Vec` came from `From>` and hasn't been reallocated. @@ -2742,6 +2745,9 @@ impl From> for VecDeque { impl From> for Vec { /// Turn a [`VecDeque`] into a [`Vec`]. /// + /// [`Vec`]: crate::vec::Vec + /// [`VecDeque`]: crate::collections::VecDeque + /// /// This never needs to re-allocate, but does need to do O(n) data movement if /// the circular buffer doesn't happen to be at the beginning of the allocation. /// From 374daa7985ec779b1c674fdab2e04e47f4c4094e Mon Sep 17 00:00:00 2001 From: Wesley Wiser Date: Thu, 11 Jul 2019 21:50:00 -0400 Subject: [PATCH 02/21] Revert "Emit warning when trying to use PGO in conjunction with unwinding on Windows." This reverts commit 74a39a39a4a0650d110083afa6e0b226f7b61ca9. --- src/librustc/session/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index b17ba8de73049..3cbf0ee213ae3 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -1303,15 +1303,15 @@ fn validate_commandline_args_with_session_available(sess: &Session) { } // PGO does not work reliably with panic=unwind on Windows. Let's make it - // a warning to combine the two for now. It always runs into an assertions + // an error to combine the two for now. It always runs into an assertions // if LLVM is built with assertions, but without assertions it sometimes // does not crash and will probably generate a corrupted binary. if sess.opts.cg.profile_generate.enabled() && sess.target.target.options.is_like_msvc && sess.panic_strategy() == PanicStrategy::Unwind { - sess.warn("Profile-guided optimization does not yet work in conjunction \ - with `-Cpanic=unwind` on Windows when targeting MSVC. \ - See https://github.com/rust-lang/rust/issues/61002 for details."); + sess.err("Profile-guided optimization does not yet work in conjunction \ + with `-Cpanic=unwind` on Windows when targeting MSVC. \ + See https://github.com/rust-lang/rust/issues/61002 for details."); } } From 3622311d53b6aeb454bfc55cec5e6b06f88597c8 Mon Sep 17 00:00:00 2001 From: Wesley Wiser Date: Thu, 11 Jul 2019 21:46:32 -0400 Subject: [PATCH 03/21] Only error about MSVC + PGO + unwind if we're generating code When `rustc` is invoked with the `--print` argument, we don't actually generate any code (unless it's the `native-static-libs` option). So we don't need to error our in this case since there's no risk of generating either LLVM assertions or corrupted binaries. --- src/librustc/session/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 3cbf0ee213ae3..664926a152f14 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -9,7 +9,7 @@ use crate::lint; use crate::lint::builtin::BuiltinLintDiagnostics; use crate::middle::allocator::AllocatorKind; use crate::middle::dependency_format; -use crate::session::config::{OutputType, SwitchWithOptPath}; +use crate::session::config::{OutputType, PrintRequest, SwitchWithOptPath}; use crate::session::search_paths::{PathKind, SearchPath}; use crate::util::nodemap::{FxHashMap, FxHashSet}; use crate::util::common::{duration_to_secs_str, ErrorReported}; @@ -1306,9 +1306,12 @@ fn validate_commandline_args_with_session_available(sess: &Session) { // an error to combine the two for now. It always runs into an assertions // if LLVM is built with assertions, but without assertions it sometimes // does not crash and will probably generate a corrupted binary. + // We should only display this error if we're actually going to run PGO. + // If we're just supposed to print out some data, don't show the error (#61002). if sess.opts.cg.profile_generate.enabled() && sess.target.target.options.is_like_msvc && - sess.panic_strategy() == PanicStrategy::Unwind { + sess.panic_strategy() == PanicStrategy::Unwind && + sess.opts.prints.iter().all(|&p| p == PrintRequest::NativeStaticLibs) { sess.err("Profile-guided optimization does not yet work in conjunction \ with `-Cpanic=unwind` on Windows when targeting MSVC. \ See https://github.com/rust-lang/rust/issues/61002 for details."); From b7cbd4ec47640323e5b25cc64110f5ff414e4946 Mon Sep 17 00:00:00 2001 From: Limira <2409315-limira-rs@users.noreply.gitlab.com> Date: Tue, 16 Jul 2019 11:30:48 +0700 Subject: [PATCH 04/21] Update the help message on error for self type --- src/librustc_typeck/check/wfcheck.rs | 10 +++++++--- .../feature-gate-arbitrary-self-types.stderr | 6 +++--- ...eature-gate-arbitrary_self_types-raw-pointer.stderr | 6 +++--- src/test/ui/issues/issue-56806.stderr | 2 +- src/test/ui/span/issue-27522.stderr | 2 +- src/test/ui/ufcs/ufcs-explicit-self-bad.stderr | 6 +++--- 6 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/librustc_typeck/check/wfcheck.rs b/src/librustc_typeck/check/wfcheck.rs index 68e5e7d4fd245..32f1f8c6188fe 100644 --- a/src/librustc_typeck/check/wfcheck.rs +++ b/src/librustc_typeck/check/wfcheck.rs @@ -769,6 +769,10 @@ fn check_method_receiver<'fcx, 'tcx>( method: &ty::AssocItem, self_ty: Ty<'tcx>, ) { + const HELP_FOR_SELF_TYPE: &str = + "consider changing to `self`, `&self`, `&mut self`, `self: Box`, \ + `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one \ + of the previous types except `Self`)"; // Check that the method has a valid receiver type, given the type `Self`. debug!("check_method_receiver({:?}, self_ty={:?})", method, self_ty); @@ -805,7 +809,7 @@ fn check_method_receiver<'fcx, 'tcx>( fcx.tcx.sess.diagnostic().mut_span_err( span, &format!("invalid method receiver type: {:?}", receiver_ty) ).note("type of `self` must be `Self` or a type that dereferences to it") - .help("consider changing to `self`, `&self`, `&mut self`, or `self: Box`") + .help(HELP_FOR_SELF_TYPE) .code(DiagnosticId::Error("E0307".into())) .emit(); } @@ -823,14 +827,14 @@ fn check_method_receiver<'fcx, 'tcx>( the `arbitrary_self_types` feature", receiver_ty, ), - ).help("consider changing to `self`, `&self`, `&mut self`, or `self: Box`") + ).help(HELP_FOR_SELF_TYPE) .emit(); } else { // Report error; would not have worked with `arbitrary_self_types`. fcx.tcx.sess.diagnostic().mut_span_err( span, &format!("invalid method receiver type: {:?}", receiver_ty) ).note("type must be `Self` or a type that dereferences to it") - .help("consider changing to `self`, `&self`, `&mut self`, or `self: Box`") + .help(HELP_FOR_SELF_TYPE) .code(DiagnosticId::Error("E0307".into())) .emit(); } diff --git a/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr b/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr index ed5fef689180d..a70bf1f1990ad 100644 --- a/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr +++ b/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr @@ -6,7 +6,7 @@ LL | fn foo(self: Ptr); | = note: for more information, see https://github.com/rust-lang/rust/issues/44874 = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable - = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` + = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0658]: `Ptr` cannot be used as the type of `self` without the `arbitrary_self_types` feature --> $DIR/feature-gate-arbitrary-self-types.rs:22:18 @@ -16,7 +16,7 @@ LL | fn foo(self: Ptr) {} | = note: for more information, see https://github.com/rust-lang/rust/issues/44874 = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable - = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` + = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0658]: `std::boxed::Box>` cannot be used as the type of `self` without the `arbitrary_self_types` feature --> $DIR/feature-gate-arbitrary-self-types.rs:26:18 @@ -26,7 +26,7 @@ LL | fn bar(self: Box>) {} | = note: for more information, see https://github.com/rust-lang/rust/issues/44874 = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable - = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` + = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error: aborting due to 3 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-arbitrary_self_types-raw-pointer.stderr b/src/test/ui/feature-gates/feature-gate-arbitrary_self_types-raw-pointer.stderr index 4963f9f461c1e..0f8863b87150f 100644 --- a/src/test/ui/feature-gates/feature-gate-arbitrary_self_types-raw-pointer.stderr +++ b/src/test/ui/feature-gates/feature-gate-arbitrary_self_types-raw-pointer.stderr @@ -6,7 +6,7 @@ LL | fn bar(self: *const Self); | = note: for more information, see https://github.com/rust-lang/rust/issues/44874 = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable - = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` + = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0658]: `*const Foo` cannot be used as the type of `self` without the `arbitrary_self_types` feature --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:4:18 @@ -16,7 +16,7 @@ LL | fn foo(self: *const Self) {} | = note: for more information, see https://github.com/rust-lang/rust/issues/44874 = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable - = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` + = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0658]: `*const ()` cannot be used as the type of `self` without the `arbitrary_self_types` feature --> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:14:18 @@ -26,7 +26,7 @@ LL | fn bar(self: *const Self) {} | = note: for more information, see https://github.com/rust-lang/rust/issues/44874 = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable - = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` + = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-56806.stderr b/src/test/ui/issues/issue-56806.stderr index 96979b9dc1eec..fae6a26720f36 100644 --- a/src/test/ui/issues/issue-56806.stderr +++ b/src/test/ui/issues/issue-56806.stderr @@ -5,7 +5,7 @@ LL | fn dyn_instead_of_self(self: Box); | ^^^^^^^^^^^^^^ | = note: type must be `Self` or a type that dereferences to it - = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` + = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error: aborting due to previous error diff --git a/src/test/ui/span/issue-27522.stderr b/src/test/ui/span/issue-27522.stderr index 46f424b1927b1..88dfee1cada3f 100644 --- a/src/test/ui/span/issue-27522.stderr +++ b/src/test/ui/span/issue-27522.stderr @@ -5,7 +5,7 @@ LL | fn handler(self: &SomeType); | ^^^^^^^^^ | = note: type must be `Self` or a type that dereferences to it - = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` + = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error: aborting due to previous error diff --git a/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr b/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr index 1251d6eee80f0..6da20e37577b0 100644 --- a/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr +++ b/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr @@ -5,7 +5,7 @@ LL | fn foo(self: isize, x: isize) -> isize { | ^^^^^ | = note: type must be `Self` or a type that dereferences to it - = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` + = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0307]: invalid method receiver type: Bar --> $DIR/ufcs-explicit-self-bad.rs:19:18 @@ -14,7 +14,7 @@ LL | fn foo(self: Bar, x: isize) -> isize { | ^^^^^^^^^^ | = note: type must be `Self` or a type that dereferences to it - = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` + = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0307]: invalid method receiver type: &Bar --> $DIR/ufcs-explicit-self-bad.rs:23:18 @@ -23,7 +23,7 @@ LL | fn bar(self: &Bar, x: isize) -> isize { | ^^^^^^^^^^^ | = note: type must be `Self` or a type that dereferences to it - = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` + = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0308]: mismatched method receiver --> $DIR/ufcs-explicit-self-bad.rs:37:21 From 2ced474e808d59e4b3bf2c6874e40446a4598f51 Mon Sep 17 00:00:00 2001 From: Ferdia McKeogh Date: Mon, 15 Jul 2019 19:45:51 +0200 Subject: [PATCH 05/21] Check that trait is exported or public before adding intercrate ambiguity hint --- src/librustc/traits/specialize/mod.rs | 8 ++++++-- .../ui/coherence/coherence-overlap-upstream.old.stderr | 2 -- .../ui/coherence/coherence-overlap-upstream.re.stderr | 2 -- ...ence_copy_like_err_fundamental_struct_tuple.old.stderr | 2 -- ...rence_copy_like_err_fundamental_struct_tuple.re.stderr | 2 -- .../coherence/coherence_copy_like_err_struct.old.stderr | 2 -- .../ui/coherence/coherence_copy_like_err_struct.re.stderr | 2 -- .../ui/coherence/coherence_copy_like_err_tuple.old.stderr | 2 -- .../ui/coherence/coherence_copy_like_err_tuple.re.stderr | 2 -- src/test/ui/issues/issue-48728.stderr | 2 -- src/test/ui/specialization/issue-52050.stderr | 2 -- 11 files changed, 6 insertions(+), 22 deletions(-) diff --git a/src/librustc/traits/specialize/mod.rs b/src/librustc/traits/specialize/mod.rs index f0389bb037ac5..9027d330a90f6 100644 --- a/src/librustc/traits/specialize/mod.rs +++ b/src/librustc/traits/specialize/mod.rs @@ -366,8 +366,12 @@ pub(super) fn specialization_graph_provider( } } - for cause in &overlap.intercrate_ambiguity_causes { - cause.add_intercrate_ambiguity_hint(&mut err); + let access_levels = tcx.privacy_access_levels(impl_def_id.krate); + let id = tcx.hir().as_local_hir_id(impl_def_id).unwrap(); + if access_levels.is_exported(id) || access_levels.is_public(id) { + for cause in &overlap.intercrate_ambiguity_causes { + cause.add_intercrate_ambiguity_hint(&mut err); + } } if overlap.involves_placeholder { diff --git a/src/test/ui/coherence/coherence-overlap-upstream.old.stderr b/src/test/ui/coherence/coherence-overlap-upstream.old.stderr index 6c3484c2d8c4d..dea948ff8abbb 100644 --- a/src/test/ui/coherence/coherence-overlap-upstream.old.stderr +++ b/src/test/ui/coherence/coherence-overlap-upstream.old.stderr @@ -5,8 +5,6 @@ LL | impl Foo for T where T: Remote {} | --------------------------------- first implementation here LL | impl Foo for i16 {} | ^^^^^^^^^^^^^^^^ conflicting implementation for `i16` - | - = note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-overlap-upstream.re.stderr b/src/test/ui/coherence/coherence-overlap-upstream.re.stderr index 6c3484c2d8c4d..dea948ff8abbb 100644 --- a/src/test/ui/coherence/coherence-overlap-upstream.re.stderr +++ b/src/test/ui/coherence/coherence-overlap-upstream.re.stderr @@ -5,8 +5,6 @@ LL | impl Foo for T where T: Remote {} | --------------------------------- first implementation here LL | impl Foo for i16 {} | ^^^^^^^^^^^^^^^^ conflicting implementation for `i16` - | - = note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.old.stderr b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.old.stderr index 12c7a1f977c3f..0ec4f0bb8e74d 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.old.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.old.stderr @@ -6,8 +6,6 @@ LL | impl MyTrait for T { } ... LL | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyFundamentalStruct<(MyType,)>` - | - = note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyFundamentalStruct<(MyType,)>` in future versions error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.re.stderr b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.re.stderr index 12c7a1f977c3f..0ec4f0bb8e74d 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.re.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.re.stderr @@ -6,8 +6,6 @@ LL | impl MyTrait for T { } ... LL | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyFundamentalStruct<(MyType,)>` - | - = note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyFundamentalStruct<(MyType,)>` in future versions error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence_copy_like_err_struct.old.stderr b/src/test/ui/coherence/coherence_copy_like_err_struct.old.stderr index 1b6c62e9bf3a8..e5862fdda7c58 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_struct.old.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_struct.old.stderr @@ -6,8 +6,6 @@ LL | impl MyTrait for T { } ... LL | impl MyTrait for lib::MyStruct { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyStruct` - | - = note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyStruct` in future versions error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence_copy_like_err_struct.re.stderr b/src/test/ui/coherence/coherence_copy_like_err_struct.re.stderr index 1b6c62e9bf3a8..e5862fdda7c58 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_struct.re.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_struct.re.stderr @@ -6,8 +6,6 @@ LL | impl MyTrait for T { } ... LL | impl MyTrait for lib::MyStruct { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyStruct` - | - = note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyStruct` in future versions error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence_copy_like_err_tuple.old.stderr b/src/test/ui/coherence/coherence_copy_like_err_tuple.old.stderr index 11bd788c76153..a3c4ef8e105a2 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_tuple.old.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_tuple.old.stderr @@ -6,8 +6,6 @@ LL | impl MyTrait for T { } ... LL | impl MyTrait for (MyType,) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(MyType,)` - | - = note: upstream crates may add new impl of trait `lib::MyCopy` for type `(MyType,)` in future versions error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence_copy_like_err_tuple.re.stderr b/src/test/ui/coherence/coherence_copy_like_err_tuple.re.stderr index 11bd788c76153..a3c4ef8e105a2 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_tuple.re.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_tuple.re.stderr @@ -6,8 +6,6 @@ LL | impl MyTrait for T { } ... LL | impl MyTrait for (MyType,) { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(MyType,)` - | - = note: upstream crates may add new impl of trait `lib::MyCopy` for type `(MyType,)` in future versions error: aborting due to previous error diff --git a/src/test/ui/issues/issue-48728.stderr b/src/test/ui/issues/issue-48728.stderr index 99a9bf9903e25..777e1fc9c27ea 100644 --- a/src/test/ui/issues/issue-48728.stderr +++ b/src/test/ui/issues/issue-48728.stderr @@ -6,8 +6,6 @@ LL | #[derive(Clone)] ... LL | impl Clone for Node<[T]> { | ------------------------------------------- first implementation here - | - = note: upstream crates may add new impl of trait `std::clone::Clone` for type `[_]` in future versions error: aborting due to previous error diff --git a/src/test/ui/specialization/issue-52050.stderr b/src/test/ui/specialization/issue-52050.stderr index dcb34f3ad4836..583c580d341ba 100644 --- a/src/test/ui/specialization/issue-52050.stderr +++ b/src/test/ui/specialization/issue-52050.stderr @@ -10,8 +10,6 @@ LL | | } LL | LL | impl IntoPyDictPointer for () | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `()` - | - = note: upstream crates may add new impl of trait `std::iter::Iterator` for type `()` in future versions error: aborting due to previous error From 3c119443767553d31c4c028a7c5519750897fc0a Mon Sep 17 00:00:00 2001 From: Ferdia McKeogh Date: Tue, 16 Jul 2019 07:51:13 +0200 Subject: [PATCH 06/21] Suggested change --- src/librustc/traits/specialize/mod.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/librustc/traits/specialize/mod.rs b/src/librustc/traits/specialize/mod.rs index 9027d330a90f6..8a84fca143809 100644 --- a/src/librustc/traits/specialize/mod.rs +++ b/src/librustc/traits/specialize/mod.rs @@ -367,10 +367,11 @@ pub(super) fn specialization_graph_provider( } let access_levels = tcx.privacy_access_levels(impl_def_id.krate); - let id = tcx.hir().as_local_hir_id(impl_def_id).unwrap(); - if access_levels.is_exported(id) || access_levels.is_public(id) { - for cause in &overlap.intercrate_ambiguity_causes { - cause.add_intercrate_ambiguity_hint(&mut err); + if let Some(id) = tcx.hir().as_local_hir_id(impl_def_id) { + if access_levels.is_exported(id) || access_levels.is_public(id) { + for cause in &overlap.intercrate_ambiguity_causes { + cause.add_intercrate_ambiguity_hint(&mut err); + } } } From 4785311893296724d6499e5084d6a0c8adf6f341 Mon Sep 17 00:00:00 2001 From: Dodo Date: Tue, 16 Jul 2019 21:49:01 +0200 Subject: [PATCH 07/21] fix double wording --- src/libcore/slice/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index 363ae08827558..3c1e764768ecc 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -645,7 +645,7 @@ impl [T] { /// /// See [`chunks_exact_mut`] for a variant of this iterator that returns chunks of always /// exactly `chunk_size` elements, and [`rchunks_mut`] for the same iterator but starting at - /// the end of the slice of the slice. + /// the end of the slice. /// /// # Panics /// From 9341e90b443229eeb9c1dffbea7f37b7953ba117 Mon Sep 17 00:00:00 2001 From: Dodo Date: Tue, 16 Jul 2019 21:57:32 +0200 Subject: [PATCH 08/21] found more repeated wording --- src/libcore/slice/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index 3c1e764768ecc..a1bc10dc2ef0a 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -611,7 +611,7 @@ impl [T] { /// /// See [`chunks_exact`] for a variant of this iterator that returns chunks of always exactly /// `chunk_size` elements, and [`rchunks`] for the same iterator but starting at the end of the - /// slice of the slice. + /// slice. /// /// # Panics /// @@ -727,7 +727,7 @@ impl [T] { /// /// See [`chunks_mut`] for a variant of this iterator that also returns the remainder as a /// smaller chunk, and [`rchunks_exact_mut`] for the same iterator but starting at the end of - /// the slice of the slice. + /// the slice. /// /// # Panics /// From 03178f31c461af42bb61815cc206443c5842ebe0 Mon Sep 17 00:00:00 2001 From: Matthew Jasper Date: Sun, 14 Jul 2019 11:34:13 +0100 Subject: [PATCH 09/21] Change all run-pass hygiene tests to `ui` tests Change some tests to `check-pass` that are only testing name resolution. --- .../{run-pass => ui}/hygiene/auxiliary/legacy_interaction.rs | 1 - src/test/{run-pass => ui}/hygiene/auxiliary/my_crate.rs | 1 - .../{run-pass => ui}/hygiene/auxiliary/unhygienic_example.rs | 1 - src/test/{run-pass => ui}/hygiene/auxiliary/xcrate.rs | 1 - src/test/ui/hygiene/dollar-crate-modern.rs | 2 +- src/test/ui/hygiene/expansion-info-reset.rs | 3 --- src/test/ui/hygiene/expansion-info-reset.stderr | 2 +- src/test/{run-pass => ui}/hygiene/hygiene-dodging-1.rs | 0 src/test/{run-pass => ui}/hygiene/hygiene.rs | 0 src/test/{run-pass => ui}/hygiene/hygienic-labels-in-let.rs | 0 .../{run-pass => ui}/hygiene/hygienic-labels-in-let.stderr | 0 src/test/{run-pass => ui}/hygiene/hygienic-labels.rs | 0 src/test/{run-pass => ui}/hygiene/hygienic-labels.stderr | 0 src/test/{run-pass => ui}/hygiene/issue-44128.rs | 2 +- src/test/{run-pass => ui}/hygiene/issue-47311.rs | 2 +- src/test/{run-pass => ui}/hygiene/issue-47312.rs | 2 +- src/test/{run-pass => ui}/hygiene/items.rs | 2 +- src/test/{run-pass => ui}/hygiene/legacy_interaction.rs | 4 ++-- src/test/{run-pass => ui}/hygiene/lexical.rs | 2 +- src/test/ui/hygiene/local_inner_macros.rs | 2 +- src/test/{run-pass => ui}/hygiene/specialization.rs | 0 .../hygiene/trait_items.rs => ui/hygiene/trait_items-2.rs} | 2 +- src/test/ui/hygiene/transparent-basic.rs | 2 +- src/test/{run-pass => ui}/hygiene/ty_params.rs | 2 +- src/test/{run-pass => ui}/hygiene/wrap_unhygienic_example.rs | 2 +- src/test/{run-pass => ui}/hygiene/xcrate.rs | 0 26 files changed, 14 insertions(+), 21 deletions(-) rename src/test/{run-pass => ui}/hygiene/auxiliary/legacy_interaction.rs (92%) rename src/test/{run-pass => ui}/hygiene/auxiliary/my_crate.rs (53%) rename src/test/{run-pass => ui}/hygiene/auxiliary/unhygienic_example.rs (98%) rename src/test/{run-pass => ui}/hygiene/auxiliary/xcrate.rs (96%) rename src/test/{run-pass => ui}/hygiene/hygiene-dodging-1.rs (100%) rename src/test/{run-pass => ui}/hygiene/hygiene.rs (100%) rename src/test/{run-pass => ui}/hygiene/hygienic-labels-in-let.rs (100%) rename src/test/{run-pass => ui}/hygiene/hygienic-labels-in-let.stderr (100%) rename src/test/{run-pass => ui}/hygiene/hygienic-labels.rs (100%) rename src/test/{run-pass => ui}/hygiene/hygienic-labels.stderr (100%) rename src/test/{run-pass => ui}/hygiene/issue-44128.rs (94%) rename src/test/{run-pass => ui}/hygiene/issue-47311.rs (93%) rename src/test/{run-pass => ui}/hygiene/issue-47312.rs (95%) rename src/test/{run-pass => ui}/hygiene/items.rs (97%) rename src/test/{run-pass => ui}/hygiene/legacy_interaction.rs (95%) rename src/test/{run-pass => ui}/hygiene/lexical.rs (96%) rename src/test/{run-pass => ui}/hygiene/specialization.rs (100%) rename src/test/{run-pass/hygiene/trait_items.rs => ui/hygiene/trait_items-2.rs} (95%) rename src/test/{run-pass => ui}/hygiene/ty_params.rs (92%) rename src/test/{run-pass => ui}/hygiene/wrap_unhygienic_example.rs (98%) rename src/test/{run-pass => ui}/hygiene/xcrate.rs (100%) diff --git a/src/test/run-pass/hygiene/auxiliary/legacy_interaction.rs b/src/test/ui/hygiene/auxiliary/legacy_interaction.rs similarity index 92% rename from src/test/run-pass/hygiene/auxiliary/legacy_interaction.rs rename to src/test/ui/hygiene/auxiliary/legacy_interaction.rs index 0774fbecac1fe..90d5243b74b7b 100644 --- a/src/test/run-pass/hygiene/auxiliary/legacy_interaction.rs +++ b/src/test/ui/hygiene/auxiliary/legacy_interaction.rs @@ -1,4 +1,3 @@ -// run-pass // ignore-pretty pretty-printing is unhygienic #[macro_export] diff --git a/src/test/run-pass/hygiene/auxiliary/my_crate.rs b/src/test/ui/hygiene/auxiliary/my_crate.rs similarity index 53% rename from src/test/run-pass/hygiene/auxiliary/my_crate.rs rename to src/test/ui/hygiene/auxiliary/my_crate.rs index 5a7412e4bf5ec..cdc6c27d800bd 100644 --- a/src/test/run-pass/hygiene/auxiliary/my_crate.rs +++ b/src/test/ui/hygiene/auxiliary/my_crate.rs @@ -1,2 +1 @@ -// run-pass pub fn f() {} diff --git a/src/test/run-pass/hygiene/auxiliary/unhygienic_example.rs b/src/test/ui/hygiene/auxiliary/unhygienic_example.rs similarity index 98% rename from src/test/run-pass/hygiene/auxiliary/unhygienic_example.rs rename to src/test/ui/hygiene/auxiliary/unhygienic_example.rs index 3f66748bf300a..8e6e8f9b32f97 100644 --- a/src/test/run-pass/hygiene/auxiliary/unhygienic_example.rs +++ b/src/test/ui/hygiene/auxiliary/unhygienic_example.rs @@ -1,4 +1,3 @@ -// run-pass #![crate_type = "lib"] extern crate my_crate; diff --git a/src/test/run-pass/hygiene/auxiliary/xcrate.rs b/src/test/ui/hygiene/auxiliary/xcrate.rs similarity index 96% rename from src/test/run-pass/hygiene/auxiliary/xcrate.rs rename to src/test/ui/hygiene/auxiliary/xcrate.rs index 3862914d5840c..f5a911f57df69 100644 --- a/src/test/run-pass/hygiene/auxiliary/xcrate.rs +++ b/src/test/ui/hygiene/auxiliary/xcrate.rs @@ -1,4 +1,3 @@ -// run-pass #![feature(decl_macro)] #![allow(unused)] diff --git a/src/test/ui/hygiene/dollar-crate-modern.rs b/src/test/ui/hygiene/dollar-crate-modern.rs index 9c25e138d2c28..a432fb6eee17a 100644 --- a/src/test/ui/hygiene/dollar-crate-modern.rs +++ b/src/test/ui/hygiene/dollar-crate-modern.rs @@ -1,6 +1,6 @@ // Make sure `$crate` and `crate` work in for basic cases of nested macros. -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // aux-build:intercrate.rs #![feature(decl_macro, crate_in_paths)] diff --git a/src/test/ui/hygiene/expansion-info-reset.rs b/src/test/ui/hygiene/expansion-info-reset.rs index 5c384c4ada9fc..fa5f712121d90 100644 --- a/src/test/ui/hygiene/expansion-info-reset.rs +++ b/src/test/ui/hygiene/expansion-info-reset.rs @@ -1,6 +1,3 @@ -// FIXME: Investigate why expansion info for a single expansion id is reset from -// `MacroBang(format_args)` to `MacroAttribute(derive(Clone))` (issue #52363). - fn main() { format_args!({ #[derive(Clone)] struct S; }); //~^ ERROR format argument must be a string literal diff --git a/src/test/ui/hygiene/expansion-info-reset.stderr b/src/test/ui/hygiene/expansion-info-reset.stderr index 9dd954b16cdec..d8b602ce1c63b 100644 --- a/src/test/ui/hygiene/expansion-info-reset.stderr +++ b/src/test/ui/hygiene/expansion-info-reset.stderr @@ -1,5 +1,5 @@ error: format argument must be a string literal - --> $DIR/expansion-info-reset.rs:5:18 + --> $DIR/expansion-info-reset.rs:2:18 | LL | format_args!({ #[derive(Clone)] struct S; }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/run-pass/hygiene/hygiene-dodging-1.rs b/src/test/ui/hygiene/hygiene-dodging-1.rs similarity index 100% rename from src/test/run-pass/hygiene/hygiene-dodging-1.rs rename to src/test/ui/hygiene/hygiene-dodging-1.rs diff --git a/src/test/run-pass/hygiene/hygiene.rs b/src/test/ui/hygiene/hygiene.rs similarity index 100% rename from src/test/run-pass/hygiene/hygiene.rs rename to src/test/ui/hygiene/hygiene.rs diff --git a/src/test/run-pass/hygiene/hygienic-labels-in-let.rs b/src/test/ui/hygiene/hygienic-labels-in-let.rs similarity index 100% rename from src/test/run-pass/hygiene/hygienic-labels-in-let.rs rename to src/test/ui/hygiene/hygienic-labels-in-let.rs diff --git a/src/test/run-pass/hygiene/hygienic-labels-in-let.stderr b/src/test/ui/hygiene/hygienic-labels-in-let.stderr similarity index 100% rename from src/test/run-pass/hygiene/hygienic-labels-in-let.stderr rename to src/test/ui/hygiene/hygienic-labels-in-let.stderr diff --git a/src/test/run-pass/hygiene/hygienic-labels.rs b/src/test/ui/hygiene/hygienic-labels.rs similarity index 100% rename from src/test/run-pass/hygiene/hygienic-labels.rs rename to src/test/ui/hygiene/hygienic-labels.rs diff --git a/src/test/run-pass/hygiene/hygienic-labels.stderr b/src/test/ui/hygiene/hygienic-labels.stderr similarity index 100% rename from src/test/run-pass/hygiene/hygienic-labels.stderr rename to src/test/ui/hygiene/hygienic-labels.stderr diff --git a/src/test/run-pass/hygiene/issue-44128.rs b/src/test/ui/hygiene/issue-44128.rs similarity index 94% rename from src/test/run-pass/hygiene/issue-44128.rs rename to src/test/ui/hygiene/issue-44128.rs index 23ced9ae530d6..5e03bdb8c5be8 100644 --- a/src/test/run-pass/hygiene/issue-44128.rs +++ b/src/test/ui/hygiene/issue-44128.rs @@ -1,4 +1,4 @@ -// run-pass +// check-pass #![allow(unused_must_use)] #![feature(decl_macro)] diff --git a/src/test/run-pass/hygiene/issue-47311.rs b/src/test/ui/hygiene/issue-47311.rs similarity index 93% rename from src/test/run-pass/hygiene/issue-47311.rs rename to src/test/ui/hygiene/issue-47311.rs index 856184fbc8352..5c2379a8ababf 100644 --- a/src/test/run-pass/hygiene/issue-47311.rs +++ b/src/test/ui/hygiene/issue-47311.rs @@ -1,4 +1,4 @@ -// run-pass +// check-pass // ignore-pretty pretty-printing is unhygienic #![feature(decl_macro)] diff --git a/src/test/run-pass/hygiene/issue-47312.rs b/src/test/ui/hygiene/issue-47312.rs similarity index 95% rename from src/test/run-pass/hygiene/issue-47312.rs rename to src/test/ui/hygiene/issue-47312.rs index 88e7a028f92f2..bbcb3a7f39311 100644 --- a/src/test/run-pass/hygiene/issue-47312.rs +++ b/src/test/ui/hygiene/issue-47312.rs @@ -1,4 +1,4 @@ -// run-pass +// check-pass // ignore-pretty pretty-printing is unhygienic #![feature(decl_macro)] diff --git a/src/test/run-pass/hygiene/items.rs b/src/test/ui/hygiene/items.rs similarity index 97% rename from src/test/run-pass/hygiene/items.rs rename to src/test/ui/hygiene/items.rs index cdc271386b7d6..1c625a9728c4f 100644 --- a/src/test/run-pass/hygiene/items.rs +++ b/src/test/ui/hygiene/items.rs @@ -1,4 +1,4 @@ -// run-pass +// check-pass // ignore-pretty pretty-printing is unhygienic #![feature(decl_macro)] diff --git a/src/test/run-pass/hygiene/legacy_interaction.rs b/src/test/ui/hygiene/legacy_interaction.rs similarity index 95% rename from src/test/run-pass/hygiene/legacy_interaction.rs rename to src/test/ui/hygiene/legacy_interaction.rs index a5460a89f130c..52008eed51515 100644 --- a/src/test/run-pass/hygiene/legacy_interaction.rs +++ b/src/test/ui/hygiene/legacy_interaction.rs @@ -1,4 +1,4 @@ -// run-pass +// check-pass #![allow(dead_code)] // ignore-pretty pretty-printing is unhygienic @@ -12,7 +12,7 @@ extern crate legacy_interaction; // ```rust // macro_rules! m { // () => { -// fn f() // (1) +// fn f() {} // (1) // g() // (2) // } // } diff --git a/src/test/run-pass/hygiene/lexical.rs b/src/test/ui/hygiene/lexical.rs similarity index 96% rename from src/test/run-pass/hygiene/lexical.rs rename to src/test/ui/hygiene/lexical.rs index 20bda5508c814..3d25c720989bf 100644 --- a/src/test/run-pass/hygiene/lexical.rs +++ b/src/test/ui/hygiene/lexical.rs @@ -1,4 +1,4 @@ -// run-pass +// check-pass // ignore-pretty pretty-printing is unhygienic #![feature(decl_macro)] diff --git a/src/test/ui/hygiene/local_inner_macros.rs b/src/test/ui/hygiene/local_inner_macros.rs index f361e3d5d4963..71ffcac40d384 100644 --- a/src/test/ui/hygiene/local_inner_macros.rs +++ b/src/test/ui/hygiene/local_inner_macros.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // aux-build:local_inner_macros.rs extern crate local_inner_macros; diff --git a/src/test/run-pass/hygiene/specialization.rs b/src/test/ui/hygiene/specialization.rs similarity index 100% rename from src/test/run-pass/hygiene/specialization.rs rename to src/test/ui/hygiene/specialization.rs diff --git a/src/test/run-pass/hygiene/trait_items.rs b/src/test/ui/hygiene/trait_items-2.rs similarity index 95% rename from src/test/run-pass/hygiene/trait_items.rs rename to src/test/ui/hygiene/trait_items-2.rs index 680f228c9864e..39edfc37d6978 100644 --- a/src/test/run-pass/hygiene/trait_items.rs +++ b/src/test/ui/hygiene/trait_items-2.rs @@ -1,4 +1,4 @@ -// run-pass +// check-pass // ignore-pretty pretty-printing is unhygienic #![feature(decl_macro)] diff --git a/src/test/ui/hygiene/transparent-basic.rs b/src/test/ui/hygiene/transparent-basic.rs index 69dfc524989a4..bfa1713e4edda 100644 --- a/src/test/ui/hygiene/transparent-basic.rs +++ b/src/test/ui/hygiene/transparent-basic.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // aux-build:transparent-basic.rs #![feature(decl_macro, rustc_attrs)] diff --git a/src/test/run-pass/hygiene/ty_params.rs b/src/test/ui/hygiene/ty_params.rs similarity index 92% rename from src/test/run-pass/hygiene/ty_params.rs rename to src/test/ui/hygiene/ty_params.rs index dce4bd6489cd4..b296bfe598887 100644 --- a/src/test/run-pass/hygiene/ty_params.rs +++ b/src/test/ui/hygiene/ty_params.rs @@ -1,4 +1,4 @@ -// run-pass +// check-pass // ignore-pretty pretty-printing is unhygienic #![feature(decl_macro)] diff --git a/src/test/run-pass/hygiene/wrap_unhygienic_example.rs b/src/test/ui/hygiene/wrap_unhygienic_example.rs similarity index 98% rename from src/test/run-pass/hygiene/wrap_unhygienic_example.rs rename to src/test/ui/hygiene/wrap_unhygienic_example.rs index e0277e2bb743a..50c6b35ab18dd 100644 --- a/src/test/run-pass/hygiene/wrap_unhygienic_example.rs +++ b/src/test/ui/hygiene/wrap_unhygienic_example.rs @@ -1,4 +1,4 @@ -// run-pass +// check-pass // ignore-pretty pretty-printing is unhygienic // aux-build:my_crate.rs diff --git a/src/test/run-pass/hygiene/xcrate.rs b/src/test/ui/hygiene/xcrate.rs similarity index 100% rename from src/test/run-pass/hygiene/xcrate.rs rename to src/test/ui/hygiene/xcrate.rs From a4a7bb9a3f72505efb6ca9856af45287c8685d5e Mon Sep 17 00:00:00 2001 From: Matthew Jasper Date: Mon, 15 Jul 2019 22:26:45 +0100 Subject: [PATCH 10/21] Make pretty-expanded-hygiene a `ui` test `normalize-stdout-test` removes the need for Make, and it can be updated with `--bless` this way --- .../pretty-expanded-hygiene/Makefile | 21 ------------------- .../input.rs => ui/hygiene/unpretty-debug.rs} | 6 ++++++ .../hygiene/unpretty-debug.stdout} | 6 ++++++ 3 files changed, 12 insertions(+), 21 deletions(-) delete mode 100644 src/test/run-make-fulldeps/pretty-expanded-hygiene/Makefile rename src/test/{run-make-fulldeps/pretty-expanded-hygiene/input.rs => ui/hygiene/unpretty-debug.rs} (50%) rename src/test/{run-make-fulldeps/pretty-expanded-hygiene/input.pp.rs => ui/hygiene/unpretty-debug.stdout} (59%) diff --git a/src/test/run-make-fulldeps/pretty-expanded-hygiene/Makefile b/src/test/run-make-fulldeps/pretty-expanded-hygiene/Makefile deleted file mode 100644 index 136d7643ade37..0000000000000 --- a/src/test/run-make-fulldeps/pretty-expanded-hygiene/Makefile +++ /dev/null @@ -1,21 +0,0 @@ --include ../tools.mk - -REPLACEMENT := s/[0-9][0-9]*\#[0-9][0-9]*/$(shell date)/g - -all: - $(RUSTC) -o $(TMPDIR)/input.out -Z unstable-options \ - --pretty expanded,hygiene input.rs - - # the name/ctxt numbers are very internals-dependent and thus - # change relatively frequently, and testing for their exact values - # them will fail annoyingly, so we just check their positions - # (using a non-constant replacement like this will make it less - # likely the compiler matches whatever other dummy value we - # choose). - # - # (These need to be out-of-place because OSX/BSD & GNU sed - # differ.) - sed "$(REPLACEMENT)" input.pp.rs > $(TMPDIR)/input.pp.rs - sed "$(REPLACEMENT)" $(TMPDIR)/input.out > $(TMPDIR)/input.out.replaced - - diff -u $(TMPDIR)/input.out.replaced $(TMPDIR)/input.pp.rs diff --git a/src/test/run-make-fulldeps/pretty-expanded-hygiene/input.rs b/src/test/ui/hygiene/unpretty-debug.rs similarity index 50% rename from src/test/run-make-fulldeps/pretty-expanded-hygiene/input.rs rename to src/test/ui/hygiene/unpretty-debug.rs index ed3b48dbdc114..6e936bb3d830c 100644 --- a/src/test/run-make-fulldeps/pretty-expanded-hygiene/input.rs +++ b/src/test/ui/hygiene/unpretty-debug.rs @@ -1,3 +1,9 @@ +// check-pass +// compile-flags: -Zunpretty=expanded,hygiene + +// Don't break whenever Symbol numbering changes +// normalize-stdout-test "\d+#" -> "0#" + // minimal junk #![feature(no_core)] #![no_core] diff --git a/src/test/run-make-fulldeps/pretty-expanded-hygiene/input.pp.rs b/src/test/ui/hygiene/unpretty-debug.stdout similarity index 59% rename from src/test/run-make-fulldeps/pretty-expanded-hygiene/input.pp.rs rename to src/test/ui/hygiene/unpretty-debug.stdout index 570dece023dea..beac4c17abf9c 100644 --- a/src/test/run-make-fulldeps/pretty-expanded-hygiene/input.pp.rs +++ b/src/test/ui/hygiene/unpretty-debug.stdout @@ -1,3 +1,9 @@ +// check-pass +// compile-flags: -Zunpretty=expanded,hygiene + +// Don't break whenever Symbol numbering changes +// normalize-stdout-test "\d+#" -> "0#" + // minimal junk #![feature /* 0#0 */(no_core)] #![no_core /* 0#0 */] From 04f0d309dcbaa8425c702d1439592b87fff0a69e Mon Sep 17 00:00:00 2001 From: nathanwhit Date: Tue, 16 Jul 2019 15:41:43 -0400 Subject: [PATCH 11/21] Remove last use of mem::uninitialized from std::io::util --- src/libstd/io/util.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/libstd/io/util.rs b/src/libstd/io/util.rs index 2bfd3e4ad20e3..1efccb53b7551 100644 --- a/src/libstd/io/util.rs +++ b/src/libstd/io/util.rs @@ -44,10 +44,15 @@ pub fn copy(reader: &mut R, writer: &mut W) -> io::Result< where R: Read, W: Write { let mut buf = unsafe { - #[allow(deprecated)] - let mut buf: [u8; super::DEFAULT_BUF_SIZE] = mem::uninitialized(); - reader.initializer().initialize(&mut buf); - buf + // This is still technically undefined behavior due to creating a reference + // to uninitialized data, but within libstd we can rely on more guarantees + // than if this code were in an external lib + + // FIXME: This should probably be changed to an array of `MaybeUninit` + // once the `mem::MaybeUninit` slice APIs stabilize + let mut buf: mem::MaybeUninit<[u8; super::DEFAULT_BUF_SIZE]> = mem::MaybeUninit::uninit(); + reader.initializer().initialize(&mut *buf.as_mut_ptr()); + buf.assume_init() }; let mut written = 0; From 6471bd5f199a2825b23082a26574b1c26970b0e4 Mon Sep 17 00:00:00 2001 From: lzutao Date: Wed, 17 Jul 2019 10:44:12 +0700 Subject: [PATCH 12/21] Add missing link to Infallible in TryFrom doc --- src/libcore/convert.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs index c0de8e2ceb3f3..db3dde3fea6bd 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -477,6 +477,7 @@ pub trait TryInto: Sized { /// [`TryInto`]: trait.TryInto.html /// [`i32::MAX`]: ../../std/i32/constant.MAX.html /// [`!`]: ../../std/primitive.never.html +/// [`Infallible`]: enum.Infallible.html #[stable(feature = "try_from", since = "1.34.0")] pub trait TryFrom: Sized { /// The type returned in the event of a conversion error. From b7939173decca5ea2c681882c538e66a0ea8f84e Mon Sep 17 00:00:00 2001 From: Baoshan Pang Date: Wed, 17 Jul 2019 00:06:12 -0700 Subject: [PATCH 13/21] update data_layout and features --- src/librustc_target/spec/arm_wrs_vxworks.rs | 5 ++--- src/librustc_target/spec/armv7_wrs_vxworks.rs | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/librustc_target/spec/arm_wrs_vxworks.rs b/src/librustc_target/spec/arm_wrs_vxworks.rs index 7db587d9b35d4..06c51ae61068f 100644 --- a/src/librustc_target/spec/arm_wrs_vxworks.rs +++ b/src/librustc_target/spec/arm_wrs_vxworks.rs @@ -10,7 +10,7 @@ pub fn target() -> TargetResult { target_endian: "little".to_string(), target_pointer_width: "32".to_string(), target_c_int_width: "32".to_string(), - data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), + data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "vxworks".to_string(), target_env: "gnu".to_string(), @@ -19,12 +19,11 @@ pub fn target() -> TargetResult { options: TargetOptions { // Info about features at https://wiki.debian.org/ArmHardFloatPort - features: "+v7,+vfp3,+d16,+thumb2,-neon".to_string(), + features: "+v7,+vfp3,-d32,+thumb2,-neon".to_string(), cpu: "generic".to_string(), max_atomic_width: Some(64), abi_blacklist: super::arm_base::abi_blacklist(), target_mcount: "\u{1}__gnu_mcount_nc".to_string(), -// tls_model: "local-exec".to_string(), position_independent_executables: false, .. base } diff --git a/src/librustc_target/spec/armv7_wrs_vxworks.rs b/src/librustc_target/spec/armv7_wrs_vxworks.rs index 7db587d9b35d4..06c51ae61068f 100644 --- a/src/librustc_target/spec/armv7_wrs_vxworks.rs +++ b/src/librustc_target/spec/armv7_wrs_vxworks.rs @@ -10,7 +10,7 @@ pub fn target() -> TargetResult { target_endian: "little".to_string(), target_pointer_width: "32".to_string(), target_c_int_width: "32".to_string(), - data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), + data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "vxworks".to_string(), target_env: "gnu".to_string(), @@ -19,12 +19,11 @@ pub fn target() -> TargetResult { options: TargetOptions { // Info about features at https://wiki.debian.org/ArmHardFloatPort - features: "+v7,+vfp3,+d16,+thumb2,-neon".to_string(), + features: "+v7,+vfp3,-d32,+thumb2,-neon".to_string(), cpu: "generic".to_string(), max_atomic_width: Some(64), abi_blacklist: super::arm_base::abi_blacklist(), target_mcount: "\u{1}__gnu_mcount_nc".to_string(), -// tls_model: "local-exec".to_string(), position_independent_executables: false, .. base } From 8c589bca53fd9ce350092290fd0bf9c39994f8fb Mon Sep 17 00:00:00 2001 From: Ferdia McKeogh Date: Wed, 17 Jul 2019 15:00:14 +0200 Subject: [PATCH 14/21] Document link_section arbitrary bytes --- src/librustc_typeck/check/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 77d45cfa63c10..3990946291dfb 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -1447,6 +1447,9 @@ fn maybe_check_static_with_link_section(tcx: TyCtxt<'_>, id: DefId, span: Span) // other executable formats. Namely we can only embed a list of bytes, // nothing with pointers to anything else or relocations. If any relocation // show up, reject them here. + // #[link_section] may contain arbitrary, or even undefined bytes, but it is + // the consumer's responsibility to ensure all bytes that have been read + // have defined values. let instance = ty::Instance::mono(tcx, id); let cid = GlobalId { instance, From f8eb2a617e2386b4eb7452696488f329850bb676 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 17 Jul 2019 16:59:14 +0200 Subject: [PATCH 15/21] Disable Z3 in LLVM build --- src/bootstrap/native.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index f8d1abe299473..b25dc39378add 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -150,6 +150,7 @@ impl Step for Llvm { .define("WITH_POLLY", "OFF") .define("LLVM_ENABLE_TERMINFO", "OFF") .define("LLVM_ENABLE_LIBEDIT", "OFF") + .define("LLVM_ENABLE_Z3_SOLVER", "OFF") .define("LLVM_PARALLEL_COMPILE_JOBS", builder.jobs().to_string()) .define("LLVM_TARGET_ARCH", target.split('-').next().unwrap()) .define("LLVM_DEFAULT_TARGET_TRIPLE", target); From 14a1f7246b27f31906dfe9c70c58fdfe863e314d Mon Sep 17 00:00:00 2001 From: Ferdia McKeogh Date: Wed, 17 Jul 2019 19:55:44 +0200 Subject: [PATCH 16/21] Requested change --- src/librustc_typeck/check/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 3990946291dfb..1462c098b19ef 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -1442,12 +1442,12 @@ fn maybe_check_static_with_link_section(tcx: TyCtxt<'_>, id: DefId, span: Span) return } - // For the wasm32 target statics with #[link_section] are placed into custom + // For the wasm32 target statics with `#[link_section]` are placed into custom // sections of the final output file, but this isn't link custom sections of // other executable formats. Namely we can only embed a list of bytes, // nothing with pointers to anything else or relocations. If any relocation // show up, reject them here. - // #[link_section] may contain arbitrary, or even undefined bytes, but it is + // `#[link_section]` may contain arbitrary, or even undefined bytes, but it is // the consumer's responsibility to ensure all bytes that have been read // have defined values. let instance = ty::Instance::mono(tcx, id); From 387b6c3e782e61f979083ff960e6e18fcaa1fe2c Mon Sep 17 00:00:00 2001 From: Giles Cope Date: Wed, 17 Jul 2019 18:31:25 +0100 Subject: [PATCH 17/21] Test case for #62506. --- .../ui/generator/issue-62506-two_awaits.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/test/ui/generator/issue-62506-two_awaits.rs diff --git a/src/test/ui/generator/issue-62506-two_awaits.rs b/src/test/ui/generator/issue-62506-two_awaits.rs new file mode 100644 index 0000000000000..774019b6a5bda --- /dev/null +++ b/src/test/ui/generator/issue-62506-two_awaits.rs @@ -0,0 +1,18 @@ +// Output = String caused an ICE whereas Output = &'static str compiled successfully. +// Broken MIR: generator contains type std::string::String in MIR, +// but typeck only knows about {::Future, ()} +// check-pass +// edition:2018 + +#![feature(async_await)] +use std::future::Future; + +pub trait T { + type Future: Future; + fn bar() -> Self::Future; +} +pub async fn foo() where S: T { + S::bar().await; + S::bar().await; +} +pub fn main() {} From e5e1397adb755761393bc8e23671d0259a381d16 Mon Sep 17 00:00:00 2001 From: Samy Kacimi Date: Tue, 16 Jul 2019 22:17:38 +0200 Subject: [PATCH 18/21] normalize use of backticks in compiler messages for librustc/lint https://github.com/rust-lang/rust/issues/60532 --- src/librustc/lint/builtin.rs | 6 +++--- src/librustc/lint/mod.rs | 4 ++-- src/test/run-pass/extern/extern-prelude-core.stderr | 2 +- src/test/run-pass/extern/extern-prelude-std.stderr | 2 +- src/test/run-pass/if-ret.stderr | 2 +- src/test/run-pass/macros/macro-use-all-and-none.stderr | 2 +- .../rfc-2126-crate-paths/crate-path-absolute.stderr | 2 +- .../crate-path-visibility-ambiguity.stderr | 2 +- src/test/rustdoc-ui/intra-links-warning-crlf.stderr | 2 +- src/test/rustdoc-ui/intra-links-warning.stderr | 2 +- src/test/rustdoc-ui/lint-group.stderr | 6 +++--- src/test/ui-fulldeps/deprecated-derive.stderr | 2 +- src/test/ui-fulldeps/lint-group-plugin.stderr | 4 ++-- src/test/ui-fulldeps/lint-plugin-cmdline-allow.stderr | 2 +- src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr | 2 +- src/test/ui-fulldeps/lint-plugin.stderr | 2 +- src/test/ui-fulldeps/lint-tool-cmdline-allow.stderr | 4 ++-- src/test/ui-fulldeps/lint-tool-test.stderr | 8 ++++---- src/test/ui/array_const_index-0.stderr | 2 +- src/test/ui/array_const_index-1.stderr | 2 +- src/test/ui/associated-type-bounds/type-alias.stderr | 2 +- src/test/ui/bad/bad-lint-cap2.stderr | 2 +- src/test/ui/bad/bad-lint-cap3.stderr | 2 +- .../block-must-not-have-result-while.stderr | 2 +- src/test/ui/borrowck/mut-borrow-in-loop.stderr | 2 +- ...servation-sharing-interference-2.migrate2015.stderr | 2 +- ...servation-sharing-interference-2.migrate2018.stderr | 2 +- src/test/ui/codemap_tests/unicode_3.stderr | 2 +- .../cfg-attr-empty-is-unused.stderr | 2 +- .../conditional-compilation/cfg-attr-multi-true.stderr | 2 +- src/test/ui/consts/array-literal-index-oob.stderr | 2 +- .../const-pointer-values-in-various-types.stderr | 2 +- src/test/ui/consts/const-eval/const_panic.stderr | 2 +- .../ui/consts/const-eval/const_panic_libcore.stderr | 2 +- .../consts/const-eval/const_panic_libcore_main.stderr | 2 +- src/test/ui/consts/const-eval/const_raw_ptr_ops.stderr | 2 +- .../const-eval/index_out_of_bounds_propagated.stderr | 2 +- src/test/ui/consts/const-eval/issue-49296.stderr | 2 +- src/test/ui/consts/const-eval/issue-50814-2.stderr | 2 +- src/test/ui/consts/const-eval/issue-50814.stderr | 2 +- .../ui/consts/const-eval/unused-broken-const.stderr | 2 +- src/test/ui/consts/const-int-unchecked.stderr | 2 +- .../consts/const-len-underflow-separate-spans.stderr | 2 +- src/test/ui/consts/const-prop-ice.stderr | 2 +- src/test/ui/consts/const-prop-ice2.stderr | 2 +- src/test/ui/consts/const-slice-oob.stderr | 2 +- src/test/ui/consts/dangling-alloc-id-ice.stderr | 2 +- src/test/ui/consts/dangling_raw_ptr.stderr | 2 +- .../ui/consts/uninhabited-const-issue-61744.stderr | 2 +- src/test/ui/deprecation/atomic_initializers.stderr | 2 +- src/test/ui/deprecation/deprecation-in-future.stderr | 2 +- .../ui/derives/deriving-meta-empty-trait-list.stderr | 2 +- src/test/ui/did_you_mean/issue-31424.stderr | 2 +- .../ui/editions/edition-extern-crate-allowed.stderr | 2 +- .../ui/editions/edition-raw-pointer-method-2015.stderr | 2 +- src/test/ui/error-codes/E0396-fixed.stderr | 2 +- .../issue-43106-gating-of-builtin-attrs.stderr | 2 +- .../feature-gate/issue-43106-gating-of-inline.stderr | 2 +- ...feature-gate-default_type_parameter_fallback.stderr | 2 +- src/test/ui/future-incompatible-lint-group.stderr | 2 +- src/test/ui/hrtb/hrtb-perfect-forwarding.nll.stderr | 2 +- src/test/ui/hygiene/dollar-crate-modern.stderr | 2 +- src/test/ui/if/if-let.stderr | 2 +- .../ui/imports/local-modularized-tricky-fail-3.stderr | 2 +- src/test/ui/imports/unused-macro-use.stderr | 2 +- src/test/ui/imports/unused.stderr | 2 +- .../inference-variable-behind-raw-pointer.stderr | 2 +- src/test/ui/inference/inference_unstable.stderr | 2 +- src/test/ui/invalid/invalid-crate-type.stderr | 2 +- src/test/ui/issues/issue-16250.stderr | 2 +- src/test/ui/issues/issue-17718-const-naming.stderr | 4 ++-- src/test/ui/issues/issue-27042.stderr | 2 +- src/test/ui/issues/issue-30079.stderr | 2 +- src/test/ui/issues/issue-30730.stderr | 2 +- src/test/ui/issues/issue-32995-2.stderr | 2 +- src/test/ui/issues/issue-32995.stderr | 2 +- src/test/ui/issues/issue-37515.stderr | 2 +- src/test/ui/issues/issue-38715.stderr | 2 +- src/test/ui/issues/issue-39404.stderr | 2 +- src/test/ui/issues/issue-43105.stderr | 2 +- src/test/ui/issues/issue-45562.stderr | 2 +- src/test/ui/issues/issue-54348.stderr | 2 +- src/test/ui/issues/issue-60622.stderr | 2 +- src/test/ui/issues/issue-8727.stderr | 2 +- src/test/ui/lint/deny-overflowing-literals.stderr | 2 +- ...ssue-47390-unused-variable-in-struct-pattern.stderr | 6 +++--- src/test/ui/lint/issue-54180-unused-ref-field.stderr | 2 +- src/test/ui/lint/lint-change-warnings.stderr | 6 +++--- src/test/ui/lint/lint-group-nonstandard-style.stderr | 10 +++++----- .../ui/lint/lint-incoherent-auto-trait-objects.stderr | 2 +- src/test/ui/lint/lint-output-format-2.stderr | 2 +- src/test/ui/lint/lint-removed-cmdline.stderr | 2 +- src/test/ui/lint/lint-removed.stderr | 2 +- src/test/ui/lint/lint-renamed-allow.stderr | 2 +- src/test/ui/lint/lint-renamed-cmdline.stderr | 2 +- src/test/ui/lint/lint-renamed.stderr | 4 ++-- src/test/ui/lint/lint-unnecessary-parens.stderr | 2 +- src/test/ui/lint/lint-uppercase-variables.stderr | 2 +- src/test/ui/lint/not_found.stderr | 2 +- src/test/ui/lint/reasons-erroneous.rs | 2 +- src/test/ui/lint/reasons-erroneous.stderr | 2 +- src/test/ui/lint/reasons.stderr | 2 +- src/test/ui/lint/suggestions.stderr | 10 +++++----- src/test/ui/liveness/liveness-move-in-while.stderr | 2 +- src/test/ui/liveness/liveness-unused.stderr | 2 +- src/test/ui/loops/loop-break-value.stderr | 2 +- src/test/ui/macros/macro-deprecation.stderr | 2 +- src/test/ui/macros/macro-path-prelude-pass.stderr | 2 +- src/test/ui/macros/macro-stability.stderr | 2 +- src/test/ui/malformed/malformed-regressions.stderr | 2 +- src/test/ui/match/match-range-fail-dominate.stderr | 2 +- src/test/ui/never-assign-dead-code.stderr | 4 ++-- src/test/ui/nll/issue-51191.stderr | 2 +- src/test/ui/parser/trait-object-trait-parens.stderr | 2 +- src/test/ui/path-lookahead.stderr | 4 ++-- src/test/ui/privacy/legacy-ctor-visibility.stderr | 2 +- src/test/ui/privacy/private-in-public-assoc-ty.stderr | 2 +- .../ui/privacy/private-in-public-non-principal.stderr | 2 +- src/test/ui/privacy/private-in-public-warn.stderr | 2 +- src/test/ui/proc-macro/attributes-included.stderr | 2 +- src/test/ui/proc-macro/generate-mod.stderr | 2 +- src/test/ui/pub/pub-reexport-priv-extern-crate.stderr | 2 +- .../region-bound-on-closure-outlives-call.stderr | 2 +- src/test/ui/removing-extern-crate.stderr | 2 +- src/test/ui/rfc1445/match-forbidden-without-eq.stderr | 2 +- src/test/ui/rust-2018/async-ident-allowed.stderr | 2 +- .../ui/rust-2018/extern-crate-idiomatic-in-2018.stderr | 2 +- .../issue-54400-unused-extern-crate-attr-span.stderr | 2 +- src/test/ui/rust-2018/macro-use-warned-against.stderr | 2 +- src/test/ui/rust-2018/remove-extern-crate.stderr | 2 +- .../rust-2018/suggestions-not-always-applicable.stderr | 2 +- src/test/ui/rust-2018/try-ident.stderr | 2 +- src/test/ui/rust-2018/try-macro.stderr | 2 +- src/test/ui/safe-extern-statics.stderr | 2 +- src/test/ui/span/issue-24690.stderr | 4 ++-- src/test/ui/span/macro-span-replacement.stderr | 2 +- src/test/ui/span/multispan-import-lint.stderr | 2 +- .../ui/span/unused-warning-point-at-signature.stderr | 2 +- .../ui/traits/trait-bounds-not-on-bare-trait.stderr | 2 +- src/test/ui/transmute/transmute-imut-to-mut.stderr | 2 +- .../trivial-bounds-inconsistent-copy.stderr | 2 +- .../trivial-bounds-inconsistent-projection.stderr | 2 +- .../trivial-bounds-inconsistent-sized.stderr | 2 +- .../trivial-bounds-inconsistent-well-formed.stderr | 2 +- .../trivial-bounds/trivial-bounds-inconsistent.stderr | 4 ++-- ...ant-priority-lint-ambiguous_associated_items.stderr | 2 +- src/test/ui/type/type-alias-bounds.stderr | 2 +- src/test/ui/utf8_idents.stderr | 2 +- src/test/ui/while-let.stderr | 2 +- 149 files changed, 177 insertions(+), 177 deletions(-) diff --git a/src/librustc/lint/builtin.rs b/src/librustc/lint/builtin.rs index d1cae76de60a1..3b66b07c2f4ae 100644 --- a/src/librustc/lint/builtin.rs +++ b/src/librustc/lint/builtin.rs @@ -94,19 +94,19 @@ declare_lint! { declare_lint! { pub UNUSED_FEATURES, Warn, - "unused features found in crate-level #[feature] directives" + "unused features found in crate-level `#[feature]` directives" } declare_lint! { pub STABLE_FEATURES, Warn, - "stable features found in #[feature] directive" + "stable features found in `#[feature]` directive" } declare_lint! { pub UNKNOWN_CRATE_TYPES, Deny, - "unknown crate type found in #[crate_type] directive" + "unknown crate type found in `#[crate_type]` directive" } declare_lint! { diff --git a/src/librustc/lint/mod.rs b/src/librustc/lint/mod.rs index e76c24932008d..3683a3759948b 100644 --- a/src/librustc/lint/mod.rs +++ b/src/librustc/lint/mod.rs @@ -671,7 +671,7 @@ pub fn struct_lint_level<'a>(sess: &'a Session, sess.diag_note_once( &mut err, DiagnosticMessageId::from(lint), - &format!("#[{}({})] on by default", level.as_str(), name)); + &format!("`#[{}({})]` on by default", level.as_str(), name)); } LintSource::CommandLine(lint_flag_val) => { let flag = match level { @@ -706,7 +706,7 @@ pub fn struct_lint_level<'a>(sess: &'a Session, if lint_attr_name.as_str() != name { let level_str = level.as_str(); sess.diag_note_once(&mut err, DiagnosticMessageId::from(lint), - &format!("#[{}({})] implied by #[{}({})]", + &format!("`#[{}({})]` implied by `#[{}({})]`", level_str, name, level_str, lint_attr_name)); } } diff --git a/src/test/run-pass/extern/extern-prelude-core.stderr b/src/test/run-pass/extern/extern-prelude-core.stderr index 8d2a0b7425f2a..f90eb933d3fd8 100644 --- a/src/test/run-pass/extern/extern-prelude-core.stderr +++ b/src/test/run-pass/extern/extern-prelude-core.stderr @@ -4,5 +4,5 @@ warning: the feature `extern_prelude` has been stable since 1.30.0 and no longer LL | #![feature(extern_prelude, lang_items, start)] | ^^^^^^^^^^^^^^ | - = note: #[warn(stable_features)] on by default + = note: `#[warn(stable_features)]` on by default diff --git a/src/test/run-pass/extern/extern-prelude-std.stderr b/src/test/run-pass/extern/extern-prelude-std.stderr index f193c57146d72..73b1dcfd5e1b8 100644 --- a/src/test/run-pass/extern/extern-prelude-std.stderr +++ b/src/test/run-pass/extern/extern-prelude-std.stderr @@ -4,5 +4,5 @@ warning: the feature `extern_prelude` has been stable since 1.30.0 and no longer LL | #![feature(extern_prelude)] | ^^^^^^^^^^^^^^ | - = note: #[warn(stable_features)] on by default + = note: `#[warn(stable_features)]` on by default diff --git a/src/test/run-pass/if-ret.stderr b/src/test/run-pass/if-ret.stderr index a64281833e5cb..7c02f835685e1 100644 --- a/src/test/run-pass/if-ret.stderr +++ b/src/test/run-pass/if-ret.stderr @@ -4,5 +4,5 @@ warning: unreachable block in `if` expression LL | fn foo() { if (return) { } } | ^^^ | - = note: #[warn(unreachable_code)] on by default + = note: `#[warn(unreachable_code)]` on by default diff --git a/src/test/run-pass/macros/macro-use-all-and-none.stderr b/src/test/run-pass/macros/macro-use-all-and-none.stderr index 66282a4f11dc6..ce12a539541f1 100644 --- a/src/test/run-pass/macros/macro-use-all-and-none.stderr +++ b/src/test/run-pass/macros/macro-use-all-and-none.stderr @@ -4,5 +4,5 @@ warning: unused attribute LL | #[macro_use()] | ^^^^^^^^^^^^^^ | - = note: #[warn(unused_attributes)] on by default + = note: `#[warn(unused_attributes)]` on by default diff --git a/src/test/run-pass/rfcs/rfc-2126-crate-paths/crate-path-absolute.stderr b/src/test/run-pass/rfcs/rfc-2126-crate-paths/crate-path-absolute.stderr index ac4b51bdb58e4..12f799f6e472c 100644 --- a/src/test/run-pass/rfcs/rfc-2126-crate-paths/crate-path-absolute.stderr +++ b/src/test/run-pass/rfcs/rfc-2126-crate-paths/crate-path-absolute.stderr @@ -4,5 +4,5 @@ warning: the feature `crate_in_paths` has been stable since 1.30.0 and no longer LL | #![feature(crate_in_paths)] | ^^^^^^^^^^^^^^ | - = note: #[warn(stable_features)] on by default + = note: `#[warn(stable_features)]` on by default diff --git a/src/test/run-pass/rfcs/rfc-2126-crate-paths/crate-path-visibility-ambiguity.stderr b/src/test/run-pass/rfcs/rfc-2126-crate-paths/crate-path-visibility-ambiguity.stderr index 63d3a2ea5db96..23a0e54455454 100644 --- a/src/test/run-pass/rfcs/rfc-2126-crate-paths/crate-path-visibility-ambiguity.stderr +++ b/src/test/run-pass/rfcs/rfc-2126-crate-paths/crate-path-visibility-ambiguity.stderr @@ -4,5 +4,5 @@ warning: the feature `crate_in_paths` has been stable since 1.30.0 and no longer LL | #![feature(crate_in_paths)] | ^^^^^^^^^^^^^^ | - = note: #[warn(stable_features)] on by default + = note: `#[warn(stable_features)]` on by default diff --git a/src/test/rustdoc-ui/intra-links-warning-crlf.stderr b/src/test/rustdoc-ui/intra-links-warning-crlf.stderr index 8ccc04a4c0bcd..720f2106e3dc2 100644 --- a/src/test/rustdoc-ui/intra-links-warning-crlf.stderr +++ b/src/test/rustdoc-ui/intra-links-warning-crlf.stderr @@ -4,7 +4,7 @@ warning: `[error]` cannot be resolved, ignoring it... LL | /// [error] | ^^^^^ cannot be resolved, ignoring | - = note: #[warn(intra_doc_link_resolution_failure)] on by default + = note: `#[warn(intra_doc_link_resolution_failure)]` on by default = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]` warning: `[error1]` cannot be resolved, ignoring it... diff --git a/src/test/rustdoc-ui/intra-links-warning.stderr b/src/test/rustdoc-ui/intra-links-warning.stderr index 1eec3c57b68de..dac564b304143 100644 --- a/src/test/rustdoc-ui/intra-links-warning.stderr +++ b/src/test/rustdoc-ui/intra-links-warning.stderr @@ -4,7 +4,7 @@ warning: `[Foo::baz]` cannot be resolved, ignoring it... LL | //! Test with [Foo::baz], [Bar::foo], ... | ^^^^^^^^ cannot be resolved, ignoring | - = note: #[warn(intra_doc_link_resolution_failure)] on by default + = note: `#[warn(intra_doc_link_resolution_failure)]` on by default = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]` warning: `[Bar::foo]` cannot be resolved, ignoring it... diff --git a/src/test/rustdoc-ui/lint-group.stderr b/src/test/rustdoc-ui/lint-group.stderr index 24db3453ec509..cd523b227deb1 100644 --- a/src/test/rustdoc-ui/lint-group.stderr +++ b/src/test/rustdoc-ui/lint-group.stderr @@ -13,7 +13,7 @@ note: lint level defined here | LL | #![deny(rustdoc)] | ^^^^^^^ - = note: #[deny(private_doc_tests)] implied by #[deny(rustdoc)] + = note: `#[deny(private_doc_tests)]` implied by `#[deny(rustdoc)]` error: `[error]` cannot be resolved, ignoring it... --> $DIR/lint-group.rs:9:29 @@ -26,7 +26,7 @@ note: lint level defined here | LL | #![deny(rustdoc)] | ^^^^^^^ - = note: #[deny(intra_doc_link_resolution_failure)] implied by #[deny(rustdoc)] + = note: `#[deny(intra_doc_link_resolution_failure)]` implied by `#[deny(rustdoc)]` = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]` error: Missing code example in this documentation @@ -40,7 +40,7 @@ note: lint level defined here | LL | #![deny(rustdoc)] | ^^^^^^^ - = note: #[deny(missing_doc_code_examples)] implied by #[deny(rustdoc)] + = note: `#[deny(missing_doc_code_examples)]` implied by `#[deny(rustdoc)]` error: aborting due to 3 previous errors diff --git a/src/test/ui-fulldeps/deprecated-derive.stderr b/src/test/ui-fulldeps/deprecated-derive.stderr index 9afb3a35cb402..efaf82d9be165 100644 --- a/src/test/ui-fulldeps/deprecated-derive.stderr +++ b/src/test/ui-fulldeps/deprecated-derive.stderr @@ -4,5 +4,5 @@ warning: use of deprecated item 'Encodable': derive(Encodable) is deprecated in LL | #[derive(Encodable)] | ^^^^^^^^^ | - = note: #[warn(deprecated)] on by default + = note: `#[warn(deprecated)]` on by default diff --git a/src/test/ui-fulldeps/lint-group-plugin.stderr b/src/test/ui-fulldeps/lint-group-plugin.stderr index 8ccf9700b9fc8..1af34b306e3a3 100644 --- a/src/test/ui-fulldeps/lint-group-plugin.stderr +++ b/src/test/ui-fulldeps/lint-group-plugin.stderr @@ -4,7 +4,7 @@ warning: item is named 'lintme' LL | fn lintme() { } | ^^^^^^^^^^^^^^^ | - = note: #[warn(test_lint)] on by default + = note: `#[warn(test_lint)]` on by default warning: item is named 'pleaselintme' --> $DIR/lint-group-plugin.rs:10:1 @@ -12,5 +12,5 @@ warning: item is named 'pleaselintme' LL | fn pleaselintme() { } | ^^^^^^^^^^^^^^^^^^^^^ | - = note: #[warn(please_lint)] on by default + = note: `#[warn(please_lint)]` on by default diff --git a/src/test/ui-fulldeps/lint-plugin-cmdline-allow.stderr b/src/test/ui-fulldeps/lint-plugin-cmdline-allow.stderr index a9b27beb7dfe8..c731796d4824d 100644 --- a/src/test/ui-fulldeps/lint-plugin-cmdline-allow.stderr +++ b/src/test/ui-fulldeps/lint-plugin-cmdline-allow.stderr @@ -9,5 +9,5 @@ note: lint level defined here | LL | #![warn(unused)] | ^^^^^^ - = note: #[warn(dead_code)] implied by #[warn(unused)] + = note: `#[warn(dead_code)]` implied by `#[warn(unused)]` diff --git a/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr b/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr index 0b2dbad884c54..5a6b35433ac98 100644 --- a/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr +++ b/src/test/ui-fulldeps/lint-plugin-cmdline-load.stderr @@ -4,5 +4,5 @@ warning: item is named 'lintme' LL | fn lintme() { } | ^^^^^^^^^^^^^^^ | - = note: #[warn(test_lint)] on by default + = note: `#[warn(test_lint)]` on by default diff --git a/src/test/ui-fulldeps/lint-plugin.stderr b/src/test/ui-fulldeps/lint-plugin.stderr index 94791e369fc30..beea00ba45367 100644 --- a/src/test/ui-fulldeps/lint-plugin.stderr +++ b/src/test/ui-fulldeps/lint-plugin.stderr @@ -4,5 +4,5 @@ warning: item is named 'lintme' LL | fn lintme() { } | ^^^^^^^^^^^^^^^ | - = note: #[warn(test_lint)] on by default + = note: `#[warn(test_lint)]` on by default diff --git a/src/test/ui-fulldeps/lint-tool-cmdline-allow.stderr b/src/test/ui-fulldeps/lint-tool-cmdline-allow.stderr index 1d85101383136..b4919bc339d28 100644 --- a/src/test/ui-fulldeps/lint-tool-cmdline-allow.stderr +++ b/src/test/ui-fulldeps/lint-tool-cmdline-allow.stderr @@ -8,7 +8,7 @@ warning: item is named 'lintme' LL | fn lintme() {} | ^^^^^^^^^^^^^^ | - = note: #[warn(clippy::test_lint)] on by default + = note: `#[warn(clippy::test_lint)]` on by default warning: function is never used: `lintme` --> $DIR/lint-tool-cmdline-allow.rs:10:1 @@ -21,5 +21,5 @@ note: lint level defined here | LL | #![warn(unused)] | ^^^^^^ - = note: #[warn(dead_code)] implied by #[warn(unused)] + = note: `#[warn(dead_code)]` implied by `#[warn(unused)]` diff --git a/src/test/ui-fulldeps/lint-tool-test.stderr b/src/test/ui-fulldeps/lint-tool-test.stderr index 67e55e65c7e77..16fe6f6613b3f 100644 --- a/src/test/ui-fulldeps/lint-tool-test.stderr +++ b/src/test/ui-fulldeps/lint-tool-test.stderr @@ -4,7 +4,7 @@ warning: lint name `test_lint` is deprecated and may not have an effect in the f LL | #![cfg_attr(foo, warn(test_lint))] | ^^^^^^^^^ help: change it to: `clippy::test_lint` | - = note: #[warn(renamed_and_removed_lints)] on by default + = note: `#[warn(renamed_and_removed_lints)]` on by default warning: lint name `clippy_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore --> $DIR/lint-tool-test.rs:11:9 @@ -24,7 +24,7 @@ warning: unknown lint: `this_lint_does_not_exist` LL | #[deny(this_lint_does_not_exist)] | ^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: #[warn(unknown_lints)] on by default + = note: `#[warn(unknown_lints)]` on by default warning: lint name `test_lint` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore --> $DIR/lint-tool-test.rs:8:23 @@ -43,7 +43,7 @@ note: lint level defined here | LL | #![deny(clippy_group)] | ^^^^^^^^^^^^ - = note: #[deny(clippy::test_lint)] implied by #[deny(clippy::group)] + = note: `#[deny(clippy::test_lint)]` implied by `#[deny(clippy::group)]` error: item is named 'lintmetoo' --> $DIR/lint-tool-test.rs:22:5 @@ -56,7 +56,7 @@ note: lint level defined here | LL | #![deny(clippy_group)] | ^^^^^^^^^^^^ - = note: #[deny(clippy::test_group)] implied by #[deny(clippy::group)] + = note: `#[deny(clippy::test_group)]` implied by `#[deny(clippy::group)]` error: aborting due to 2 previous errors diff --git a/src/test/ui/array_const_index-0.stderr b/src/test/ui/array_const_index-0.stderr index 78d456d6c2e0e..16ebc4a5775a0 100644 --- a/src/test/ui/array_const_index-0.stderr +++ b/src/test/ui/array_const_index-0.stderr @@ -6,7 +6,7 @@ LL | const B: i32 = (&A)[1]; | | | index out of bounds: the len is 0 but the index is 1 | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: aborting due to previous error diff --git a/src/test/ui/array_const_index-1.stderr b/src/test/ui/array_const_index-1.stderr index 3e7360f935bb9..98a64eaadcf57 100644 --- a/src/test/ui/array_const_index-1.stderr +++ b/src/test/ui/array_const_index-1.stderr @@ -6,7 +6,7 @@ LL | const B: i32 = A[1]; | | | index out of bounds: the len is 0 but the index is 1 | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: aborting due to previous error diff --git a/src/test/ui/associated-type-bounds/type-alias.stderr b/src/test/ui/associated-type-bounds/type-alias.stderr index b93fc393ae32c..a3fa97f54e385 100644 --- a/src/test/ui/associated-type-bounds/type-alias.stderr +++ b/src/test/ui/associated-type-bounds/type-alias.stderr @@ -4,7 +4,7 @@ warning: where clauses are not enforced in type aliases LL | type _TaWhere1 where T: Iterator = T; | ^^^^^^^^^^^^^^^^^^^^^^^ | - = note: #[warn(type_alias_bounds)] on by default + = note: `#[warn(type_alias_bounds)]` on by default = help: the clause will not be checked when the type alias is used, and should be removed warning: where clauses are not enforced in type aliases diff --git a/src/test/ui/bad/bad-lint-cap2.stderr b/src/test/ui/bad/bad-lint-cap2.stderr index f6e67e6d78df0..75e257893fa80 100644 --- a/src/test/ui/bad/bad-lint-cap2.stderr +++ b/src/test/ui/bad/bad-lint-cap2.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![deny(warnings)] | ^^^^^^^^ - = note: #[deny(unused_imports)] implied by #[deny(warnings)] + = note: `#[deny(unused_imports)]` implied by `#[deny(warnings)]` error: aborting due to previous error diff --git a/src/test/ui/bad/bad-lint-cap3.stderr b/src/test/ui/bad/bad-lint-cap3.stderr index b898d792f65ca..96b40c98c0ed8 100644 --- a/src/test/ui/bad/bad-lint-cap3.stderr +++ b/src/test/ui/bad/bad-lint-cap3.stderr @@ -9,5 +9,5 @@ note: lint level defined here | LL | #![deny(warnings)] | ^^^^^^^^ - = note: #[warn(unused_imports)] implied by #[warn(warnings)] + = note: `#[warn(unused_imports)]` implied by `#[warn(warnings)]` diff --git a/src/test/ui/block-result/block-must-not-have-result-while.stderr b/src/test/ui/block-result/block-must-not-have-result-while.stderr index c41afcc9121c6..44f62875ef1c4 100644 --- a/src/test/ui/block-result/block-must-not-have-result-while.stderr +++ b/src/test/ui/block-result/block-must-not-have-result-while.stderr @@ -4,7 +4,7 @@ warning: denote infinite loops with `loop { ... }` LL | while true { | ^^^^^^^^^^ help: use `loop` | - = note: #[warn(while_true)] on by default + = note: `#[warn(while_true)]` on by default error[E0308]: mismatched types --> $DIR/block-must-not-have-result-while.rs:3:9 diff --git a/src/test/ui/borrowck/mut-borrow-in-loop.stderr b/src/test/ui/borrowck/mut-borrow-in-loop.stderr index 59cf4d533def8..daee1a0d5cff9 100644 --- a/src/test/ui/borrowck/mut-borrow-in-loop.stderr +++ b/src/test/ui/borrowck/mut-borrow-in-loop.stderr @@ -4,7 +4,7 @@ warning: denote infinite loops with `loop { ... }` LL | while true { | ^^^^^^^^^^ help: use `loop` | - = note: #[warn(while_true)] on by default + = note: `#[warn(while_true)]` on by default error[E0499]: cannot borrow `*arg` as mutable more than once at a time --> $DIR/mut-borrow-in-loop.rs:10:25 diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2015.stderr b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2015.stderr index 8eb468892f24a..565e433f77361 100644 --- a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2015.stderr +++ b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2015.stderr @@ -31,7 +31,7 @@ LL | v.push(shared.len()); | | | mutable borrow occurs here | - = note: #[warn(mutable_borrow_reservation_conflict)] on by default + = note: `#[warn(mutable_borrow_reservation_conflict)]` on by default = warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future = note: for more information, see issue #59159 diff --git a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2018.stderr b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2018.stderr index 8eb468892f24a..565e433f77361 100644 --- a/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2018.stderr +++ b/src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.migrate2018.stderr @@ -31,7 +31,7 @@ LL | v.push(shared.len()); | | | mutable borrow occurs here | - = note: #[warn(mutable_borrow_reservation_conflict)] on by default + = note: `#[warn(mutable_borrow_reservation_conflict)]` on by default = warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future = note: for more information, see issue #59159 diff --git a/src/test/ui/codemap_tests/unicode_3.stderr b/src/test/ui/codemap_tests/unicode_3.stderr index 56f4f73131f57..cc1a80bc07456 100644 --- a/src/test/ui/codemap_tests/unicode_3.stderr +++ b/src/test/ui/codemap_tests/unicode_3.stderr @@ -4,5 +4,5 @@ warning: denote infinite loops with `loop { ... }` LL | let s = "ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; } | ^^^^^^^^^^ help: use `loop` | - = note: #[warn(while_true)] on by default + = note: `#[warn(while_true)]` on by default diff --git a/src/test/ui/conditional-compilation/cfg-attr-empty-is-unused.stderr b/src/test/ui/conditional-compilation/cfg-attr-empty-is-unused.stderr index cd3563e66c720..046defd5561ae 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-empty-is-unused.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-empty-is-unused.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![deny(unused)] | ^^^^^^ - = note: #[deny(unused_attributes)] implied by #[deny(unused)] + = note: `#[deny(unused_attributes)]` implied by `#[deny(unused)]` error: unused attribute --> $DIR/cfg-attr-empty-is-unused.rs:10:1 diff --git a/src/test/ui/conditional-compilation/cfg-attr-multi-true.stderr b/src/test/ui/conditional-compilation/cfg-attr-multi-true.stderr index 64e9570773a65..f55671f6bba81 100644 --- a/src/test/ui/conditional-compilation/cfg-attr-multi-true.stderr +++ b/src/test/ui/conditional-compilation/cfg-attr-multi-true.stderr @@ -4,7 +4,7 @@ warning: use of deprecated item 'MustUseDeprecated' LL | impl MustUseDeprecated { | ^^^^^^^^^^^^^^^^^ | - = note: #[warn(deprecated)] on by default + = note: `#[warn(deprecated)]` on by default warning: use of deprecated item 'MustUseDeprecated' --> $DIR/cfg-attr-multi-true.rs:19:5 diff --git a/src/test/ui/consts/array-literal-index-oob.stderr b/src/test/ui/consts/array-literal-index-oob.stderr index 727ce9e57a47b..18a09fdda7be4 100644 --- a/src/test/ui/consts/array-literal-index-oob.stderr +++ b/src/test/ui/consts/array-literal-index-oob.stderr @@ -4,7 +4,7 @@ error: index out of bounds: the len is 3 but the index is 4 LL | &{[1, 2, 3][4]}; | ^^^^^^^^^^^^ | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: this expression will panic at runtime --> $DIR/array-literal-index-oob.rs:2:5 diff --git a/src/test/ui/consts/const-eval/const-pointer-values-in-various-types.stderr b/src/test/ui/consts/const-eval/const-pointer-values-in-various-types.stderr index 284b06984a31c..73aca911531f1 100644 --- a/src/test/ui/consts/const-eval/const-pointer-values-in-various-types.stderr +++ b/src/test/ui/consts/const-eval/const-pointer-values-in-various-types.stderr @@ -14,7 +14,7 @@ LL | const I32_REF_U8_UNION: u8 = unsafe { Nonsense { int_32_ref: &3 }.uint_ | | | a raw memory access tried to access part of a pointer value as raw bytes | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: any use of this value will cause an error --> $DIR/const-pointer-values-in-various-types.rs:30:45 diff --git a/src/test/ui/consts/const-eval/const_panic.stderr b/src/test/ui/consts/const-eval/const_panic.stderr index 12c7e3d34ab9e..8a51d8aa882f8 100644 --- a/src/test/ui/consts/const-eval/const_panic.stderr +++ b/src/test/ui/consts/const-eval/const_panic.stderr @@ -6,7 +6,7 @@ LL | pub const Z: () = panic!("cheese"); | | | the evaluated program panicked at 'cheese', $DIR/const_panic.rs:4:19 | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: any use of this value will cause an error diff --git a/src/test/ui/consts/const-eval/const_panic_libcore.stderr b/src/test/ui/consts/const-eval/const_panic_libcore.stderr index 9dddac49c92b8..e76446f1015ba 100644 --- a/src/test/ui/consts/const-eval/const_panic_libcore.stderr +++ b/src/test/ui/consts/const-eval/const_panic_libcore.stderr @@ -6,7 +6,7 @@ LL | const Z: () = panic!("cheese"); | | | the evaluated program panicked at 'cheese', $DIR/const_panic_libcore.rs:5:15 | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: any use of this value will cause an error diff --git a/src/test/ui/consts/const-eval/const_panic_libcore_main.stderr b/src/test/ui/consts/const-eval/const_panic_libcore_main.stderr index df04a03681127..22d173ad0c7bf 100644 --- a/src/test/ui/consts/const-eval/const_panic_libcore_main.stderr +++ b/src/test/ui/consts/const-eval/const_panic_libcore_main.stderr @@ -6,7 +6,7 @@ LL | const Z: () = panic!("cheese"); | | | the evaluated program panicked at 'cheese', $DIR/const_panic_libcore_main.rs:9:15 | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: any use of this value will cause an error diff --git a/src/test/ui/consts/const-eval/const_raw_ptr_ops.stderr b/src/test/ui/consts/const-eval/const_raw_ptr_ops.stderr index 0d4c0b98879cc..a12575b3975b6 100644 --- a/src/test/ui/consts/const-eval/const_raw_ptr_ops.stderr +++ b/src/test/ui/consts/const-eval/const_raw_ptr_ops.stderr @@ -6,7 +6,7 @@ LL | const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 }; | | | "pointer arithmetic or comparison" needs an rfc before being allowed inside constants | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: any use of this value will cause an error --> $DIR/const_raw_ptr_ops.rs:12:28 diff --git a/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.stderr b/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.stderr index ac045f29b110d..f330f9caaa2f7 100644 --- a/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.stderr +++ b/src/test/ui/consts/const-eval/index_out_of_bounds_propagated.stderr @@ -4,7 +4,7 @@ error: index out of bounds: the len is 1 but the index is 1 LL | array[1]; | ^^^^^^^^ | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: aborting due to previous error diff --git a/src/test/ui/consts/const-eval/issue-49296.stderr b/src/test/ui/consts/const-eval/issue-49296.stderr index 5a59a8b2dffcd..7a4bba8daa70b 100644 --- a/src/test/ui/consts/const-eval/issue-49296.stderr +++ b/src/test/ui/consts/const-eval/issue-49296.stderr @@ -6,7 +6,7 @@ LL | const X: u64 = *wat(42); | | | dangling pointer was dereferenced | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: aborting due to previous error diff --git a/src/test/ui/consts/const-eval/issue-50814-2.stderr b/src/test/ui/consts/const-eval/issue-50814-2.stderr index da560046c547c..d68f72d36e2f7 100644 --- a/src/test/ui/consts/const-eval/issue-50814-2.stderr +++ b/src/test/ui/consts/const-eval/issue-50814-2.stderr @@ -6,7 +6,7 @@ LL | const BAR: usize = [5, 6, 7][T::BOO]; | | | index out of bounds: the len is 3 but the index is 42 | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error[E0080]: evaluation of constant expression failed --> $DIR/issue-50814-2.rs:16:5 diff --git a/src/test/ui/consts/const-eval/issue-50814.stderr b/src/test/ui/consts/const-eval/issue-50814.stderr index bc9443b26f5fd..707dfee7cd5b8 100644 --- a/src/test/ui/consts/const-eval/issue-50814.stderr +++ b/src/test/ui/consts/const-eval/issue-50814.stderr @@ -6,7 +6,7 @@ LL | const MAX: u8 = A::MAX + B::MAX; | | | attempt to add with overflow | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error[E0080]: evaluation of constant expression failed --> $DIR/issue-50814.rs:17:5 diff --git a/src/test/ui/consts/const-eval/unused-broken-const.stderr b/src/test/ui/consts/const-eval/unused-broken-const.stderr index e45ce65d8bb35..a13cb877888bd 100644 --- a/src/test/ui/consts/const-eval/unused-broken-const.stderr +++ b/src/test/ui/consts/const-eval/unused-broken-const.stderr @@ -6,7 +6,7 @@ LL | const FOO: i32 = [][0]; | | | index out of bounds: the len is 0 but the index is 0 | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: aborting due to previous error diff --git a/src/test/ui/consts/const-int-unchecked.stderr b/src/test/ui/consts/const-int-unchecked.stderr index 0fa82008711c9..bf338e40107f8 100644 --- a/src/test/ui/consts/const-int-unchecked.stderr +++ b/src/test/ui/consts/const-int-unchecked.stderr @@ -6,7 +6,7 @@ LL | const SHL_U8: u8 = unsafe { intrinsics::unchecked_shl(5_u8, 8) }; | | | Overflowing shift by 8 in unchecked_shl | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: any use of this value will cause an error --> $DIR/const-int-unchecked.rs:16:31 diff --git a/src/test/ui/consts/const-len-underflow-separate-spans.stderr b/src/test/ui/consts/const-len-underflow-separate-spans.stderr index ef4fa126dca32..150d3eb525d5e 100644 --- a/src/test/ui/consts/const-len-underflow-separate-spans.stderr +++ b/src/test/ui/consts/const-len-underflow-separate-spans.stderr @@ -6,7 +6,7 @@ LL | const LEN: usize = ONE - TWO; | | | attempt to subtract with overflow | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error[E0080]: evaluation of constant value failed --> $DIR/const-len-underflow-separate-spans.rs:11:17 diff --git a/src/test/ui/consts/const-prop-ice.stderr b/src/test/ui/consts/const-prop-ice.stderr index 8ec54b4438dda..4b3880198bf2d 100644 --- a/src/test/ui/consts/const-prop-ice.stderr +++ b/src/test/ui/consts/const-prop-ice.stderr @@ -4,7 +4,7 @@ error: index out of bounds: the len is 3 but the index is 3 LL | [0; 3][3u64 as usize]; | ^^^^^^^^^^^^^^^^^^^^^ | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: aborting due to previous error diff --git a/src/test/ui/consts/const-prop-ice2.stderr b/src/test/ui/consts/const-prop-ice2.stderr index 68a7164da3d3c..dc17876eae4e8 100644 --- a/src/test/ui/consts/const-prop-ice2.stderr +++ b/src/test/ui/consts/const-prop-ice2.stderr @@ -4,7 +4,7 @@ error: index out of bounds: the len is 1 but the index is 1 LL | println!("{}", xs[Enum::One as usize]); | ^^^^^^^^^^^^^^^^^^^^^^ | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: aborting due to previous error diff --git a/src/test/ui/consts/const-slice-oob.stderr b/src/test/ui/consts/const-slice-oob.stderr index c90cdbcb26970..7e191a6336144 100644 --- a/src/test/ui/consts/const-slice-oob.stderr +++ b/src/test/ui/consts/const-slice-oob.stderr @@ -6,7 +6,7 @@ LL | const BAR: u32 = FOO[5]; | | | index out of bounds: the len is 3 but the index is 5 | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: aborting due to previous error diff --git a/src/test/ui/consts/dangling-alloc-id-ice.stderr b/src/test/ui/consts/dangling-alloc-id-ice.stderr index 87f84480bf66b..bac9f555d271b 100644 --- a/src/test/ui/consts/dangling-alloc-id-ice.stderr +++ b/src/test/ui/consts/dangling-alloc-id-ice.stderr @@ -7,7 +7,7 @@ LL | | unsafe { Foo { y: &y }.long_live_the_unit } LL | | }; | |__^ type validation failed: encountered dangling pointer in final constant | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: aborting due to previous error diff --git a/src/test/ui/consts/dangling_raw_ptr.stderr b/src/test/ui/consts/dangling_raw_ptr.stderr index 0168c08f011d4..4748be37dffcf 100644 --- a/src/test/ui/consts/dangling_raw_ptr.stderr +++ b/src/test/ui/consts/dangling_raw_ptr.stderr @@ -7,7 +7,7 @@ LL | | &x LL | | }; | |__^ type validation failed: encountered dangling pointer in final constant | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: aborting due to previous error diff --git a/src/test/ui/consts/uninhabited-const-issue-61744.stderr b/src/test/ui/consts/uninhabited-const-issue-61744.stderr index 5c2855437118f..e317bdf103c36 100644 --- a/src/test/ui/consts/uninhabited-const-issue-61744.stderr +++ b/src/test/ui/consts/uninhabited-const-issue-61744.stderr @@ -11,7 +11,7 @@ LL | fake_type() LL | const CONSTANT: i32 = unsafe { fake_type() }; | --------------------------------------------- | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error[E0080]: erroneous constant used --> $DIR/uninhabited-const-issue-61744.rs:18:10 diff --git a/src/test/ui/deprecation/atomic_initializers.stderr b/src/test/ui/deprecation/atomic_initializers.stderr index b009ff9486be2..16db00b6e853a 100644 --- a/src/test/ui/deprecation/atomic_initializers.stderr +++ b/src/test/ui/deprecation/atomic_initializers.stderr @@ -4,5 +4,5 @@ warning: use of deprecated item 'std::sync::atomic::ATOMIC_ISIZE_INIT': the `new LL | static FOO: AtomicIsize = ATOMIC_ISIZE_INIT; | ^^^^^^^^^^^^^^^^^ help: replace the use of the deprecated item: `AtomicIsize::new(0)` | - = note: #[warn(deprecated)] on by default + = note: `#[warn(deprecated)]` on by default diff --git a/src/test/ui/deprecation/deprecation-in-future.stderr b/src/test/ui/deprecation/deprecation-in-future.stderr index 2284cfa8d685b..4268680e9d9e0 100644 --- a/src/test/ui/deprecation/deprecation-in-future.stderr +++ b/src/test/ui/deprecation/deprecation-in-future.stderr @@ -4,5 +4,5 @@ warning: use of deprecated item 'deprecated_future': text LL | deprecated_future(); // ok; deprecated_in_future only applies to rustc_deprecated | ^^^^^^^^^^^^^^^^^ | - = note: #[warn(deprecated)] on by default + = note: `#[warn(deprecated)]` on by default diff --git a/src/test/ui/derives/deriving-meta-empty-trait-list.stderr b/src/test/ui/derives/deriving-meta-empty-trait-list.stderr index 95c94ded3eaf1..b5d3670b5f39e 100644 --- a/src/test/ui/derives/deriving-meta-empty-trait-list.stderr +++ b/src/test/ui/derives/deriving-meta-empty-trait-list.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![deny(unused)] | ^^^^^^ - = note: #[deny(unused_attributes)] implied by #[deny(unused)] + = note: `#[deny(unused_attributes)]` implied by `#[deny(unused)]` error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-31424.stderr b/src/test/ui/did_you_mean/issue-31424.stderr index 147225f1be59e..947ea6c24a345 100644 --- a/src/test/ui/did_you_mean/issue-31424.stderr +++ b/src/test/ui/did_you_mean/issue-31424.stderr @@ -16,7 +16,7 @@ LL | LL | (&mut self).bar(); | ----------------- recursive call site | - = note: #[warn(unconditional_recursion)] on by default + = note: `#[warn(unconditional_recursion)]` on by default = help: a `loop` may express intention better if this is on purpose error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable diff --git a/src/test/ui/editions/edition-extern-crate-allowed.stderr b/src/test/ui/editions/edition-extern-crate-allowed.stderr index b675c13f75d66..45b46794be204 100644 --- a/src/test/ui/editions/edition-extern-crate-allowed.stderr +++ b/src/test/ui/editions/edition-extern-crate-allowed.stderr @@ -9,5 +9,5 @@ note: lint level defined here | LL | #![warn(rust_2018_idioms)] | ^^^^^^^^^^^^^^^^ - = note: #[warn(unused_extern_crates)] implied by #[warn(rust_2018_idioms)] + = note: `#[warn(unused_extern_crates)]` implied by `#[warn(rust_2018_idioms)]` diff --git a/src/test/ui/editions/edition-raw-pointer-method-2015.stderr b/src/test/ui/editions/edition-raw-pointer-method-2015.stderr index 508d5df2a7160..6a8861ba67bb9 100644 --- a/src/test/ui/editions/edition-raw-pointer-method-2015.stderr +++ b/src/test/ui/editions/edition-raw-pointer-method-2015.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #[deny(warnings)] | ^^^^^^^^ - = note: #[deny(tyvar_behind_raw_pointer)] implied by #[deny(warnings)] + = note: `#[deny(tyvar_behind_raw_pointer)]` implied by `#[deny(warnings)]` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #46906 diff --git a/src/test/ui/error-codes/E0396-fixed.stderr b/src/test/ui/error-codes/E0396-fixed.stderr index 4b7f1fa82c26c..7222f87da248f 100644 --- a/src/test/ui/error-codes/E0396-fixed.stderr +++ b/src/test/ui/error-codes/E0396-fixed.stderr @@ -6,7 +6,7 @@ LL | const VALUE: u8 = unsafe { *REG_ADDR }; | | | a memory access tried to interpret some bytes as a pointer | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: aborting due to previous error diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr index e03b7124ac882..f987cb97d1a4b 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr @@ -192,7 +192,7 @@ warning: the feature `rust1` has been stable since 1.0.0 and no longer requires LL | #![feature(rust1)] | ^^^^^ | - = note: #[warn(stable_features)] on by default + = note: `#[warn(stable_features)]` on by default warning: unused attribute --> $DIR/issue-43106-gating-of-builtin-attrs.rs:180:5 diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr index ef89a887fd44d..4310a0c7d588e 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr +++ b/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr @@ -4,7 +4,7 @@ warning: attribute must be of the form `#[inline]` or `#[inline(always|never)]` LL | #[inline = "2100"] fn f() { } | ^^^^^^^^^^^^^^^^^^ | - = note: #[warn(ill_formed_attribute_input)] on by default + = note: `#[warn(ill_formed_attribute_input)]` on by default = 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 diff --git a/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr b/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr index ac8cd101767f4..f13803b80f308 100644 --- a/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr +++ b/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr @@ -4,7 +4,7 @@ error: defaults for type parameters are only allowed in `struct`, `enum`, `type` LL | fn avg(_: T) {} | ^ | - = note: #[deny(invalid_type_param_default)] on by default + = note: `#[deny(invalid_type_param_default)]` on by default = 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 diff --git a/src/test/ui/future-incompatible-lint-group.stderr b/src/test/ui/future-incompatible-lint-group.stderr index 65c37e01eaa93..24e3a077ae6e3 100644 --- a/src/test/ui/future-incompatible-lint-group.stderr +++ b/src/test/ui/future-incompatible-lint-group.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![deny(future_incompatible)] | ^^^^^^^^^^^^^^^^^^^ - = note: #[deny(anonymous_parameters)] implied by #[deny(future_incompatible)] + = note: `#[deny(anonymous_parameters)]` implied by `#[deny(future_incompatible)]` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #41686 diff --git a/src/test/ui/hrtb/hrtb-perfect-forwarding.nll.stderr b/src/test/ui/hrtb/hrtb-perfect-forwarding.nll.stderr index 0522fc45d68f0..6d1ef24b2dccd 100644 --- a/src/test/ui/hrtb/hrtb-perfect-forwarding.nll.stderr +++ b/src/test/ui/hrtb/hrtb-perfect-forwarding.nll.stderr @@ -11,7 +11,7 @@ LL | | no_hrtb(&mut t); LL | | } | |_^ cannot return without recursing | - = note: #[warn(unconditional_recursion)] on by default + = note: `#[warn(unconditional_recursion)]` on by default = help: a `loop` may express intention better if this is on purpose warning: function cannot return without recursing diff --git a/src/test/ui/hygiene/dollar-crate-modern.stderr b/src/test/ui/hygiene/dollar-crate-modern.stderr index 69bbc52ee0d94..cd40df16ba7d1 100644 --- a/src/test/ui/hygiene/dollar-crate-modern.stderr +++ b/src/test/ui/hygiene/dollar-crate-modern.stderr @@ -4,5 +4,5 @@ warning: the feature `crate_in_paths` has been stable since 1.30.0 and no longer LL | #![feature(decl_macro, crate_in_paths)] | ^^^^^^^^^^^^^^ | - = note: #[warn(stable_features)] on by default + = note: `#[warn(stable_features)]` on by default diff --git a/src/test/ui/if/if-let.stderr b/src/test/ui/if/if-let.stderr index 04bca1b76a097..f105098b74cf2 100644 --- a/src/test/ui/if/if-let.stderr +++ b/src/test/ui/if/if-let.stderr @@ -9,7 +9,7 @@ LL | | println!("irrefutable pattern"); LL | | }); | |_______- in this macro invocation | - = note: #[warn(irrefutable_let_patterns)] on by default + = note: `#[warn(irrefutable_let_patterns)]` on by default warning: irrefutable if-let pattern --> $DIR/if-let.rs:6:13 diff --git a/src/test/ui/imports/local-modularized-tricky-fail-3.stderr b/src/test/ui/imports/local-modularized-tricky-fail-3.stderr index 6bece2b17cecf..5272d2a319faa 100644 --- a/src/test/ui/imports/local-modularized-tricky-fail-3.stderr +++ b/src/test/ui/imports/local-modularized-tricky-fail-3.stderr @@ -4,7 +4,7 @@ error: macro-expanded `macro_export` macros from the current crate cannot be ref LL | use exported; | ^^^^^^^^ | - = note: #[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)] on by default + = note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` on by default = 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 #52234 note: the macro is defined here diff --git a/src/test/ui/imports/unused-macro-use.stderr b/src/test/ui/imports/unused-macro-use.stderr index 78683147f7ba6..b7fb532c67cce 100644 --- a/src/test/ui/imports/unused-macro-use.stderr +++ b/src/test/ui/imports/unused-macro-use.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![deny(unused)] | ^^^^^^ - = note: #[deny(unused_imports)] implied by #[deny(unused)] + = note: `#[deny(unused_imports)]` implied by `#[deny(unused)]` error: unused `#[macro_use]` import --> $DIR/unused-macro-use.rs:7:5 diff --git a/src/test/ui/imports/unused.stderr b/src/test/ui/imports/unused.stderr index 259ed9586962c..0366b52ef6a5a 100644 --- a/src/test/ui/imports/unused.stderr +++ b/src/test/ui/imports/unused.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![deny(unused)] | ^^^^^^ - = note: #[deny(unused_imports)] implied by #[deny(unused)] + = note: `#[deny(unused_imports)]` implied by `#[deny(unused)]` error: aborting due to previous error diff --git a/src/test/ui/inference/inference-variable-behind-raw-pointer.stderr b/src/test/ui/inference/inference-variable-behind-raw-pointer.stderr index 52cf68ae2a6d1..b5b885e233fe0 100644 --- a/src/test/ui/inference/inference-variable-behind-raw-pointer.stderr +++ b/src/test/ui/inference/inference-variable-behind-raw-pointer.stderr @@ -4,7 +4,7 @@ warning: type annotations needed LL | if data.is_null() {} | ^^^^^^^ | - = note: #[warn(tyvar_behind_raw_pointer)] on by default + = note: `#[warn(tyvar_behind_raw_pointer)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #46906 diff --git a/src/test/ui/inference/inference_unstable.stderr b/src/test/ui/inference/inference_unstable.stderr index 6c3d8f7ccf372..1f5cc8b13fb46 100644 --- a/src/test/ui/inference/inference_unstable.stderr +++ b/src/test/ui/inference/inference_unstable.stderr @@ -4,7 +4,7 @@ warning: a method with this name may be added to the standard library in the fut LL | assert_eq!('x'.ipu_flatten(), 1); | ^^^^^^^^^^^ | - = note: #[warn(unstable_name_collisions)] on by default + = note: `#[warn(unstable_name_collisions)]` on by default = warning: once this method 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 diff --git a/src/test/ui/invalid/invalid-crate-type.stderr b/src/test/ui/invalid/invalid-crate-type.stderr index 030dc96c6d646..59d5d7bc9bbf0 100644 --- a/src/test/ui/invalid/invalid-crate-type.stderr +++ b/src/test/ui/invalid/invalid-crate-type.stderr @@ -4,7 +4,7 @@ error: invalid `crate_type` value LL | #![crate_type="foo"] | ^^^^^ | - = note: #[deny(unknown_crate_types)] on by default + = note: `#[deny(unknown_crate_types)]` on by default error: invalid `crate_type` value --> $DIR/invalid-crate-type.rs:6:15 diff --git a/src/test/ui/issues/issue-16250.stderr b/src/test/ui/issues/issue-16250.stderr index 142d8e21532d8..f3686e82b05a4 100644 --- a/src/test/ui/issues/issue-16250.stderr +++ b/src/test/ui/issues/issue-16250.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![deny(warnings)] | ^^^^^^^^ - = note: #[deny(improper_ctypes)] implied by #[deny(warnings)] + = note: `#[deny(improper_ctypes)]` implied by `#[deny(warnings)]` = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct note: type defined here --> $DIR/issue-16250.rs:3:1 diff --git a/src/test/ui/issues/issue-17718-const-naming.stderr b/src/test/ui/issues/issue-17718-const-naming.stderr index b92acecb83eca..1fe1821292c08 100644 --- a/src/test/ui/issues/issue-17718-const-naming.stderr +++ b/src/test/ui/issues/issue-17718-const-naming.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![deny(warnings)] | ^^^^^^^^ - = note: #[deny(dead_code)] implied by #[deny(warnings)] + = note: `#[deny(dead_code)]` implied by `#[deny(warnings)]` error: constant `foo` should have an upper case name --> $DIR/issue-17718-const-naming.rs:4:7 @@ -22,7 +22,7 @@ note: lint level defined here | LL | #![deny(warnings)] | ^^^^^^^^ - = note: #[deny(non_upper_case_globals)] implied by #[deny(warnings)] + = note: `#[deny(non_upper_case_globals)]` implied by `#[deny(warnings)]` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-27042.stderr b/src/test/ui/issues/issue-27042.stderr index c67b8ad738155..4beb752854b9c 100644 --- a/src/test/ui/issues/issue-27042.stderr +++ b/src/test/ui/issues/issue-27042.stderr @@ -6,7 +6,7 @@ LL | | LL | | while true { break }; // but here we cite the whole loop | |____________________________^ help: use `loop` | - = note: #[warn(while_true)] on by default + = note: `#[warn(while_true)]` on by default error[E0308]: mismatched types --> $DIR/issue-27042.rs:6:16 diff --git a/src/test/ui/issues/issue-30079.stderr b/src/test/ui/issues/issue-30079.stderr index 57ca572154484..6fc8b810745aa 100644 --- a/src/test/ui/issues/issue-30079.stderr +++ b/src/test/ui/issues/issue-30079.stderr @@ -4,7 +4,7 @@ warning: private type `m1::Priv` in public interface (error E0446) LL | pub fn f(_: Priv) {} | ^^^^^^^^^^^^^^^^^^^^ | - = note: #[warn(private_in_public)] on by default + = note: `#[warn(private_in_public)]` on by default = 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 #34537 diff --git a/src/test/ui/issues/issue-30730.stderr b/src/test/ui/issues/issue-30730.stderr index 0a901076f467a..fcbab77b0073b 100644 --- a/src/test/ui/issues/issue-30730.stderr +++ b/src/test/ui/issues/issue-30730.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![deny(warnings)] | ^^^^^^^^ - = note: #[deny(unused_imports)] implied by #[deny(warnings)] + = note: `#[deny(unused_imports)]` implied by `#[deny(warnings)]` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-32995-2.stderr b/src/test/ui/issues/issue-32995-2.stderr index 104b76cba2df9..4a580b09bf372 100644 --- a/src/test/ui/issues/issue-32995-2.stderr +++ b/src/test/ui/issues/issue-32995-2.stderr @@ -4,7 +4,7 @@ error: parenthesized type parameters may only be used with a `Fn` trait LL | { fn f() {} } | ^^ | - = note: #[deny(parenthesized_params_in_types_and_modules)] on by default + = note: `#[deny(parenthesized_params_in_types_and_modules)]` on by default = 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 #42238 diff --git a/src/test/ui/issues/issue-32995.stderr b/src/test/ui/issues/issue-32995.stderr index f97d86f6522ab..59d93ece06742 100644 --- a/src/test/ui/issues/issue-32995.stderr +++ b/src/test/ui/issues/issue-32995.stderr @@ -4,7 +4,7 @@ error: parenthesized type parameters may only be used with a `Fn` trait LL | let x: usize() = 1; | ^^ | - = note: #[deny(parenthesized_params_in_types_and_modules)] on by default + = note: `#[deny(parenthesized_params_in_types_and_modules)]` on by default = 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 #42238 diff --git a/src/test/ui/issues/issue-37515.stderr b/src/test/ui/issues/issue-37515.stderr index 1476d17cdc642..f084095969847 100644 --- a/src/test/ui/issues/issue-37515.stderr +++ b/src/test/ui/issues/issue-37515.stderr @@ -9,5 +9,5 @@ note: lint level defined here | LL | #![warn(unused)] | ^^^^^^ - = note: #[warn(dead_code)] implied by #[warn(unused)] + = note: `#[warn(dead_code)]` implied by `#[warn(unused)]` diff --git a/src/test/ui/issues/issue-38715.stderr b/src/test/ui/issues/issue-38715.stderr index 34e08bfc93aaf..02b96d2d2449c 100644 --- a/src/test/ui/issues/issue-38715.stderr +++ b/src/test/ui/issues/issue-38715.stderr @@ -4,7 +4,7 @@ error: a macro named `foo` has already been exported LL | macro_rules! foo { () => {} } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `foo` already exported | - = note: #[deny(duplicate_macro_exports)] on by default + = note: `#[deny(duplicate_macro_exports)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #35896 note: previous macro export is now shadowed diff --git a/src/test/ui/issues/issue-39404.stderr b/src/test/ui/issues/issue-39404.stderr index bffea49362a4d..d2f2a823c2a6b 100644 --- a/src/test/ui/issues/issue-39404.stderr +++ b/src/test/ui/issues/issue-39404.stderr @@ -4,7 +4,7 @@ error: missing fragment specifier LL | macro_rules! m { ($i) => {} } | ^^ | - = note: #[deny(missing_fragment_specifier)] on by default + = note: `#[deny(missing_fragment_specifier)]` on by default = 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 #40107 diff --git a/src/test/ui/issues/issue-43105.stderr b/src/test/ui/issues/issue-43105.stderr index 378fbe6d5c430..e3609c57dcec5 100644 --- a/src/test/ui/issues/issue-43105.stderr +++ b/src/test/ui/issues/issue-43105.stderr @@ -12,7 +12,7 @@ LL | const NUM: u8 = xyz(); | | | calling non-const function `xyz` | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: could not evaluate constant pattern --> $DIR/issue-43105.rs:9:9 diff --git a/src/test/ui/issues/issue-45562.stderr b/src/test/ui/issues/issue-45562.stderr index b97b9cd6727f3..e6e33aa85c375 100644 --- a/src/test/ui/issues/issue-45562.stderr +++ b/src/test/ui/issues/issue-45562.stderr @@ -6,7 +6,7 @@ LL | #[no_mangle] pub const RAH: usize = 5; | | | help: try a static value: `pub static` | - = note: #[deny(no_mangle_const_items)] on by default + = note: `#[deny(no_mangle_const_items)]` on by default error: aborting due to previous error diff --git a/src/test/ui/issues/issue-54348.stderr b/src/test/ui/issues/issue-54348.stderr index e39a1cb20cff3..fa77bd6fd7797 100644 --- a/src/test/ui/issues/issue-54348.stderr +++ b/src/test/ui/issues/issue-54348.stderr @@ -4,7 +4,7 @@ error: index out of bounds: the len is 1 but the index is 1 LL | [1][1.5 as usize]; | ^^^^^^^^^^^^^^^^^ | - = note: #[deny(const_err)] on by default + = note: `#[deny(const_err)]` on by default error: index out of bounds: the len is 1 but the index is 1 --> $DIR/issue-54348.rs:4:5 diff --git a/src/test/ui/issues/issue-60622.stderr b/src/test/ui/issues/issue-60622.stderr index 0c337c315f161..da0ae1541bb8f 100644 --- a/src/test/ui/issues/issue-60622.stderr +++ b/src/test/ui/issues/issue-60622.stderr @@ -12,7 +12,7 @@ note: lint level defined here | LL | #![deny(warnings)] | ^^^^^^^^ - = note: #[deny(late_bound_lifetime_arguments)] implied by #[deny(warnings)] + = note: `#[deny(late_bound_lifetime_arguments)]` implied by `#[deny(warnings)]` = 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 diff --git a/src/test/ui/issues/issue-8727.stderr b/src/test/ui/issues/issue-8727.stderr index a7d020cb6756e..df01f42ce26a7 100644 --- a/src/test/ui/issues/issue-8727.stderr +++ b/src/test/ui/issues/issue-8727.stderr @@ -6,7 +6,7 @@ LL | fn generic() { LL | generic::>(); | ---------------------- recursive call site | - = note: #[warn(unconditional_recursion)] on by default + = note: `#[warn(unconditional_recursion)]` on by default = help: a `loop` may express intention better if this is on purpose error: reached the recursion limit while instantiating `generic::>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` diff --git a/src/test/ui/lint/deny-overflowing-literals.stderr b/src/test/ui/lint/deny-overflowing-literals.stderr index c97872b5222e8..7f59495023e26 100644 --- a/src/test/ui/lint/deny-overflowing-literals.stderr +++ b/src/test/ui/lint/deny-overflowing-literals.stderr @@ -4,7 +4,7 @@ error: literal out of range for `u8` LL | let x: u8 = 256; | ^^^ | - = note: #[deny(overflowing_literals)] on by default + = note: `#[deny(overflowing_literals)]` on by default error: range endpoint is out of range for `u8` --> $DIR/deny-overflowing-literals.rs:5:14 diff --git a/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr b/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr index 8fd98e0a3db2e..a0b34d220c8d9 100644 --- a/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr +++ b/src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![warn(unused)] // UI tests pass `-A unused` (#43896) | ^^^^^^ - = note: #[warn(unused_variables)] implied by #[warn(unused)] + = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]` warning: unused variable: `mut_unused_var` --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:33:13 @@ -54,7 +54,7 @@ note: lint level defined here | LL | #![warn(unused)] // UI tests pass `-A unused` (#43896) | ^^^^^^ - = note: #[warn(unused_assignments)] implied by #[warn(unused)] + = note: `#[warn(unused_assignments)]` implied by `#[warn(unused)]` = help: maybe it is overwritten before being read? warning: unused variable: `fire` @@ -112,7 +112,7 @@ note: lint level defined here | LL | #![warn(unused)] // UI tests pass `-A unused` (#43896) | ^^^^^^ - = note: #[warn(unused_mut)] implied by #[warn(unused)] + = note: `#[warn(unused_mut)]` implied by `#[warn(unused)]` warning: variable does not need to be mutable --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:35:10 diff --git a/src/test/ui/lint/issue-54180-unused-ref-field.stderr b/src/test/ui/lint/issue-54180-unused-ref-field.stderr index 9f47554a1a65e..817d9a46e83a6 100644 --- a/src/test/ui/lint/issue-54180-unused-ref-field.stderr +++ b/src/test/ui/lint/issue-54180-unused-ref-field.stderr @@ -11,7 +11,7 @@ note: lint level defined here | LL | #![deny(unused)] | ^^^^^^ - = note: #[deny(unused_variables)] implied by #[deny(unused)] + = note: `#[deny(unused_variables)]` implied by `#[deny(unused)]` error: unused variable: `x` --> $DIR/issue-54180-unused-ref-field.rs:29:45 diff --git a/src/test/ui/lint/lint-change-warnings.stderr b/src/test/ui/lint/lint-change-warnings.stderr index c4b8ab5fc1858..336cb7ea84f0c 100644 --- a/src/test/ui/lint/lint-change-warnings.stderr +++ b/src/test/ui/lint/lint-change-warnings.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![deny(warnings)] | ^^^^^^^^ - = note: #[deny(while_true)] implied by #[deny(warnings)] + = note: `#[deny(while_true)]` implied by `#[deny(warnings)]` warning: denote infinite loops with `loop { ... }` --> $DIR/lint-change-warnings.rs:15:5 @@ -17,7 +17,7 @@ warning: denote infinite loops with `loop { ... }` LL | while true {} | ^^^^^^^^^^ help: use `loop` | - = note: #[warn(while_true)] on by default + = note: `#[warn(while_true)]` on by default error: denote infinite loops with `loop { ... }` --> $DIR/lint-change-warnings.rs:20:5 @@ -30,7 +30,7 @@ note: lint level defined here | LL | #[forbid(warnings)] | ^^^^^^^^ - = note: #[forbid(while_true)] implied by #[forbid(warnings)] + = note: `#[forbid(while_true)]` implied by `#[forbid(warnings)]` error: aborting due to 2 previous errors diff --git a/src/test/ui/lint/lint-group-nonstandard-style.stderr b/src/test/ui/lint/lint-group-nonstandard-style.stderr index a365204f12adf..1cc973d32c2d3 100644 --- a/src/test/ui/lint/lint-group-nonstandard-style.stderr +++ b/src/test/ui/lint/lint-group-nonstandard-style.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![warn(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ - = note: #[warn(non_camel_case_types)] implied by #[warn(nonstandard_style)] + = note: `#[warn(non_camel_case_types)]` implied by `#[warn(nonstandard_style)]` error: function `CamelCase` should have a snake case name --> $DIR/lint-group-nonstandard-style.rs:4:4 @@ -22,7 +22,7 @@ note: lint level defined here | LL | #![deny(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ - = note: #[deny(non_snake_case)] implied by #[deny(nonstandard_style)] + = note: `#[deny(non_snake_case)]` implied by `#[deny(nonstandard_style)]` error: function `CamelCase` should have a snake case name --> $DIR/lint-group-nonstandard-style.rs:12:12 @@ -35,7 +35,7 @@ note: lint level defined here | LL | #[forbid(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ - = note: #[forbid(non_snake_case)] implied by #[forbid(nonstandard_style)] + = note: `#[forbid(non_snake_case)]` implied by `#[forbid(nonstandard_style)]` error: static variable `bad` should have an upper case name --> $DIR/lint-group-nonstandard-style.rs:14:16 @@ -48,7 +48,7 @@ note: lint level defined here | LL | #[forbid(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ - = note: #[forbid(non_upper_case_globals)] implied by #[forbid(nonstandard_style)] + = note: `#[forbid(non_upper_case_globals)]` implied by `#[forbid(nonstandard_style)]` warning: function `CamelCase` should have a snake case name --> $DIR/lint-group-nonstandard-style.rs:20:12 @@ -61,7 +61,7 @@ note: lint level defined here | LL | #![warn(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ - = note: #[warn(non_snake_case)] implied by #[warn(nonstandard_style)] + = note: `#[warn(non_snake_case)]` implied by `#[warn(nonstandard_style)]` error: aborting due to 3 previous errors diff --git a/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr b/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr index 448cc953d40ad..5308bba440e06 100644 --- a/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr +++ b/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr @@ -7,7 +7,7 @@ LL | LL | impl Foo for dyn Send + Send {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + 'static)` | - = note: #[deny(order_dependent_trait_objects)] on by default + = note: `#[deny(order_dependent_trait_objects)]` on by default = 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 #56484 diff --git a/src/test/ui/lint/lint-output-format-2.stderr b/src/test/ui/lint/lint-output-format-2.stderr index f4e6b062034fd..fcaf01488ab24 100644 --- a/src/test/ui/lint/lint-output-format-2.stderr +++ b/src/test/ui/lint/lint-output-format-2.stderr @@ -4,7 +4,7 @@ warning: use of deprecated item 'lint_output_format::foo': text LL | use lint_output_format::{foo, bar}; | ^^^ | - = note: #[warn(deprecated)] on by default + = note: `#[warn(deprecated)]` on by default warning: use of deprecated item 'lint_output_format::foo': text --> $DIR/lint-output-format-2.rs:12:14 diff --git a/src/test/ui/lint/lint-removed-cmdline.stderr b/src/test/ui/lint/lint-removed-cmdline.stderr index d46ef6b9237fd..69b0d2675c22d 100644 --- a/src/test/ui/lint/lint-removed-cmdline.stderr +++ b/src/test/ui/lint/lint-removed-cmdline.stderr @@ -13,7 +13,7 @@ note: lint level defined here | LL | #[deny(warnings)] | ^^^^^^^^ - = note: #[deny(unused_variables)] implied by #[deny(warnings)] + = note: `#[deny(unused_variables)]` implied by `#[deny(warnings)]` error: aborting due to previous error diff --git a/src/test/ui/lint/lint-removed.stderr b/src/test/ui/lint/lint-removed.stderr index cde494f22f091..060ba31bced9a 100644 --- a/src/test/ui/lint/lint-removed.stderr +++ b/src/test/ui/lint/lint-removed.stderr @@ -4,7 +4,7 @@ warning: lint `raw_pointer_derive` has been removed: `using derive with raw poin LL | #[deny(raw_pointer_derive)] | ^^^^^^^^^^^^^^^^^^ | - = note: #[warn(renamed_and_removed_lints)] on by default + = note: `#[warn(renamed_and_removed_lints)]` on by default error: unused variable: `unused` --> $DIR/lint-removed.rs:8:17 diff --git a/src/test/ui/lint/lint-renamed-allow.stderr b/src/test/ui/lint/lint-renamed-allow.stderr index 383a800b54a86..1d984cb8287ff 100644 --- a/src/test/ui/lint/lint-renamed-allow.stderr +++ b/src/test/ui/lint/lint-renamed-allow.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #[deny(unused)] | ^^^^^^ - = note: #[deny(unused_variables)] implied by #[deny(unused)] + = note: `#[deny(unused_variables)]` implied by `#[deny(unused)]` error: aborting due to previous error diff --git a/src/test/ui/lint/lint-renamed-cmdline.stderr b/src/test/ui/lint/lint-renamed-cmdline.stderr index 6247ee0aff833..c978981a5c2ed 100644 --- a/src/test/ui/lint/lint-renamed-cmdline.stderr +++ b/src/test/ui/lint/lint-renamed-cmdline.stderr @@ -13,7 +13,7 @@ note: lint level defined here | LL | #[deny(unused)] | ^^^^^^ - = note: #[deny(unused_variables)] implied by #[deny(unused)] + = note: `#[deny(unused_variables)]` implied by `#[deny(unused)]` error: aborting due to previous error diff --git a/src/test/ui/lint/lint-renamed.stderr b/src/test/ui/lint/lint-renamed.stderr index 2174b22ffb9db..ba8eadf23aca5 100644 --- a/src/test/ui/lint/lint-renamed.stderr +++ b/src/test/ui/lint/lint-renamed.stderr @@ -4,7 +4,7 @@ warning: lint `bare_trait_object` has been renamed to `bare_trait_objects` LL | #[deny(bare_trait_object)] | ^^^^^^^^^^^^^^^^^ help: use the new name: `bare_trait_objects` | - = note: #[warn(renamed_and_removed_lints)] on by default + = note: `#[warn(renamed_and_removed_lints)]` on by default error: unused variable: `unused` --> $DIR/lint-renamed.rs:4:17 @@ -17,7 +17,7 @@ note: lint level defined here | LL | #[deny(unused)] | ^^^^^^ - = note: #[deny(unused_variables)] implied by #[deny(unused)] + = note: `#[deny(unused_variables)]` implied by `#[deny(unused)]` error: aborting due to previous error diff --git a/src/test/ui/lint/lint-unnecessary-parens.stderr b/src/test/ui/lint/lint-unnecessary-parens.stderr index 05ecbfdf4fa39..83b247a4a6053 100644 --- a/src/test/ui/lint/lint-unnecessary-parens.stderr +++ b/src/test/ui/lint/lint-unnecessary-parens.stderr @@ -40,7 +40,7 @@ warning: denote infinite loops with `loop { ... }` LL | while (true) {} | ^^^^^^^^^^^^ help: use `loop` | - = note: #[warn(while_true)] on by default + = note: `#[warn(while_true)]` on by default error: unnecessary parentheses around `match` head expression --> $DIR/lint-unnecessary-parens.rs:23:11 diff --git a/src/test/ui/lint/lint-uppercase-variables.stderr b/src/test/ui/lint/lint-uppercase-variables.stderr index 40c13231c1823..9ea3795f89e6c 100644 --- a/src/test/ui/lint/lint-uppercase-variables.stderr +++ b/src/test/ui/lint/lint-uppercase-variables.stderr @@ -15,7 +15,7 @@ note: lint level defined here | LL | #![warn(unused)] | ^^^^^^ - = note: #[warn(unused_variables)] implied by #[warn(unused)] + = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]` error: structure field `X` should have a snake case name --> $DIR/lint-uppercase-variables.rs:10:5 diff --git a/src/test/ui/lint/not_found.stderr b/src/test/ui/lint/not_found.stderr index 266cf10af8285..70d49a4e69ca0 100644 --- a/src/test/ui/lint/not_found.stderr +++ b/src/test/ui/lint/not_found.stderr @@ -4,7 +4,7 @@ warning: unknown lint: `FOO_BAR` LL | #[allow(FOO_BAR)] | ^^^^^^^ | - = note: #[warn(unknown_lints)] on by default + = note: `#[warn(unknown_lints)]` on by default warning: unknown lint: `DEAD_CODE` --> $DIR/not_found.rs:8:8 diff --git a/src/test/ui/lint/reasons-erroneous.rs b/src/test/ui/lint/reasons-erroneous.rs index 84db885ac0949..21c2ddd5ef7ce 100644 --- a/src/test/ui/lint/reasons-erroneous.rs +++ b/src/test/ui/lint/reasons-erroneous.rs @@ -23,6 +23,6 @@ //~| NOTE reason in lint attribute must come last #![warn(missing_copy_implementations, reason)] //~^ WARN unknown lint -//~| NOTE #[warn(unknown_lints)] on by default +//~| NOTE `#[warn(unknown_lints)]` on by default fn main() {} diff --git a/src/test/ui/lint/reasons-erroneous.stderr b/src/test/ui/lint/reasons-erroneous.stderr index ff4a0f36bbda4..3f925f19ef18e 100644 --- a/src/test/ui/lint/reasons-erroneous.stderr +++ b/src/test/ui/lint/reasons-erroneous.stderr @@ -46,7 +46,7 @@ warning: unknown lint: `reason` LL | #![warn(missing_copy_implementations, reason)] | ^^^^^^ | - = note: #[warn(unknown_lints)] on by default + = note: `#[warn(unknown_lints)]` on by default error: aborting due to 7 previous errors diff --git a/src/test/ui/lint/reasons.stderr b/src/test/ui/lint/reasons.stderr index 3bb1480a30109..cb5f4ddf47b63 100644 --- a/src/test/ui/lint/reasons.stderr +++ b/src/test/ui/lint/reasons.stderr @@ -24,5 +24,5 @@ note: lint level defined here | LL | nonstandard_style, | ^^^^^^^^^^^^^^^^^ - = note: #[warn(non_snake_case)] implied by #[warn(nonstandard_style)] + = note: `#[warn(non_snake_case)]` implied by `#[warn(nonstandard_style)]` diff --git a/src/test/ui/lint/suggestions.stderr b/src/test/ui/lint/suggestions.stderr index de7c1fb898679..eb1e95dcdc52c 100644 --- a/src/test/ui/lint/suggestions.stderr +++ b/src/test/ui/lint/suggestions.stderr @@ -4,7 +4,7 @@ warning: denote infinite loops with `loop { ... }` LL | while true { | ^^^^^^^^^^ help: use `loop` | - = note: #[warn(while_true)] on by default + = note: `#[warn(while_true)]` on by default warning: unnecessary parentheses around assigned value --> $DIR/suggestions.rs:49:31 @@ -24,7 +24,7 @@ warning: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was LL | #[no_debug] // should suggest removal of deprecated attribute | ^^^^^^^^^^^ help: remove this attribute | - = note: #[warn(deprecated)] on by default + = note: `#[warn(deprecated)]` on by default warning: variable does not need to be mutable --> $DIR/suggestions.rs:49:13 @@ -60,7 +60,7 @@ LL | #[no_mangle] const DISCOVERY: usize = 1; | | | help: try a static value: `pub static` | - = note: #[deny(no_mangle_const_items)] on by default + = note: `#[deny(no_mangle_const_items)]` on by default warning: functions generic over types or consts must be mangled --> $DIR/suggestions.rs:12:1 @@ -71,7 +71,7 @@ LL | LL | pub fn defiant(_t: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: #[warn(no_mangle_generic_items)] on by default + = note: `#[warn(no_mangle_generic_items)]` on by default warning: the `warp_factor:` in this pattern is redundant --> $DIR/suggestions.rs:61:23 @@ -81,7 +81,7 @@ LL | Equinox { warp_factor: warp_factor } => {} | | | help: remove this | - = note: #[warn(non_shorthand_field_patterns)] on by default + = note: `#[warn(non_shorthand_field_patterns)]` on by default error: const items should never be #[no_mangle] --> $DIR/suggestions.rs:22:18 diff --git a/src/test/ui/liveness/liveness-move-in-while.stderr b/src/test/ui/liveness/liveness-move-in-while.stderr index bbf5e50f1e09d..8350f2708eae0 100644 --- a/src/test/ui/liveness/liveness-move-in-while.stderr +++ b/src/test/ui/liveness/liveness-move-in-while.stderr @@ -4,7 +4,7 @@ warning: denote infinite loops with `loop { ... }` LL | while true { while true { while true { x = y; x.clone(); } } } | ^^^^^^^^^^ help: use `loop` | - = note: #[warn(while_true)] on by default + = note: `#[warn(while_true)]` on by default warning: denote infinite loops with `loop { ... }` --> $DIR/liveness-move-in-while.rs:8:22 diff --git a/src/test/ui/liveness/liveness-unused.stderr b/src/test/ui/liveness/liveness-unused.stderr index d6077111f71b4..40a677c08f2b0 100644 --- a/src/test/ui/liveness/liveness-unused.stderr +++ b/src/test/ui/liveness/liveness-unused.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![warn(unused)] | ^^^^^^ - = note: #[warn(unreachable_code)] implied by #[warn(unused)] + = note: `#[warn(unreachable_code)]` implied by `#[warn(unused)]` error: unused variable: `x` --> $DIR/liveness-unused.rs:8:7 diff --git a/src/test/ui/loops/loop-break-value.stderr b/src/test/ui/loops/loop-break-value.stderr index f458c88ea4892..1e167905ec8d7 100644 --- a/src/test/ui/loops/loop-break-value.stderr +++ b/src/test/ui/loops/loop-break-value.stderr @@ -4,7 +4,7 @@ warning: denote infinite loops with `loop { ... }` LL | 'while_loop: while true { | ^^^^^^^^^^^^^^^^^^^^^^^ help: use `loop` | - = note: #[warn(while_true)] on by default + = note: `#[warn(while_true)]` on by default error[E0571]: `break` with value from a `while` loop --> $DIR/loop-break-value.rs:28:9 diff --git a/src/test/ui/macros/macro-deprecation.stderr b/src/test/ui/macros/macro-deprecation.stderr index 4c2ad7d2fe9e7..75915b9091006 100644 --- a/src/test/ui/macros/macro-deprecation.stderr +++ b/src/test/ui/macros/macro-deprecation.stderr @@ -4,7 +4,7 @@ warning: use of deprecated item 'local_deprecated': local deprecation note LL | local_deprecated!(); | ^^^^^^^^^^^^^^^^ | - = note: #[warn(deprecated)] on by default + = note: `#[warn(deprecated)]` on by default warning: use of deprecated item 'deprecated_macro': deprecation note --> $DIR/macro-deprecation.rs:12:5 diff --git a/src/test/ui/macros/macro-path-prelude-pass.stderr b/src/test/ui/macros/macro-path-prelude-pass.stderr index 3744e0198b4ce..c6e7fd77cd914 100644 --- a/src/test/ui/macros/macro-path-prelude-pass.stderr +++ b/src/test/ui/macros/macro-path-prelude-pass.stderr @@ -4,5 +4,5 @@ warning: the feature `extern_prelude` has been stable since 1.30.0 and no longer LL | #![feature(extern_prelude)] | ^^^^^^^^^^^^^^ | - = note: #[warn(stable_features)] on by default + = note: `#[warn(stable_features)]` on by default diff --git a/src/test/ui/macros/macro-stability.stderr b/src/test/ui/macros/macro-stability.stderr index 21c48bfe5e78c..d357314d84c3e 100644 --- a/src/test/ui/macros/macro-stability.stderr +++ b/src/test/ui/macros/macro-stability.stderr @@ -28,7 +28,7 @@ warning: use of deprecated item 'deprecated_macro': deprecation reason LL | deprecated_macro!(); | ^^^^^^^^^^^^^^^^ | - = note: #[warn(deprecated)] on by default + = note: `#[warn(deprecated)]` on by default warning: use of deprecated item 'local_deprecated': local deprecation reason --> $DIR/macro-stability.rs:26:5 diff --git a/src/test/ui/malformed/malformed-regressions.stderr b/src/test/ui/malformed/malformed-regressions.stderr index 99a87f0c3aa0f..eebb6f0623fbf 100644 --- a/src/test/ui/malformed/malformed-regressions.stderr +++ b/src/test/ui/malformed/malformed-regressions.stderr @@ -4,7 +4,7 @@ warning: attribute must be of the form `#[doc(hidden|inline|...)]` or `#[doc = " LL | #[doc] | ^^^^^^ | - = note: #[warn(ill_formed_attribute_input)] on by default + = note: `#[warn(ill_formed_attribute_input)]` on by default = 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 diff --git a/src/test/ui/match/match-range-fail-dominate.stderr b/src/test/ui/match/match-range-fail-dominate.stderr index f481e56c85e56..d0ff4930a4519 100644 --- a/src/test/ui/match/match-range-fail-dominate.stderr +++ b/src/test/ui/match/match-range-fail-dominate.stderr @@ -34,7 +34,7 @@ warning: floating-point types cannot be used in patterns LL | 0.01f64 ..= 6.5f64 => {} | ^^^^^^^ | - = note: #[warn(illegal_floating_point_literal_pattern)] on by default + = note: `#[warn(illegal_floating_point_literal_pattern)]` on by default = 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 #41620 diff --git a/src/test/ui/never-assign-dead-code.stderr b/src/test/ui/never-assign-dead-code.stderr index 6735310da8b95..779780a90a81d 100644 --- a/src/test/ui/never-assign-dead-code.stderr +++ b/src/test/ui/never-assign-dead-code.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![warn(unused)] | ^^^^^^ - = note: #[warn(unreachable_code)] implied by #[warn(unused)] + = note: `#[warn(unreachable_code)]` implied by `#[warn(unused)]` warning: unreachable expression --> $DIR/never-assign-dead-code.rs:10:5 @@ -28,5 +28,5 @@ note: lint level defined here | LL | #![warn(unused)] | ^^^^^^ - = note: #[warn(unused_variables)] implied by #[warn(unused)] + = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]` diff --git a/src/test/ui/nll/issue-51191.stderr b/src/test/ui/nll/issue-51191.stderr index e226de15dc2f0..7fa355eabb230 100644 --- a/src/test/ui/nll/issue-51191.stderr +++ b/src/test/ui/nll/issue-51191.stderr @@ -7,7 +7,7 @@ LL | LL | (&mut self).bar(); | ----------------- recursive call site | - = note: #[warn(unconditional_recursion)] on by default + = note: `#[warn(unconditional_recursion)]` on by default = help: a `loop` may express intention better if this is on purpose error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable diff --git a/src/test/ui/parser/trait-object-trait-parens.stderr b/src/test/ui/parser/trait-object-trait-parens.stderr index e3fb8a0113a66..03fb764ee0384 100644 --- a/src/test/ui/parser/trait-object-trait-parens.stderr +++ b/src/test/ui/parser/trait-object-trait-parens.stderr @@ -16,7 +16,7 @@ warning: trait objects without an explicit `dyn` are deprecated LL | let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (Copy) + (?Sized) + (for<'a> Trait<'a>)` | - = note: #[warn(bare_trait_objects)] on by default + = note: `#[warn(bare_trait_objects)]` on by default warning: trait objects without an explicit `dyn` are deprecated --> $DIR/trait-object-trait-parens.rs:9:16 diff --git a/src/test/ui/path-lookahead.stderr b/src/test/ui/path-lookahead.stderr index 50593e45230ba..197848e428a25 100644 --- a/src/test/ui/path-lookahead.stderr +++ b/src/test/ui/path-lookahead.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![warn(unused)] | ^^^^^^ - = note: #[warn(unused_parens)] implied by #[warn(unused)] + = note: `#[warn(unused_parens)]` implied by `#[warn(unused)]` warning: function is never used: `with_parens` --> $DIR/path-lookahead.rs:7:1 @@ -22,7 +22,7 @@ note: lint level defined here | LL | #![warn(unused)] | ^^^^^^ - = note: #[warn(dead_code)] implied by #[warn(unused)] + = note: `#[warn(dead_code)]` implied by `#[warn(unused)]` warning: function is never used: `no_parens` --> $DIR/path-lookahead.rs:11:1 diff --git a/src/test/ui/privacy/legacy-ctor-visibility.stderr b/src/test/ui/privacy/legacy-ctor-visibility.stderr index f0590951c081d..69b6e08befc67 100644 --- a/src/test/ui/privacy/legacy-ctor-visibility.stderr +++ b/src/test/ui/privacy/legacy-ctor-visibility.stderr @@ -4,7 +4,7 @@ error: private struct constructors are not usable through re-exports in outer mo LL | S(10); | ^ | - = note: #[deny(legacy_constructor_visibility)] on by default + = note: `#[deny(legacy_constructor_visibility)]` on by default = 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 #39207 diff --git a/src/test/ui/privacy/private-in-public-assoc-ty.stderr b/src/test/ui/privacy/private-in-public-assoc-ty.stderr index 81d70ee770857..0b32e4cd306f7 100644 --- a/src/test/ui/privacy/private-in-public-assoc-ty.stderr +++ b/src/test/ui/privacy/private-in-public-assoc-ty.stderr @@ -10,7 +10,7 @@ LL | | fn infer_exist() -> Self::Exist; LL | | } | |_____^ | - = note: #[warn(private_in_public)] on by default + = note: `#[warn(private_in_public)]` on by default = 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 #34537 diff --git a/src/test/ui/privacy/private-in-public-non-principal.stderr b/src/test/ui/privacy/private-in-public-non-principal.stderr index 578f4380b4225..4f2a5ea45aa32 100644 --- a/src/test/ui/privacy/private-in-public-non-principal.stderr +++ b/src/test/ui/privacy/private-in-public-non-principal.stderr @@ -4,7 +4,7 @@ warning: private trait `PrivNonPrincipal` in public interface (error E0445) LL | pub fn leak_dyn_nonprincipal() -> Box { loop {} } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: #[warn(private_in_public)] on by default + = note: `#[warn(private_in_public)]` on by default = 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 #34537 diff --git a/src/test/ui/privacy/private-in-public-warn.stderr b/src/test/ui/privacy/private-in-public-warn.stderr index 16b7e5103283f..9741f3b6d0d41 100644 --- a/src/test/ui/privacy/private-in-public-warn.stderr +++ b/src/test/ui/privacy/private-in-public-warn.stderr @@ -339,7 +339,7 @@ warning: bounds on generic parameters are not enforced in type aliases LL | pub type Alias = T; | ^^^^^^ | - = note: #[warn(type_alias_bounds)] on by default + = note: `#[warn(type_alias_bounds)]` on by default = help: the bound will not be checked when the type alias is used, and should be removed warning: where clauses are not enforced in type aliases diff --git a/src/test/ui/proc-macro/attributes-included.stderr b/src/test/ui/proc-macro/attributes-included.stderr index fcd77b2d383da..0f74f45e102f7 100644 --- a/src/test/ui/proc-macro/attributes-included.stderr +++ b/src/test/ui/proc-macro/attributes-included.stderr @@ -9,5 +9,5 @@ note: lint level defined here | LL | #![warn(unused)] | ^^^^^^ - = note: #[warn(unused_variables)] implied by #[warn(unused)] + = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]` diff --git a/src/test/ui/proc-macro/generate-mod.stderr b/src/test/ui/proc-macro/generate-mod.stderr index 1b828b4f03f2c..51bbb23da7540 100644 --- a/src/test/ui/proc-macro/generate-mod.stderr +++ b/src/test/ui/proc-macro/generate-mod.stderr @@ -28,7 +28,7 @@ warning: cannot find type `FromOutside` in this scope LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import | - = note: #[warn(proc_macro_derive_resolution_fallback)] on by default + = note: `#[warn(proc_macro_derive_resolution_fallback)]` on by default = 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 #50504 diff --git a/src/test/ui/pub/pub-reexport-priv-extern-crate.stderr b/src/test/ui/pub/pub-reexport-priv-extern-crate.stderr index 61c148bf2df27..0b44c5a6525f6 100644 --- a/src/test/ui/pub/pub-reexport-priv-extern-crate.stderr +++ b/src/test/ui/pub/pub-reexport-priv-extern-crate.stderr @@ -4,7 +4,7 @@ error: extern crate `core` is private, and cannot be re-exported (error E0365), LL | pub use core as reexported_core; | ^^^^^^^^^^^^^^^^^^^^^^^ | - = note: #[deny(pub_use_of_private_extern_crate)] on by default + = note: `#[deny(pub_use_of_private_extern_crate)]` on by default = 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 #34537 diff --git a/src/test/ui/regions/region-bound-on-closure-outlives-call.stderr b/src/test/ui/regions/region-bound-on-closure-outlives-call.stderr index d455902ee8c07..c720b26aa03db 100644 --- a/src/test/ui/regions/region-bound-on-closure-outlives-call.stderr +++ b/src/test/ui/regions/region-bound-on-closure-outlives-call.stderr @@ -7,7 +7,7 @@ LL | LL | (|x| f(x))(call_rec(f)) | ----------- recursive call site | - = note: #[warn(unconditional_recursion)] on by default + = note: `#[warn(unconditional_recursion)]` on by default = help: a `loop` may express intention better if this is on purpose error[E0505]: cannot move out of `f` because it is borrowed diff --git a/src/test/ui/removing-extern-crate.stderr b/src/test/ui/removing-extern-crate.stderr index fbdcb1582579a..18d0756e9f4e9 100644 --- a/src/test/ui/removing-extern-crate.stderr +++ b/src/test/ui/removing-extern-crate.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![warn(rust_2018_idioms)] | ^^^^^^^^^^^^^^^^ - = note: #[warn(unused_extern_crates)] implied by #[warn(rust_2018_idioms)] + = note: `#[warn(unused_extern_crates)]` implied by `#[warn(rust_2018_idioms)]` warning: unused extern crate --> $DIR/removing-extern-crate.rs:10:1 diff --git a/src/test/ui/rfc1445/match-forbidden-without-eq.stderr b/src/test/ui/rfc1445/match-forbidden-without-eq.stderr index 4ec1e8ddb9533..c05bb8f19f362 100644 --- a/src/test/ui/rfc1445/match-forbidden-without-eq.stderr +++ b/src/test/ui/rfc1445/match-forbidden-without-eq.stderr @@ -10,7 +10,7 @@ warning: floating-point types cannot be used in patterns LL | f32::INFINITY => { } | ^^^^^^^^^^^^^ | - = note: #[warn(illegal_floating_point_literal_pattern)] on by default + = note: `#[warn(illegal_floating_point_literal_pattern)]` on by default = 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 #41620 diff --git a/src/test/ui/rust-2018/async-ident-allowed.stderr b/src/test/ui/rust-2018/async-ident-allowed.stderr index d3e450e9be0b5..2394bff11816d 100644 --- a/src/test/ui/rust-2018/async-ident-allowed.stderr +++ b/src/test/ui/rust-2018/async-ident-allowed.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![deny(rust_2018_compatibility)] | ^^^^^^^^^^^^^^^^^^^^^^^ - = note: #[deny(keyword_idents)] implied by #[deny(rust_2018_compatibility)] + = note: `#[deny(keyword_idents)]` implied by `#[deny(rust_2018_compatibility)]` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr index 13980c70a82aa..12a6110bfb406 100644 --- a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr +++ b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![deny(rust_2018_idioms)] | ^^^^^^^^^^^^^^^^ - = note: #[deny(unused_extern_crates)] implied by #[deny(rust_2018_idioms)] + = note: `#[deny(unused_extern_crates)]` implied by `#[deny(rust_2018_idioms)]` error: aborting due to previous error diff --git a/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr b/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr index 49aaff620d66f..957a04cd9804a 100644 --- a/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr +++ b/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr @@ -12,7 +12,7 @@ note: lint level defined here | LL | #![deny(rust_2018_idioms)] | ^^^^^^^^^^^^^^^^ - = note: #[deny(unused_extern_crates)] implied by #[deny(rust_2018_idioms)] + = note: `#[deny(unused_extern_crates)]` implied by `#[deny(rust_2018_idioms)]` error: aborting due to previous error diff --git a/src/test/ui/rust-2018/macro-use-warned-against.stderr b/src/test/ui/rust-2018/macro-use-warned-against.stderr index c3e459606e107..944b56e9577b6 100644 --- a/src/test/ui/rust-2018/macro-use-warned-against.stderr +++ b/src/test/ui/rust-2018/macro-use-warned-against.stderr @@ -21,5 +21,5 @@ note: lint level defined here | LL | #![warn(macro_use_extern_crate, unused)] | ^^^^^^ - = note: #[warn(unused_imports)] implied by #[warn(unused)] + = note: `#[warn(unused_imports)]` implied by `#[warn(unused)]` diff --git a/src/test/ui/rust-2018/remove-extern-crate.stderr b/src/test/ui/rust-2018/remove-extern-crate.stderr index 5de0dfe961338..4777565452a31 100644 --- a/src/test/ui/rust-2018/remove-extern-crate.stderr +++ b/src/test/ui/rust-2018/remove-extern-crate.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![warn(rust_2018_idioms)] | ^^^^^^^^^^^^^^^^ - = note: #[warn(unused_extern_crates)] implied by #[warn(rust_2018_idioms)] + = note: `#[warn(unused_extern_crates)]` implied by `#[warn(rust_2018_idioms)]` warning: `extern crate` is not idiomatic in the new edition --> $DIR/remove-extern-crate.rs:32:5 diff --git a/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr b/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr index 19e87b664cc9e..5add50e87f787 100644 --- a/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr +++ b/src/test/ui/rust-2018/suggestions-not-always-applicable.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![warn(rust_2018_compatibility)] | ^^^^^^^^^^^^^^^^^^^^^^^ - = note: #[warn(absolute_paths_not_starting_with_crate)] implied by #[warn(rust_2018_compatibility)] + = note: `#[warn(absolute_paths_not_starting_with_crate)]` implied by `#[warn(rust_2018_compatibility)]` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #53130 diff --git a/src/test/ui/rust-2018/try-ident.stderr b/src/test/ui/rust-2018/try-ident.stderr index 9494603589947..852e3e5aed64b 100644 --- a/src/test/ui/rust-2018/try-ident.stderr +++ b/src/test/ui/rust-2018/try-ident.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![warn(rust_2018_compatibility)] | ^^^^^^^^^^^^^^^^^^^^^^^ - = note: #[warn(keyword_idents)] implied by #[warn(rust_2018_compatibility)] + = note: `#[warn(keyword_idents)]` implied by `#[warn(rust_2018_compatibility)]` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 diff --git a/src/test/ui/rust-2018/try-macro.stderr b/src/test/ui/rust-2018/try-macro.stderr index 40a4564cc3d6d..eb65d4150642a 100644 --- a/src/test/ui/rust-2018/try-macro.stderr +++ b/src/test/ui/rust-2018/try-macro.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![warn(rust_2018_compatibility)] | ^^^^^^^^^^^^^^^^^^^^^^^ - = note: #[warn(keyword_idents)] implied by #[warn(rust_2018_compatibility)] + = note: `#[warn(keyword_idents)]` implied by `#[warn(rust_2018_compatibility)]` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! = note: for more information, see issue #49716 diff --git a/src/test/ui/safe-extern-statics.stderr b/src/test/ui/safe-extern-statics.stderr index 86976a2c932d1..0948fad74e50e 100644 --- a/src/test/ui/safe-extern-statics.stderr +++ b/src/test/ui/safe-extern-statics.stderr @@ -4,7 +4,7 @@ error: use of extern static is unsafe and requires unsafe function or block (err LL | let a = A; | ^ | - = note: #[deny(safe_extern_statics)] on by default + = note: `#[deny(safe_extern_statics)]` on by default = 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 #36247 = note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior diff --git a/src/test/ui/span/issue-24690.stderr b/src/test/ui/span/issue-24690.stderr index 0864497911d30..b2160e66a74d4 100644 --- a/src/test/ui/span/issue-24690.stderr +++ b/src/test/ui/span/issue-24690.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![warn(unused)] | ^^^^^^ - = note: #[warn(unused_variables)] implied by #[warn(unused)] + = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]` warning: variable `theTwo` should have a snake case name --> $DIR/issue-24690.rs:12:9 @@ -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)]` on by default warning: variable `theOtherTwo` should have a snake case name --> $DIR/issue-24690.rs:13:9 diff --git a/src/test/ui/span/macro-span-replacement.stderr b/src/test/ui/span/macro-span-replacement.stderr index 128e4ec1212ca..8b65e798b6ef5 100644 --- a/src/test/ui/span/macro-span-replacement.stderr +++ b/src/test/ui/span/macro-span-replacement.stderr @@ -12,5 +12,5 @@ note: lint level defined here | LL | #![warn(unused)] | ^^^^^^ - = note: #[warn(dead_code)] implied by #[warn(unused)] + = note: `#[warn(dead_code)]` implied by `#[warn(unused)]` diff --git a/src/test/ui/span/multispan-import-lint.stderr b/src/test/ui/span/multispan-import-lint.stderr index a730d081b7c03..a54c86cdb0fdf 100644 --- a/src/test/ui/span/multispan-import-lint.stderr +++ b/src/test/ui/span/multispan-import-lint.stderr @@ -9,5 +9,5 @@ note: lint level defined here | LL | #![warn(unused)] | ^^^^^^ - = note: #[warn(unused_imports)] implied by #[warn(unused)] + = note: `#[warn(unused_imports)]` implied by `#[warn(unused)]` diff --git a/src/test/ui/span/unused-warning-point-at-signature.stderr b/src/test/ui/span/unused-warning-point-at-signature.stderr index 3007d90c99006..83e2ec1987b47 100644 --- a/src/test/ui/span/unused-warning-point-at-signature.stderr +++ b/src/test/ui/span/unused-warning-point-at-signature.stderr @@ -9,7 +9,7 @@ note: lint level defined here | LL | #![warn(unused)] | ^^^^^^ - = note: #[warn(dead_code)] implied by #[warn(unused)] + = note: `#[warn(dead_code)]` implied by `#[warn(unused)]` warning: struct is never constructed: `Struct` --> $DIR/unused-warning-point-at-signature.rs:12:1 diff --git a/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr b/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr index 250ea4b1c3201..f64e637425d05 100644 --- a/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr +++ b/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr @@ -4,7 +4,7 @@ warning: trait objects without an explicit `dyn` are deprecated LL | fn foo(_x: Foo + Send) { | ^^^^^^^^^^ help: use `dyn`: `dyn Foo + Send` | - = note: #[warn(bare_trait_objects)] on by default + = note: `#[warn(bare_trait_objects)]` on by default error[E0277]: the size for values of type `(dyn Foo + std::marker::Send + 'static)` cannot be known at compilation time --> $DIR/trait-bounds-not-on-bare-trait.rs:7:8 diff --git a/src/test/ui/transmute/transmute-imut-to-mut.stderr b/src/test/ui/transmute/transmute-imut-to-mut.stderr index d2445f0c7f3ff..d323c1a73b772 100644 --- a/src/test/ui/transmute/transmute-imut-to-mut.stderr +++ b/src/test/ui/transmute/transmute-imut-to-mut.stderr @@ -4,7 +4,7 @@ error: mutating transmuted &mut T from &T may cause undefined behavior, consider LL | let _a: &mut u8 = unsafe { transmute(&1u8) }; | ^^^^^^^^^ | - = note: #[deny(mutable_transmutes)] on by default + = note: `#[deny(mutable_transmutes)]` on by default error: aborting due to previous error diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr index 12d61fc42a3f4..af0bad80690f3 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr @@ -4,7 +4,7 @@ warning: Trait bound std::string::String: std::marker::Copy does not depend on a LL | fn copy_string(t: String) -> String where String: Copy { | ^^^^ | - = note: #[warn(trivial_bounds)] on by default + = note: `#[warn(trivial_bounds)]` on by default warning: Trait bound std::string::String: std::marker::Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-copy.rs:13:56 diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection.stderr index 561614dc52892..f2aa482f6dee4 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection.stderr @@ -4,7 +4,7 @@ warning: Trait bound B: A does not depend on any type or lifetime parameters LL | B: A | ^ | - = note: #[warn(trivial_bounds)] on by default + = note: `#[warn(trivial_bounds)]` on by default warning: Trait bound B: A does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-projection.rs:28:8 diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr index fda1d6d70ac58..a80ebc173f037 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr @@ -4,7 +4,7 @@ warning: Trait bound str: std::marker::Sized does not depend on any type or life LL | struct S(str, str) where str: Sized; | ^^^^^ | - = note: #[warn(trivial_bounds)] on by default + = note: `#[warn(trivial_bounds)]` on by default warning: Trait bound for<'a> T<(dyn A + 'a)>: std::marker::Sized does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-sized.rs:16:49 diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.stderr index a72e3f75cf6a5..fdc3ff1d3b59b 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.stderr @@ -4,7 +4,7 @@ warning: Trait bound std::vec::Vec: std::fmt::Debug does not depend on any LL | pub fn foo() where Vec: Debug, str: Copy { | ^^^^^ | - = note: #[warn(trivial_bounds)] on by default + = note: `#[warn(trivial_bounds)]` on by default warning: Trait bound str: std::marker::Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-well-formed.rs:7:42 diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr index a0d638f17147e..0eb0769c57071 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr @@ -4,7 +4,7 @@ warning: Trait bound i32: Foo does not depend on any type or lifetime parameters LL | enum E where i32: Foo { V } | ^^^ | - = note: #[warn(trivial_bounds)] on by default + = note: `#[warn(trivial_bounds)]` on by default warning: Trait bound i32: Foo does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:16:21 @@ -30,7 +30,7 @@ warning: where clauses are not enforced in type aliases LL | type Y where i32: Foo = (); | ^^^^^^^^ | - = note: #[warn(type_alias_bounds)] on by default + = note: `#[warn(type_alias_bounds)]` on by default = help: the clause will not be checked when the type alias is used, and should be removed warning: Trait bound i32: Foo does not depend on any type or lifetime parameters diff --git a/src/test/ui/type-alias-enum-variants/enum-variant-priority-lint-ambiguous_associated_items.stderr b/src/test/ui/type-alias-enum-variants/enum-variant-priority-lint-ambiguous_associated_items.stderr index ef025e0e1467f..db8767273b423 100644 --- a/src/test/ui/type-alias-enum-variants/enum-variant-priority-lint-ambiguous_associated_items.stderr +++ b/src/test/ui/type-alias-enum-variants/enum-variant-priority-lint-ambiguous_associated_items.stderr @@ -4,7 +4,7 @@ error: ambiguous associated item LL | fn f() -> Self::V { 0 } | ^^^^^^^ help: use fully-qualified syntax: `::V` | - = note: #[deny(ambiguous_associated_items)] on by default + = note: `#[deny(ambiguous_associated_items)]` on by default = 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 #57644 note: `V` could refer to variant defined here diff --git a/src/test/ui/type/type-alias-bounds.stderr b/src/test/ui/type/type-alias-bounds.stderr index 177e5f893ed66..dbb7b92563ab8 100644 --- a/src/test/ui/type/type-alias-bounds.stderr +++ b/src/test/ui/type/type-alias-bounds.stderr @@ -4,7 +4,7 @@ warning: bounds on generic parameters are not enforced in type aliases LL | type SVec = Vec; | ^^^^ ^^^^ | - = note: #[warn(type_alias_bounds)] on by default + = note: `#[warn(type_alias_bounds)]` on by default = help: the bound will not be checked when the type alias is used, and should be removed warning: where clauses are not enforced in type aliases diff --git a/src/test/ui/utf8_idents.stderr b/src/test/ui/utf8_idents.stderr index df9910f191cd4..56de63da4f979 100644 --- a/src/test/ui/utf8_idents.stderr +++ b/src/test/ui/utf8_idents.stderr @@ -40,7 +40,7 @@ warning: type parameter `γ` should have an upper camel case name LL | γ | ^ help: convert the identifier to upper camel case: `Γ` | - = note: #[warn(non_camel_case_types)] on by default + = note: `#[warn(non_camel_case_types)]` on by default error: aborting due to 4 previous errors diff --git a/src/test/ui/while-let.stderr b/src/test/ui/while-let.stderr index 156d0e6c33d83..348925aa9702c 100644 --- a/src/test/ui/while-let.stderr +++ b/src/test/ui/while-let.stderr @@ -9,7 +9,7 @@ LL | | println!("irrefutable pattern"); LL | | }); | |_______- in this macro invocation | - = note: #[warn(irrefutable_let_patterns)] on by default + = note: `#[warn(irrefutable_let_patterns)]` on by default warning: irrefutable while-let pattern --> $DIR/while-let.rs:6:13 From 60529a72deb03c1d7711f00b8b147f9c506bc298 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Wed, 17 Jul 2019 20:26:59 -0500 Subject: [PATCH 19/21] Disable simd_select_bitmask test on big endian Per #59356 it is expected that the interpretation of the bitmask depends on target endianness. Closes #59356 --- src/test/run-pass/simd/simd-intrinsic-generic-select.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/run-pass/simd/simd-intrinsic-generic-select.rs b/src/test/run-pass/simd/simd-intrinsic-generic-select.rs index f79b140494e7a..22bda4fc9d919 100644 --- a/src/test/run-pass/simd/simd-intrinsic-generic-select.rs +++ b/src/test/run-pass/simd/simd-intrinsic-generic-select.rs @@ -2,6 +2,10 @@ #![allow(non_camel_case_types)] // ignore-emscripten +// ignore-mips behavior of simd_select_bitmask is endian-specific +// ignore-mips64 behavior of simd_select_bitmask is endian-specific +// ignore-powerpc behavior of simd_select_bitmask is endian-specific +// ignore-powerpc64 behavior of simd_select_bitmask is endian-specific // Test that the simd_select intrinsics produces correct results. From c56c5a861a83cd72ceda6590194506daa91fad33 Mon Sep 17 00:00:00 2001 From: Giles Cope Date: Thu, 18 Jul 2019 07:30:51 +0100 Subject: [PATCH 20/21] Self-referencial type renamed to recursive type. --- src/librustc_typeck/check/mod.rs | 2 +- .../recursive-async-impl-trait-type.stderr | 2 +- .../infinite-impl-trait-issue-38064.stderr | 4 +-- .../recursive-impl-trait-type.stderr | 28 +++++++++---------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index d578a894add2d..ededcf9f83ffe 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -1320,7 +1320,7 @@ fn check_opaque<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, substs: SubstsRef<'tcx>, tcx.sess, span, E0720, "opaque type expands to a recursive type", ); - err.span_label(span, "expands to self-referential type"); + err.span_label(span, "expands to a recursive type"); if let ty::Opaque(..) = partially_expanded_type.sty { err.note("type resolves to itself"); } else { diff --git a/src/test/ui/async-await/recursive-async-impl-trait-type.stderr b/src/test/ui/async-await/recursive-async-impl-trait-type.stderr index abc9ff54bdee8..69914b6a7910f 100644 --- a/src/test/ui/async-await/recursive-async-impl-trait-type.stderr +++ b/src/test/ui/async-await/recursive-async-impl-trait-type.stderr @@ -2,7 +2,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-async-impl-trait-type.rs:7:40 | LL | async fn recursive_async_function() -> () { - | ^^ expands to self-referential type + | ^^ expands to a recursive type | = note: expanded type is `std::future::GenFuture<[static generator@$DIR/recursive-async-impl-trait-type.rs:7:43: 9:2 {impl std::future::Future, ()}]>` diff --git a/src/test/ui/impl-trait/issues/infinite-impl-trait-issue-38064.stderr b/src/test/ui/impl-trait/issues/infinite-impl-trait-issue-38064.stderr index fb48ecd12b6d1..d10001e8a8e53 100644 --- a/src/test/ui/impl-trait/issues/infinite-impl-trait-issue-38064.stderr +++ b/src/test/ui/impl-trait/issues/infinite-impl-trait-issue-38064.stderr @@ -2,7 +2,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/infinite-impl-trait-issue-38064.rs:8:13 | LL | fn foo() -> impl Quux { - | ^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^ expands to a recursive type | = note: expanded type is `foo::Foo>` @@ -10,7 +10,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/infinite-impl-trait-issue-38064.rs:14:13 | LL | fn bar() -> impl Quux { - | ^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^ expands to a recursive type | = note: expanded type is `bar::Bar>` diff --git a/src/test/ui/impl-trait/recursive-impl-trait-type.stderr b/src/test/ui/impl-trait/recursive-impl-trait-type.stderr index fce234eb87ced..324607117dc50 100644 --- a/src/test/ui/impl-trait/recursive-impl-trait-type.stderr +++ b/src/test/ui/impl-trait/recursive-impl-trait-type.stderr @@ -2,7 +2,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:6:22 | LL | fn option(i: i32) -> impl Sized { - | ^^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^^ expands to a recursive type | = note: expanded type is `std::option::Option<(impl Sized, i32)>` @@ -10,7 +10,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:14:15 | LL | fn tuple() -> impl Sized { - | ^^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^^ expands to a recursive type | = note: expanded type is `(impl Sized,)` @@ -18,7 +18,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:18:15 | LL | fn array() -> impl Sized { - | ^^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^^ expands to a recursive type | = note: expanded type is `[impl Sized; 1]` @@ -26,7 +26,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:22:13 | LL | fn ptr() -> impl Sized { - | ^^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^^ expands to a recursive type | = note: expanded type is `*const impl Sized` @@ -34,7 +34,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:26:16 | LL | fn fn_ptr() -> impl Sized { - | ^^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^^ expands to a recursive type | = note: expanded type is `fn() -> impl Sized` @@ -42,7 +42,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:30:25 | LL | fn closure_capture() -> impl Sized { - | ^^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^^ expands to a recursive type | = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:32:5: 32:19 x:impl Sized]` @@ -50,7 +50,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:35:29 | LL | fn closure_ref_capture() -> impl Sized { - | ^^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^^ expands to a recursive type | = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:37:5: 37:20 x:impl Sized]` @@ -58,7 +58,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:40:21 | LL | fn closure_sig() -> impl Sized { - | ^^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^^ expands to a recursive type | = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:41:5: 41:21]` @@ -66,7 +66,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:44:23 | LL | fn generator_sig() -> impl Sized { - | ^^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^^ expands to a recursive type | = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:45:5: 45:23]` @@ -74,7 +74,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:48:27 | LL | fn generator_capture() -> impl Sized { - | ^^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^^ expands to a recursive type | = note: expanded type is `[generator@$DIR/recursive-impl-trait-type.rs:50:5: 50:26 x:impl Sized {()}]` @@ -82,7 +82,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:53:26 | LL | fn substs_change() -> impl Sized { - | ^^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^^ expands to a recursive type | = note: expanded type is `(impl Sized,)` @@ -90,7 +90,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:57:24 | LL | fn generator_hold() -> impl Sized { - | ^^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^^ expands to a recursive type | = note: expanded type is `[generator@$DIR/recursive-impl-trait-type.rs:58:5: 62:6 {impl Sized, ()}]` @@ -98,7 +98,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:69:26 | LL | fn mutual_recursion() -> impl Sync { - | ^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^ expands to a recursive type | = note: type resolves to itself @@ -106,7 +106,7 @@ error[E0720]: opaque type expands to a recursive type --> $DIR/recursive-impl-trait-type.rs:73:28 | LL | fn mutual_recursion_b() -> impl Sized { - | ^^^^^^^^^^ expands to self-referential type + | ^^^^^^^^^^ expands to a recursive type | = note: type resolves to itself From f7d53a96ca9e74f00355951c03384184464ebbc2 Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Thu, 18 Jul 2019 01:02:22 -0700 Subject: [PATCH 21/21] Emit artifact notifications for dependency files --- src/librustc_interface/passes.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs index bb58d13498996..bb11657d0c40c 100644 --- a/src/librustc_interface/passes.rs +++ b/src/librustc_interface/passes.rs @@ -688,12 +688,20 @@ fn write_out_deps(sess: &Session, outputs: &OutputFilenames, out_filenames: &[Pa Ok(()) })(); - if let Err(e) = result { - sess.fatal(&format!( - "error writing dependencies to `{}`: {}", - deps_filename.display(), - e - )); + match result { + Ok(_) => { + if sess.opts.debugging_opts.emit_artifact_notifications { + sess.parse_sess.span_diagnostic + .emit_artifact_notification(&deps_filename, "dep-info"); + } + }, + Err(e) => { + sess.fatal(&format!( + "error writing dependencies to `{}`: {}", + deps_filename.display(), + e + )) + } } }