We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df72e47 commit 12ae282Copy full SHA for 12ae282
compiler/rustc_resolve/src/errors.rs
@@ -1089,8 +1089,8 @@ pub(crate) struct ToolWasAlreadyRegistered {
1089
#[derive(Diagnostic)]
1090
#[diag(resolve_tool_only_accepts_identifiers)]
1091
pub(crate) struct ToolOnlyAcceptsIdentifiers {
1092
- #[label]
1093
#[primary_span]
+ #[label]
1094
pub(crate) span: Span,
1095
pub(crate) tool: Symbol,
1096
}
tests/ui/tool-attributes/invalid-tool.rs
@@ -0,0 +1,6 @@
1
+#![feature(register_tool)]
2
+
3
+#![register_tool(1)]
4
+//~^ ERROR `register_tool` only accepts identifiers
5
6
+fn main() {}
tests/ui/tool-attributes/invalid-tool.stderr
@@ -0,0 +1,8 @@
+error: `register_tool` only accepts identifiers
+ --> $DIR/invalid-tool.rs:3:18
+ |
+LL | #![register_tool(1)]
+ | ^ not an identifier
7
+error: aborting due to 1 previous error
8
0 commit comments