about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2021-08-22 18:15:07 +0200
committerMara Bos <m-ou.se@m-ou.se>2021-08-23 16:57:59 +0200
commit4e22bf47d0fb496dea79ec436ad8f5f6fef2418c (patch)
treeb4e20041046064e617579e56d9e776d8506c8d9e /compiler/rustc_resolve/src
parenta13c66e0a522957591b04237ccc72b411671fc9c (diff)
downloadrust-4e22bf47d0fb496dea79ec436ad8f5f6fef2418c.tar.gz
rust-4e22bf47d0fb496dea79ec436ad8f5f6fef2418c.zip
Show what things are, but also what they are not.
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/diagnostics.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs
index 7b3da373fc9..a6e26d06bb1 100644
--- a/compiler/rustc_resolve/src/diagnostics.rs
+++ b/compiler/rustc_resolve/src/diagnostics.rs
@@ -978,7 +978,13 @@ impl<'a> Resolver<'a> {
                     Some(MacroKind::Derive) => format!("a derive macro: `#[derive({})]`", ident),
                     // Don't confuse the user with tool modules.
                     None if res == Res::ToolMod => continue,
-                    None => format!("{} {}", res.article(), res.descr()),
+                    None => format!(
+                        "{} {}, not {} {}",
+                        res.article(),
+                        res.descr(),
+                        macro_kind.article(),
+                        macro_kind.descr_expected(),
+                    ),
                 };
                 if let crate::NameBindingKind::Import { import, .. } = binding.kind {
                     if !import.span.is_dummy() {