Skip to content

Commit 9ba657c

Browse files
committed
Add '!' to macro name suggestion, use fileline_help instead of span_help
1 parent ac0220c commit 9ba657c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libsyntax/ext/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ impl<'a> ExtCtxt<'a> {
790790
}
791791
}
792792
if let Some((suggestion, _)) = min {
793-
self.span_help(span, &format!("did you mean `{}`?", suggestion));
793+
self.fileline_help(span, &format!("did you mean `{}!`?", suggestion));
794794
}
795795
}
796796
}

src/test/compile-fail/macro-name-typo.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010

1111
fn main() {
1212
printlx!("oh noes!"); //~ ERROR macro undefined
13-
//~^ HELP did you mean `println`?
13+
//~^ HELP did you mean `println!`?
1414
}

0 commit comments

Comments
 (0)