Bless tests.

This commit is contained in:
Camille GILLOT 2021-08-26 20:17:19 +02:00
parent fa2bc4f400
commit bd2f08c22f
8 changed files with 34 additions and 17 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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