fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.9 KiB55 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 |             fn foobar(&self) { }
5   |                ------ the method is available for `u32` here
6...
7LL |         x.foobar();
8   |           ^^^^^^ method not found in `u32`
9   |
10   = help: items from traits can only be used if the trait is in scope
11help: the following trait is implemented but not in scope; perhaps add a `use` for it:
12   |
13LL +     use crate::foo::foobar::Foobar;
14   |
15
16error[E0599]: no method named `bar` found for type `u32` in the current scope
17  --> $DIR/trait-import-suggestions.rs:28:7
18   |
19LL |         fn bar(&self) { }
20   |            --- the method is available for `u32` here
21...
22LL |     x.bar();
23   |       ^^^ method not found in `u32`
24   |
25   = help: items from traits can only be used if the trait is in scope
26help: the following trait is implemented but not in scope; perhaps add a `use` for it:
27   |
28LL + use crate::foo::Bar;
29   |
30
31error[E0599]: no method named `baz` found for type `u32` in the current scope
32  --> $DIR/trait-import-suggestions.rs:29:7
33   |
34LL |     x.baz();
35   |       ^^^ method not found in `u32`
36
37error[E0599]: no function or associated item named `from_str` found for type `u32` in the current scope
38  --> $DIR/trait-import-suggestions.rs:30:18
39   |
40LL |     let y = u32::from_str("33");
41   |                  ^^^^^^^^ function or associated item not found in `u32`
42   |
43   = help: items from traits can only be used if the trait is in scope
44help: the following trait is implemented but not in scope; perhaps add a `use` for it:
45   |
46LL + use std::str::FromStr;
47   |
48help: there is an associated function with a similar name
49   |
50LL |     let y = u32::from_str_radix("33");
51   |                  ~~~~~~~~~~~~~~
52
53error: aborting due to 4 previous errors
54
55For more information about this error, try `rustc --explain E0599`.