about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-08-26 20:17:19 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2021-09-02 19:08:59 +0200
commitbd2f08c22fa89dbbcccc56a04231cfb63a80132e (patch)
treed718c094cb51f42862ccba56050c2421fb1e6b35 /src/test
parentfa2bc4f40005c7b318ec91dac3222141bf8e9833 (diff)
downloadrust-bd2f08c22fa89dbbcccc56a04231cfb63a80132e.tar.gz
rust-bd2f08c22fa89dbbcccc56a04231cfb63a80132e.zip
Bless tests.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/coherence/coherence_inherent.stderr6
-rw-r--r--src/test/ui/coherence/coherence_inherent_cc.stderr6
-rw-r--r--src/test/ui/hygiene/no_implicit_prelude.stderr6
-rw-r--r--src/test/ui/hygiene/trait_items.stderr6
-rw-r--r--src/test/ui/issues/issue-10465.stderr6
-rw-r--r--src/test/ui/rust-2018/trait-import-suggestions.stderr6
-rw-r--r--src/test/ui/rust-2021/future-prelude-collision-shadow.stderr9
-rw-r--r--src/test/ui/underscore-imports/shadow.stderr6
8 files changed, 34 insertions, 17 deletions
diff --git a/src/test/ui/coherence/coherence_inherent.stderr b/src/test/ui/coherence/coherence_inherent.stderr
index 6f36f2a7510..46b128c08fe 100644
--- a/src/test/ui/coherence/coherence_inherent.stderr
+++ b/src/test/ui/coherence/coherence_inherent.stderr
@@ -5,8 +5,10 @@ LL |         s.the_fn();
    |           ^^^^^^ method not found in `&TheStruct`
    |
    = help: items from traits can only be used if the trait is in scope
-   = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
-           `use Lib::TheTrait;`
+help: the following trait is implemented but not in scope; perhaps add a `use` for it:
+   |
+LL |     use Lib::TheTrait;
+   |
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/coherence/coherence_inherent_cc.stderr b/src/test/ui/coherence/coherence_inherent_cc.stderr
index edfe6348d17..af0ef3b6932 100644
--- a/src/test/ui/coherence/coherence_inherent_cc.stderr
+++ b/src/test/ui/coherence/coherence_inherent_cc.stderr
@@ -5,8 +5,10 @@ LL |         s.the_fn();
    |           ^^^^^^ method not found in `&TheStruct`
    |
    = help: items from traits can only be used if the trait is in scope
-   = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
-           `use coherence_inherent_cc_lib::TheTrait;`
+help: the following trait is implemented but not in scope; perhaps add a `use` for it:
+   |
+LL |     use coherence_inherent_cc_lib::TheTrait;
+   |
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/hygiene/no_implicit_prelude.stderr b/src/test/ui/hygiene/no_implicit_prelude.stderr
index 4f49b3106ed..0e9b63d6370 100644
--- a/src/test/ui/hygiene/no_implicit_prelude.stderr
+++ b/src/test/ui/hygiene/no_implicit_prelude.stderr
@@ -23,9 +23,11 @@ LL |         ().clone()
    |            ^^^^^ method not found in `()`
    |
    = help: items from traits can only be used if the trait is in scope
-   = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
-           `use std::clone::Clone;`
    = note: this error originates in the macro `::bar::m` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: the following trait is implemented but not in scope; perhaps add a `use` for it:
+   |
+LL |     use std::clone::Clone;
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/hygiene/trait_items.stderr b/src/test/ui/hygiene/trait_items.stderr
index f16bb80dbb8..77ab6e589e0 100644
--- a/src/test/ui/hygiene/trait_items.stderr
+++ b/src/test/ui/hygiene/trait_items.stderr
@@ -11,9 +11,11 @@ LL |     pub macro m() { ().f() }
    |                        ^ method not found in `()`
    |
    = help: items from traits can only be used if the trait is in scope
-   = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
-           `use foo::T;`
    = note: this error originates in the macro `::baz::m` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: the following trait is implemented but not in scope; perhaps add a `use` for it:
+   |
+LL |     use foo::T;
+   |
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-10465.stderr b/src/test/ui/issues/issue-10465.stderr
index eb32c8db3f6..0ccf69dc060 100644
--- a/src/test/ui/issues/issue-10465.stderr
+++ b/src/test/ui/issues/issue-10465.stderr
@@ -5,8 +5,10 @@ LL |             b.foo();
    |               ^^^ method not found in `&B`
    |
    = help: items from traits can only be used if the trait is in scope
-   = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
-           `use a::A;`
+help: the following trait is implemented but not in scope; perhaps add a `use` for it:
+   |
+LL |         use a::A;
+   |
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rust-2018/trait-import-suggestions.stderr b/src/test/ui/rust-2018/trait-import-suggestions.stderr
index 2cf5a073fe5..eb4e43aaec3 100644
--- a/src/test/ui/rust-2018/trait-import-suggestions.stderr
+++ b/src/test/ui/rust-2018/trait-import-suggestions.stderr
@@ -8,8 +8,10 @@ LL |         x.foobar();
    |           ^^^^^^ method not found in `u32`
    |
    = help: items from traits can only be used if the trait is in scope
-   = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
-           `use crate::foo::foobar::Foobar;`
+help: the following trait is implemented but not in scope; perhaps add a `use` for it:
+   |
+LL |     use crate::foo::foobar::Foobar;
+   |
 
 error[E0599]: no method named `bar` found for type `u32` in the current scope
   --> $DIR/trait-import-suggestions.rs:28:7
diff --git a/src/test/ui/rust-2021/future-prelude-collision-shadow.stderr b/src/test/ui/rust-2021/future-prelude-collision-shadow.stderr
index e60f9c039be..e4662b430dc 100644
--- a/src/test/ui/rust-2021/future-prelude-collision-shadow.stderr
+++ b/src/test/ui/rust-2021/future-prelude-collision-shadow.stderr
@@ -15,9 +15,6 @@ LL |     fn try_into(self) -> Result<T, Self::Error>;
    |        the method is available for `Rc<u8>` here
    |
    = help: items from traits can only be used if the trait is in scope
-   = note: the following traits are implemented but not in scope; perhaps add a `use` for one of them:
-           candidate #1: `use crate::m::TryIntoU32;`
-           candidate #2: `use std::convert::TryInto;`
 help: consider wrapping the receiver expression with the appropriate type
    |
 LL |         let _: u32 = Box::new(3u8).try_into().unwrap();
@@ -34,6 +31,12 @@ help: consider wrapping the receiver expression with the appropriate type
    |
 LL |         let _: u32 = Rc::new(3u8).try_into().unwrap();
    |                      ++++++++   +
+help: the following traits are implemented but not in scope; perhaps add a `use` for one of them:
+   |
+LL |     use crate::m::TryIntoU32;
+   |
+LL |     use std::convert::TryInto;
+   |
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/underscore-imports/shadow.stderr b/src/test/ui/underscore-imports/shadow.stderr
index eb16fa9d566..7faede4e6d0 100644
--- a/src/test/ui/underscore-imports/shadow.stderr
+++ b/src/test/ui/underscore-imports/shadow.stderr
@@ -5,8 +5,10 @@ LL |         x.deref();
    |           ^^^^^ method not found in `&()`
    |
    = help: items from traits can only be used if the trait is in scope
-   = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
-           `use std::ops::Deref;`
+help: the following trait is implemented but not in scope; perhaps add a `use` for it:
+   |
+LL |     use std::ops::Deref;
+   |
 
 error: aborting due to previous error