about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Hartwig <florian.j.hartwig@gmail.com>2015-11-26 11:59:41 +0100
committerFlorian Hartwig <florian.j.hartwig@gmail.com>2015-11-26 11:59:41 +0100
commit9ba657cad5f0fdeebfc3637f2cbc31af24e944f7 (patch)
tree3a72dd1eb2ce1efa8bb2f072ae2ad6345ed858ac
parentac0220cf4c1c31ee74fccee0cd546b8ec4d29edf (diff)
downloadrust-9ba657cad5f0fdeebfc3637f2cbc31af24e944f7.tar.gz
rust-9ba657cad5f0fdeebfc3637f2cbc31af24e944f7.zip
Add '!' to macro name suggestion, use fileline_help instead of span_help
-rw-r--r--src/libsyntax/ext/base.rs2
-rw-r--r--src/test/compile-fail/macro-name-typo.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs
index 7db9dd9fbee..09c98c3e547 100644
--- a/src/libsyntax/ext/base.rs
+++ b/src/libsyntax/ext/base.rs
@@ -790,7 +790,7 @@ impl<'a> ExtCtxt<'a> {
             }
         }
         if let Some((suggestion, _)) = min {
-            self.span_help(span, &format!("did you mean `{}`?", suggestion));
+            self.fileline_help(span, &format!("did you mean `{}!`?", suggestion));
         }
     }
 }
diff --git a/src/test/compile-fail/macro-name-typo.rs b/src/test/compile-fail/macro-name-typo.rs
index 0274afe2995..e1f7d9b65d1 100644
--- a/src/test/compile-fail/macro-name-typo.rs
+++ b/src/test/compile-fail/macro-name-typo.rs
@@ -10,5 +10,5 @@
 
 fn main() {
     printlx!("oh noes!"); //~ ERROR macro undefined
-    //~^ HELP did you mean `println`?
+    //~^ HELP did you mean `println!`?
 }