about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTaiki Endo <te316e89@gmail.com>2019-02-15 20:31:00 +0900
committerTaiki Endo <te316e89@gmail.com>2019-02-28 04:06:16 +0900
commit2af18a2b38d53dad24813e12ef0e468e5cc5d229 (patch)
tree376074f26a7e52c62689977c8825b178a518e493
parent2c783c3543f9582bb113253ab4d2277a4b27728f (diff)
downloadrust-2af18a2b38d53dad24813e12ef0e468e5cc5d229.tar.gz
rust-2af18a2b38d53dad24813e12ef0e468e5cc5d229.zip
Fix errors in test/ui
-rw-r--r--src/test/ui/hygiene/no_implicit_prelude.rs2
-rw-r--r--src/test/ui/hygiene/no_implicit_prelude.stderr11
-rw-r--r--src/test/ui/tag-that-dare-not-speak-its-name.rs2
3 files changed, 12 insertions, 3 deletions
diff --git a/src/test/ui/hygiene/no_implicit_prelude.rs b/src/test/ui/hygiene/no_implicit_prelude.rs
index 20da78f08dd..1cd05f4d44c 100644
--- a/src/test/ui/hygiene/no_implicit_prelude.rs
+++ b/src/test/ui/hygiene/no_implicit_prelude.rs
@@ -13,7 +13,7 @@ mod bar {
     }
     fn f() {
         ::foo::m!();
-        println!(); // OK on 2015 edition (at least for now)
+        println!(); //~ ERROR cannot find macro `print!` in this scope
     }
 }
 
diff --git a/src/test/ui/hygiene/no_implicit_prelude.stderr b/src/test/ui/hygiene/no_implicit_prelude.stderr
index 7c9404cee2b..b1de7700edb 100644
--- a/src/test/ui/hygiene/no_implicit_prelude.stderr
+++ b/src/test/ui/hygiene/no_implicit_prelude.stderr
@@ -7,6 +7,15 @@ LL |     fn f() { ::bar::m!(); }
 LL |         Vec::new(); //~ ERROR failed to resolve
    |         ^^^ use of undeclared type or module `Vec`
 
+error: cannot find macro `print!` in this scope
+  --> $DIR/no_implicit_prelude.rs:16:9
+   |
+LL |         println!(); //~ ERROR cannot find macro `print!` in this scope
+   |         ^^^^^^^^^^^
+   |
+   = help: have you added the `#[macro_use]` on the module/import?
+   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
+
 error[E0599]: no method named `clone` found for type `()` in the current scope
   --> $DIR/no_implicit_prelude.rs:12:12
    |
@@ -20,7 +29,7 @@ LL |         ().clone() //~ ERROR no method named `clone` found
    = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
            `use std::clone::Clone;`
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
 Some errors occurred: E0433, E0599.
 For more information about an error, try `rustc --explain E0433`.
diff --git a/src/test/ui/tag-that-dare-not-speak-its-name.rs b/src/test/ui/tag-that-dare-not-speak-its-name.rs
index 0a7f405746c..fc9df7a974e 100644
--- a/src/test/ui/tag-that-dare-not-speak-its-name.rs
+++ b/src/test/ui/tag-that-dare-not-speak-its-name.rs
@@ -4,7 +4,7 @@
 use std::vec::Vec;
 
 fn last<T>(v: Vec<&T> ) -> std::option::Option<T> {
-    panic!();
+    ::std::panic!();
 }
 
 fn main() {