fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.5 KiB43 linesraw
1error[E0599]: no method named `foobar` found for type `u32` in the current scope
2  --> $DIR/trait-import-suggestions.rs:22:11
3   |
4LL |         x.foobar();
5   |           ^^^^^^ method not found in `u32`
6   |
7   = help: items from traits can only be used if the trait is in scope
8   = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
9           `use crate::foo::foobar::Foobar;`
10
11error[E0599]: no method named `bar` found for type `u32` in the current scope
12  --> $DIR/trait-import-suggestions.rs:28:7
13   |
14LL |     x.bar();
15   |       ^^^ method not found in `u32`
16   |
17   = help: items from traits can only be used if the trait is in scope
18help: the following trait is implemented but not in scope; perhaps add a `use` for it:
19   |
20LL | use crate::foo::Bar;
21   |
22
23error[E0599]: no method named `baz` found for type `u32` in the current scope
24  --> $DIR/trait-import-suggestions.rs:29:7
25   |
26LL |     x.baz();
27   |       ^^^ method not found in `u32`
28
29error[E0599]: no function or associated item named `from_str` found for type `u32` in the current scope
30  --> $DIR/trait-import-suggestions.rs:30:18
31   |
32LL |     let y = u32::from_str("33");
33   |                  ^^^^^^^^ function or associated item not found in `u32`
34   |
35   = help: items from traits can only be used if the trait is in scope
36help: the following trait is implemented but not in scope; perhaps add a `use` for it:
37   |
38LL | use std::str::FromStr;
39   |
40
41error: aborting due to 4 previous errors
42
43For more information about this error, try `rustc --explain E0599`.