summaryrefslogtreecommitdiffstats
path: root/tests/ui/rust-2018
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/rust-2018')
-rw-r--r--tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed6
-rw-r--r--tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs6
-rw-r--r--tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr13
-rw-r--r--tests/ui/rust-2018/issue-52202-use-suggestions.stderr8
-rw-r--r--tests/ui/rust-2018/trait-import-suggestions.stderr6
-rw-r--r--tests/ui/rust-2018/uniform-paths/issue-87932.stderr2
6 files changed, 27 insertions, 14 deletions
diff --git a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed
index 85d106bc1..ede0c2e8e 100644
--- a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed
+++ b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed
@@ -18,9 +18,11 @@ mod foo {
fn main() {
let _: <foo::Baz as crate::foo::Foo>::Bar = ();
//~^ ERROR absolute paths must start with
- //~| this is accepted in the current edition
+ //~| WARN this is accepted in the current edition
+ //~| ERROR absolute paths must start with
+ //~| WARN this is accepted in the current edition
let _: <crate::foo::Baz as foo::Foo>::Bar = ();
//~^ ERROR absolute paths must start with
- //~| this is accepted in the current edition
+ //~| WARN this is accepted in the current edition
}
diff --git a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs
index 9ff3c2e5f..48b091ddb 100644
--- a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs
+++ b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs
@@ -18,9 +18,11 @@ mod foo {
fn main() {
let _: <foo::Baz as ::foo::Foo>::Bar = ();
//~^ ERROR absolute paths must start with
- //~| this is accepted in the current edition
+ //~| WARN this is accepted in the current edition
+ //~| ERROR absolute paths must start with
+ //~| WARN this is accepted in the current edition
let _: <::foo::Baz as foo::Foo>::Bar = ();
//~^ ERROR absolute paths must start with
- //~| this is accepted in the current edition
+ //~| WARN this is accepted in the current edition
}
diff --git a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr
index e1709db09..497ee440d 100644
--- a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr
+++ b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr
@@ -13,7 +13,16 @@ LL | #![deny(absolute_paths_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
- --> $DIR/edition-lint-fully-qualified-paths.rs:23:13
+ --> $DIR/edition-lint-fully-qualified-paths.rs:19:25
+ |
+LL | let _: <foo::Baz as ::foo::Foo>::Bar = ();
+ | ^^^^^^^^^^ help: use `crate`: `crate::foo::Foo`
+ |
+ = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
+ = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
+
+error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
+ --> $DIR/edition-lint-fully-qualified-paths.rs:25:13
|
LL | let _: <::foo::Baz as foo::Foo>::Bar = ();
| ^^^^^^^^^^ help: use `crate`: `crate::foo::Baz`
@@ -21,5 +30,5 @@ LL | let _: <::foo::Baz as foo::Foo>::Bar = ();
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
diff --git a/tests/ui/rust-2018/issue-52202-use-suggestions.stderr b/tests/ui/rust-2018/issue-52202-use-suggestions.stderr
index 38cd9713d..9933b9243 100644
--- a/tests/ui/rust-2018/issue-52202-use-suggestions.stderr
+++ b/tests/ui/rust-2018/issue-52202-use-suggestions.stderr
@@ -6,13 +6,13 @@ LL | let _d = Drain {};
|
help: consider importing one of these items
|
-LL | use crate::plumbing::Drain;
+LL + use crate::plumbing::Drain;
|
-LL | use std::collections::binary_heap::Drain;
+LL + use std::collections::binary_heap::Drain;
|
-LL | use std::collections::hash_map::Drain;
+LL + use std::collections::hash_map::Drain;
|
-LL | use std::collections::hash_set::Drain;
+LL + use std::collections::hash_set::Drain;
|
and 3 other candidates
diff --git a/tests/ui/rust-2018/trait-import-suggestions.stderr b/tests/ui/rust-2018/trait-import-suggestions.stderr
index 6454b6045..325c5976e 100644
--- a/tests/ui/rust-2018/trait-import-suggestions.stderr
+++ b/tests/ui/rust-2018/trait-import-suggestions.stderr
@@ -10,7 +10,7 @@ LL | x.foobar();
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
-LL | use crate::foo::foobar::Foobar;
+LL + use crate::foo::foobar::Foobar;
|
error[E0599]: no method named `bar` found for type `u32` in the current scope
@@ -25,7 +25,7 @@ LL | x.bar();
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
-LL | use crate::foo::Bar;
+LL + use crate::foo::Bar;
|
error[E0599]: no method named `baz` found for type `u32` in the current scope
@@ -43,7 +43,7 @@ LL | let y = u32::from_str("33");
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
-LL | use std::str::FromStr;
+LL + use std::str::FromStr;
|
help: there is an associated function with a similar name
|
diff --git a/tests/ui/rust-2018/uniform-paths/issue-87932.stderr b/tests/ui/rust-2018/uniform-paths/issue-87932.stderr
index b52720ae3..ac2baa359 100644
--- a/tests/ui/rust-2018/uniform-paths/issue-87932.stderr
+++ b/tests/ui/rust-2018/uniform-paths/issue-87932.stderr
@@ -10,7 +10,7 @@ LL | A::deserialize();
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
-LL | use <crate::A as issue_87932_a::Deserialize>::deserialize::_a::Deserialize;
+LL + use <crate::A as issue_87932_a::Deserialize>::deserialize::_a::Deserialize;
|
error: aborting due to previous error