From 21725774a228771862f5b8b1c971eb77d54ec261 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Tue, 17 Jan 2023 03:09:49 +0000 Subject: [PATCH] note -> help --- compiler/rustc_resolve/src/diagnostics.rs | 2 +- tests/ui/empty/empty-macro-use.stderr | 2 +- tests/ui/hygiene/globs.stderr | 4 ++-- .../hygiene/no_implicit_prelude-2018.stderr | 2 +- tests/ui/imports/bad-import-in-nested.stderr | 6 +++--- tests/ui/macros/issue-88228.rs | 4 ++-- tests/ui/macros/issue-88228.stderr | 4 ++-- tests/ui/macros/macro-use-wrong-name.stderr | 2 +- tests/ui/missing/missing-macro-use.stderr | 2 +- .../proc-macro/derive-helper-shadowing.stderr | 4 ++-- tests/ui/proc-macro/generate-mod.stderr | 20 +++++++++---------- 11 files changed, 26 insertions(+), 26 deletions(-) diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index 9277829f2fa..f24e405018b 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -2465,7 +2465,7 @@ fn show_candidates( msg.push_str(&candidate.0); } - err.note(&msg); + err.help(&msg); } } else if !matches!(mode, DiagnosticMode::Import) { assert!(!inaccessible_path_strings.is_empty()); diff --git a/tests/ui/empty/empty-macro-use.stderr b/tests/ui/empty/empty-macro-use.stderr index 700f6616af4..e0b3b8685d6 100644 --- a/tests/ui/empty/empty-macro-use.stderr +++ b/tests/ui/empty/empty-macro-use.stderr @@ -4,7 +4,7 @@ error: cannot find macro `macro_two` in this scope LL | macro_two!(); | ^^^^^^^^^ | - = note: consider importing this macro: + = help: consider importing this macro: two_macros::macro_two error: aborting due to previous error diff --git a/tests/ui/hygiene/globs.stderr b/tests/ui/hygiene/globs.stderr index 1f2a96a4c41..c01901be5fe 100644 --- a/tests/ui/hygiene/globs.stderr +++ b/tests/ui/hygiene/globs.stderr @@ -51,7 +51,7 @@ LL | n!(f); LL | n!(f); | ^ not found in this scope | - = note: consider importing this function: + = help: consider importing this function: foo::f = note: this error originates in the macro `n` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -64,7 +64,7 @@ LL | n!(f); LL | f | ^ not found in this scope | - = note: consider importing this function: + = help: consider importing this function: foo::f = note: this error originates in the macro `n` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/hygiene/no_implicit_prelude-2018.stderr b/tests/ui/hygiene/no_implicit_prelude-2018.stderr index 02ddc391f6e..3f31b041b62 100644 --- a/tests/ui/hygiene/no_implicit_prelude-2018.stderr +++ b/tests/ui/hygiene/no_implicit_prelude-2018.stderr @@ -4,7 +4,7 @@ error: cannot find macro `print` in this scope LL | print!(); | ^^^^^ | - = note: consider importing this macro: + = help: consider importing this macro: std::print error: aborting due to previous error diff --git a/tests/ui/imports/bad-import-in-nested.stderr b/tests/ui/imports/bad-import-in-nested.stderr index 855b1e637e9..b6b1bc5fccf 100644 --- a/tests/ui/imports/bad-import-in-nested.stderr +++ b/tests/ui/imports/bad-import-in-nested.stderr @@ -4,7 +4,7 @@ error[E0432]: unresolved import `super::super::C::D::AA` LL | use super::{super::C::D::AA, AA as _}; | ^^^^^^^^^^^^^^^ no `AA` in `C::D` | - = note: consider importing this type alias instead: + = help: consider importing this type alias instead: crate::A::AA error[E0432]: unresolved import `crate::C::AA` @@ -13,7 +13,7 @@ error[E0432]: unresolved import `crate::C::AA` LL | use crate::C::{self, AA}; | ^^ no `AA` in `C` | - = note: consider importing this type alias instead: + = help: consider importing this type alias instead: crate::A::AA error[E0432]: unresolved import `crate::C::BB` @@ -22,7 +22,7 @@ error[E0432]: unresolved import `crate::C::BB` LL | use crate::{A, C::BB}; | ^^^^^ no `BB` in `C` | - = note: consider importing this type alias instead: + = help: consider importing this type alias instead: crate::A::BB error: aborting due to 3 previous errors diff --git a/tests/ui/macros/issue-88228.rs b/tests/ui/macros/issue-88228.rs index cbdef5f0d40..60ba2eab7a7 100644 --- a/tests/ui/macros/issue-88228.rs +++ b/tests/ui/macros/issue-88228.rs @@ -8,7 +8,7 @@ mod hey { #[derive(Bla)] //~^ ERROR cannot find derive macro `Bla` -//~| NOTE consider importing this derive macro +//~| HELP consider importing this derive macro struct A; #[derive(println)] @@ -19,5 +19,5 @@ struct B; fn main() { bla!(); //~^ ERROR cannot find macro `bla` - //~| NOTE consider importing this macro + //~| HELP consider importing this macro } diff --git a/tests/ui/macros/issue-88228.stderr b/tests/ui/macros/issue-88228.stderr index 62afa67a783..fe8a1deaedd 100644 --- a/tests/ui/macros/issue-88228.stderr +++ b/tests/ui/macros/issue-88228.stderr @@ -4,7 +4,7 @@ error: cannot find macro `bla` in this scope LL | bla!(); | ^^^ | - = note: consider importing this macro: + = help: consider importing this macro: crate::hey::bla error: cannot find derive macro `println` in this scope @@ -21,7 +21,7 @@ error: cannot find derive macro `Bla` in this scope LL | #[derive(Bla)] | ^^^ | - = note: consider importing this derive macro: + = help: consider importing this derive macro: crate::hey::Bla error: aborting due to 3 previous errors diff --git a/tests/ui/macros/macro-use-wrong-name.stderr b/tests/ui/macros/macro-use-wrong-name.stderr index 326001fc15a..ca5f0f190e8 100644 --- a/tests/ui/macros/macro-use-wrong-name.stderr +++ b/tests/ui/macros/macro-use-wrong-name.stderr @@ -9,7 +9,7 @@ LL | macro_two!(); LL | macro_rules! macro_one { () => ("one") } | ---------------------- similarly named macro `macro_one` defined here | - = note: consider importing this macro: + = help: consider importing this macro: two_macros::macro_two error: aborting due to previous error diff --git a/tests/ui/missing/missing-macro-use.stderr b/tests/ui/missing/missing-macro-use.stderr index ced062269df..99e291cda03 100644 --- a/tests/ui/missing/missing-macro-use.stderr +++ b/tests/ui/missing/missing-macro-use.stderr @@ -4,7 +4,7 @@ error: cannot find macro `macro_two` in this scope LL | macro_two!(); | ^^^^^^^^^ | - = note: consider importing this macro: + = help: consider importing this macro: two_macros::macro_two error: aborting due to previous error diff --git a/tests/ui/proc-macro/derive-helper-shadowing.stderr b/tests/ui/proc-macro/derive-helper-shadowing.stderr index 9c52ca42241..de2c27a878c 100644 --- a/tests/ui/proc-macro/derive-helper-shadowing.stderr +++ b/tests/ui/proc-macro/derive-helper-shadowing.stderr @@ -16,7 +16,7 @@ error: cannot find attribute `empty_helper` in this scope LL | #[derive(GenHelperUse)] | ^^^^^^^^^^^^ | - = note: consider importing this attribute macro: + = help: consider importing this attribute macro: empty_helper = note: this error originates in the derive macro `GenHelperUse` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -29,7 +29,7 @@ LL | #[empty_helper] LL | gen_helper_use!(); | ----------------- in this macro invocation | - = note: consider importing this attribute macro: + = help: consider importing this attribute macro: crate::empty_helper = note: this error originates in the macro `gen_helper_use` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/proc-macro/generate-mod.stderr b/tests/ui/proc-macro/generate-mod.stderr index 64042ca0ecd..2c55abf38c3 100644 --- a/tests/ui/proc-macro/generate-mod.stderr +++ b/tests/ui/proc-macro/generate-mod.stderr @@ -4,7 +4,7 @@ error[E0412]: cannot find type `FromOutside` in this scope LL | generate_mod::check!(); | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope | - = note: consider importing this struct: + = help: consider importing this struct: FromOutside = note: this error originates in the macro `generate_mod::check` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -14,7 +14,7 @@ error[E0412]: cannot find type `Outer` in this scope LL | generate_mod::check!(); | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope | - = note: consider importing this struct: + = help: consider importing this struct: Outer = note: this error originates in the macro `generate_mod::check` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -24,7 +24,7 @@ error[E0412]: cannot find type `FromOutside` in this scope LL | #[generate_mod::check_attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope | - = note: consider importing this struct: + = help: consider importing this struct: FromOutside = note: this error originates in the attribute macro `generate_mod::check_attr` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -34,7 +34,7 @@ error[E0412]: cannot find type `OuterAttr` in this scope LL | #[generate_mod::check_attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope | - = note: consider importing this struct: + = help: consider importing this struct: OuterAttr = note: this error originates in the attribute macro `generate_mod::check_attr` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -44,7 +44,7 @@ error[E0412]: cannot find type `FromOutside` in this scope LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope | - = note: consider importing this struct: + = help: consider importing this struct: FromOutside = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -54,7 +54,7 @@ error[E0412]: cannot find type `OuterDerive` in this scope LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope | - = note: consider importing this struct: + = help: consider importing this struct: OuterDerive = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -64,7 +64,7 @@ error[E0412]: cannot find type `FromOutside` in this scope LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope | - = note: consider importing this struct: + = help: consider importing this struct: FromOutside = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -74,7 +74,7 @@ error[E0412]: cannot find type `OuterDerive` in this scope LL | #[derive(generate_mod::CheckDerive)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope | - = note: consider importing this struct: + = help: consider importing this struct: OuterDerive = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -84,7 +84,7 @@ error[E0412]: cannot find type `FromOutside` in this scope LL | #[derive(generate_mod::CheckDeriveLint)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope | - = note: consider importing this struct: + = help: consider importing this struct: FromOutside = note: this error originates in the derive macro `generate_mod::CheckDeriveLint` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -94,7 +94,7 @@ error[E0412]: cannot find type `OuterDeriveLint` in this scope LL | #[derive(generate_mod::CheckDeriveLint)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope | - = note: consider importing this struct: + = help: consider importing this struct: OuterDeriveLint = note: this error originates in the derive macro `generate_mod::CheckDeriveLint` (in Nightly builds, run with -Z macro-backtrace for more info)