about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-02-28 11:38:40 +0000
committerbors <bors@rust-lang.org>2019-02-28 11:38:40 +0000
commit190feb65290d39d7ab6d44e994bd99188d339f16 (patch)
tree0dc440124b61d17495c4b8e4e680b38cd7b0fa13 /src/test
parent7e001e5c6c7c090b41416a57d4be412ed3ccd937 (diff)
parentaad9e29f52988c55cd8cee2bd181a2e3c9d436a4 (diff)
downloadrust-190feb65290d39d7ab6d44e994bd99188d339f16.tar.gz
rust-190feb65290d39d7ab6d44e994bd99188d339f16.zip
Auto merge of #58208 - taiki-e:libstd-2018, r=Centril
libstd => 2018

Transitions `libstd` to Rust 2018; cc #58099

r? @Centril
Diffstat (limited to 'src/test')
-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.rs3
-rw-r--r--src/test/ui/tag-that-dare-not-speak-its-name.stderr2
4 files changed, 13 insertions, 5 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..9f47b2e9b9f 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
@@ -1,10 +1,9 @@
 // Issue #876
 
-#![no_implicit_prelude]
 use std::vec::Vec;
 
 fn last<T>(v: Vec<&T> ) -> std::option::Option<T> {
-    panic!();
+    ::std::panic!();
 }
 
 fn main() {
diff --git a/src/test/ui/tag-that-dare-not-speak-its-name.stderr b/src/test/ui/tag-that-dare-not-speak-its-name.stderr
index a0d6b0007d7..23e3d665262 100644
--- a/src/test/ui/tag-that-dare-not-speak-its-name.stderr
+++ b/src/test/ui/tag-that-dare-not-speak-its-name.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/tag-that-dare-not-speak-its-name.rs:12:20
+  --> $DIR/tag-that-dare-not-speak-its-name.rs:11:20
    |
 LL |     let x : char = last(y);
    |                    ^^^^^^^ expected char, found enum `std::option::Option`