]> git.proxmox.com Git - rustc.git/blame - tests/ui/rust-2018/trait-import-suggestions.stderr
New upstream version 1.70.0+dfsg1
[rustc.git] / tests / ui / rust-2018 / trait-import-suggestions.stderr
CommitLineData
0bf4aa26 1error[E0599]: no method named `foobar` found for type `u32` in the current scope
0731742a 2 --> $DIR/trait-import-suggestions.rs:22:11
0bf4aa26 3 |
cdc7bbd5
XL
4LL | fn foobar(&self) { }
5 | ------ the method is available for `u32` here
6...
532ac7d7 7LL | x.foobar();
e1599b0c 8 | ^^^^^^ method not found in `u32`
0bf4aa26
XL
9 |
10 = help: items from traits can only be used if the trait is in scope
c295e0f8
XL
11help: the following trait is implemented but not in scope; perhaps add a `use` for it:
12 |
353b0b11 13LL + use crate::foo::foobar::Foobar;
c295e0f8 14 |
0bf4aa26
XL
15
16error[E0599]: no method named `bar` found for type `u32` in the current scope
0731742a 17 --> $DIR/trait-import-suggestions.rs:28:7
0bf4aa26 18 |
cdc7bbd5
XL
19LL | fn bar(&self) { }
20 | --- the method is available for `u32` here
21...
532ac7d7 22LL | x.bar();
e1599b0c 23 | ^^^ method not found in `u32`
0bf4aa26
XL
24 |
25 = help: items from traits can only be used if the trait is in scope
e74abb32 26help: the following trait is implemented but not in scope; perhaps add a `use` for it:
0bf4aa26 27 |
353b0b11 28LL + use crate::foo::Bar;
0bf4aa26
XL
29 |
30
31error[E0599]: no method named `baz` found for type `u32` in the current scope
0731742a 32 --> $DIR/trait-import-suggestions.rs:29:7
0bf4aa26 33 |
532ac7d7 34LL | x.baz();
e1599b0c 35 | ^^^ method not found in `u32`
0bf4aa26
XL
36
37error[E0599]: no function or associated item named `from_str` found for type `u32` in the current scope
0731742a 38 --> $DIR/trait-import-suggestions.rs:30:18
0bf4aa26 39 |
532ac7d7
XL
40LL | let y = u32::from_str("33");
41 | ^^^^^^^^ function or associated item not found in `u32`
0bf4aa26
XL
42 |
43 = help: items from traits can only be used if the trait is in scope
e74abb32 44help: the following trait is implemented but not in scope; perhaps add a `use` for it:
0bf4aa26 45 |
353b0b11 46LL + use std::str::FromStr;
0bf4aa26 47 |
04454e1e
FG
48help: there is an associated function with a similar name
49 |
50LL | let y = u32::from_str_radix("33");
51 | ~~~~~~~~~~~~~~
0bf4aa26
XL
52
53error: aborting due to 4 previous errors
54
55For more information about this error, try `rustc --explain E0599`.