]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rust-2018/trait-import-suggestions.stderr
Auto merge of #84589 - In-line:zircon-thread-name, r=JohnTitor
[rust.git] / src / test / ui / rust-2018 / trait-import-suggestions.stderr
1 error[E0599]: no method named `foobar` found for type `u32` in the current scope
2   --> $DIR/trait-import-suggestions.rs:22:11
3    |
4 LL |             fn foobar(&self) { }
5    |                ------ the method is available for `u32` here
6 ...
7 LL |         x.foobar();
8    |           ^^^^^^ method not found in `u32`
9    |
10    = help: items from traits can only be used if the trait is in scope
11    = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
12            `use crate::foo::foobar::Foobar;`
13
14 error[E0599]: no method named `bar` found for type `u32` in the current scope
15   --> $DIR/trait-import-suggestions.rs:28:7
16    |
17 LL |         fn bar(&self) { }
18    |            --- the method is available for `u32` here
19 ...
20 LL |     x.bar();
21    |       ^^^ method not found in `u32`
22    |
23    = help: items from traits can only be used if the trait is in scope
24 help: the following trait is implemented but not in scope; perhaps add a `use` for it:
25    |
26 LL | use crate::foo::Bar;
27    |
28
29 error[E0599]: no method named `baz` found for type `u32` in the current scope
30   --> $DIR/trait-import-suggestions.rs:29:7
31    |
32 LL |     x.baz();
33    |       ^^^ method not found in `u32`
34
35 error[E0599]: no function or associated item named `from_str` found for type `u32` in the current scope
36   --> $DIR/trait-import-suggestions.rs:30:18
37    |
38 LL |     let y = u32::from_str("33");
39    |                  ^^^^^^^^ function or associated item not found in `u32`
40    |
41    = help: items from traits can only be used if the trait is in scope
42 help: the following trait is implemented but not in scope; perhaps add a `use` for it:
43    |
44 LL | use std::str::FromStr;
45    |
46
47 error: aborting due to 4 previous errors
48
49 For more information about this error, try `rustc --explain E0599`.