Skip to content

Commit 886482f

Browse files
committed
Fix outdated lint warning about inner attribute
It suggested adding a semicolon instead of the new syntax using an exclamation mark.
1 parent 8801d89 commit 886482f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/middle/lint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ fn check_attrs_usage(cx: &Context, attrs: &[ast::Attribute]) {
10631063
if name.equiv(crate_attr) {
10641064
let msg = match attr.node.style {
10651065
ast::AttrOuter => "crate-level attribute should be an inner attribute: \
1066-
add semicolon at end",
1066+
add an exclamation mark: #![foo]",
10671067
ast::AttrInner => "crate-level attribute should be in the root module",
10681068
};
10691069
cx.span_lint(AttributeUsage, attr.span, msg);

0 commit comments

Comments
 (0)