2018-09-27 01:17:54 +02:00
|
|
|
error[E0599]: no method named `foobar` found for type `u32` in the current scope
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/trait-import-suggestions.rs:22:11
|
2018-09-27 01:17:54 +02:00
|
|
|
|
|
2021-04-23 18:24:02 -07:00
|
|
|
LL | fn foobar(&self) { }
|
|
|
|
| ------ the method is available for `u32` here
|
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | x.foobar();
|
2019-09-06 12:00:07 -07:00
|
|
|
| ^^^^^^ method not found in `u32`
|
2018-09-27 01:17:54 +02:00
|
|
|
|
|
|
|
|
= help: items from traits can only be used if the trait is in scope
|
2019-09-30 00:58:05 +01:00
|
|
|
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
2018-09-27 01:17:54 +02:00
|
|
|
`use crate::foo::foobar::Foobar;`
|
|
|
|
|
|
|
|
error[E0599]: no method named `bar` found for type `u32` in the current scope
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/trait-import-suggestions.rs:28:7
|
2018-09-27 01:17:54 +02:00
|
|
|
|
|
2021-04-23 18:24:02 -07:00
|
|
|
LL | fn bar(&self) { }
|
|
|
|
| --- the method is available for `u32` here
|
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | x.bar();
|
2019-09-06 12:00:07 -07:00
|
|
|
| ^^^ method not found in `u32`
|
2018-09-27 01:17:54 +02:00
|
|
|
|
|
|
|
|
= help: items from traits can only be used if the trait is in scope
|
2019-09-30 00:58:05 +01:00
|
|
|
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
2018-09-27 01:17:54 +02:00
|
|
|
|
|
|
|
|
LL | use crate::foo::Bar;
|
|
|
|
|
|
|
|
|
|
|
|
|
error[E0599]: no method named `baz` found for type `u32` in the current scope
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/trait-import-suggestions.rs:29:7
|
2018-09-27 01:17:54 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | x.baz();
|
2019-09-06 12:00:07 -07:00
|
|
|
| ^^^ method not found in `u32`
|
2018-09-27 01:17:54 +02:00
|
|
|
|
|
|
|
error[E0599]: no function or associated item named `from_str` found for type `u32` in the current scope
|
2018-12-07 18:15:36 +00:00
|
|
|
--> $DIR/trait-import-suggestions.rs:30:18
|
2018-09-27 01:17:54 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | let y = u32::from_str("33");
|
2019-03-10 16:20:15 -07:00
|
|
|
| ^^^^^^^^ function or associated item not found in `u32`
|
2018-09-27 01:17:54 +02:00
|
|
|
|
|
|
|
|
= help: items from traits can only be used if the trait is in scope
|
2019-09-30 00:58:05 +01:00
|
|
|
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
2018-09-27 01:17:54 +02:00
|
|
|
|
|
|
|
|
LL | use std::str::FromStr;
|
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0599`.
|