From 3323f1e57d64e98da05dcc90b56e0f2cde89653e Mon Sep 17 00:00:00 2001 From: mental Date: Thu, 2 Jan 2020 08:38:59 +0200 Subject: [PATCH] Update src/test/ui --- .../ui/dollar-crate/dollar-crate-is-keyword.rs | 4 +--- .../dollar-crate/dollar-crate-is-keyword.stderr | 16 ++++++---------- src/test/ui/imports/import-crate-var.rs | 3 +-- src/test/ui/imports/import-crate-var.stderr | 3 +-- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/test/ui/dollar-crate/dollar-crate-is-keyword.rs b/src/test/ui/dollar-crate/dollar-crate-is-keyword.rs index 6deaeb811795..318c4c3974bb 100644 --- a/src/test/ui/dollar-crate/dollar-crate-is-keyword.rs +++ b/src/test/ui/dollar-crate/dollar-crate-is-keyword.rs @@ -6,10 +6,8 @@ macro_rules! m { struct $crate {} //~ ERROR expected identifier, found reserved identifier `$crate` } - use $crate; // OK - //~^ WARN `$crate` may not be imported + use $crate; // ERROR `$crate` may not be imported use $crate as $crate; //~ ERROR expected identifier, found reserved identifier `$crate` - //~^ WARN `$crate` may not be imported } } diff --git a/src/test/ui/dollar-crate/dollar-crate-is-keyword.stderr b/src/test/ui/dollar-crate/dollar-crate-is-keyword.stderr index 5d4f39086cee..6f3cf9a55c74 100644 --- a/src/test/ui/dollar-crate/dollar-crate-is-keyword.stderr +++ b/src/test/ui/dollar-crate/dollar-crate-is-keyword.stderr @@ -8,7 +8,7 @@ LL | m!(); | ----- in this macro invocation error: expected identifier, found reserved identifier `$crate` - --> $DIR/dollar-crate-is-keyword.rs:11:23 + --> $DIR/dollar-crate-is-keyword.rs:10:23 | LL | use $crate as $crate; | ^^^^^^ expected identifier, found reserved identifier @@ -16,27 +16,23 @@ LL | use $crate as $crate; LL | m!(); | ----- in this macro invocation -warning: `$crate` may not be imported +error: `$crate` may not be imported --> $DIR/dollar-crate-is-keyword.rs:9:9 | -LL | use $crate; // OK +LL | use $crate; // ERROR `$crate` may not be imported | ^^^^^^^^^^^ ... LL | m!(); | ----- in this macro invocation - | - = note: `use $crate;` was erroneously allowed and will become a hard error in a future release -warning: `$crate` may not be imported - --> $DIR/dollar-crate-is-keyword.rs:11:9 +error: `$crate` may not be imported + --> $DIR/dollar-crate-is-keyword.rs:10:9 | LL | use $crate as $crate; | ^^^^^^^^^^^^^^^^^^^^^ ... LL | m!(); | ----- in this macro invocation - | - = note: `use $crate;` was erroneously allowed and will become a hard error in a future release -error: aborting due to 2 previous errors +error: aborting due to 4 previous errors diff --git a/src/test/ui/imports/import-crate-var.rs b/src/test/ui/imports/import-crate-var.rs index b9d146d3735f..ad1c34844619 100644 --- a/src/test/ui/imports/import-crate-var.rs +++ b/src/test/ui/imports/import-crate-var.rs @@ -5,6 +5,5 @@ fn main() { m!(); - //~^ WARN `$crate` may not be imported - //~| NOTE `use $crate;` was erroneously allowed and will become a hard error + //~^ ERROR `$crate` may not be imported } diff --git a/src/test/ui/imports/import-crate-var.stderr b/src/test/ui/imports/import-crate-var.stderr index 2f8c845156a8..98f113fb4559 100644 --- a/src/test/ui/imports/import-crate-var.stderr +++ b/src/test/ui/imports/import-crate-var.stderr @@ -1,9 +1,8 @@ -warning: `$crate` may not be imported +error: `$crate` may not be imported --> $DIR/import-crate-var.rs:7:5 | LL | m!(); | ^^^^^ | - = note: `use $crate;` was erroneously allowed and will become a hard error in a future release = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)