]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-7575.stderr
Add help for static method invalid use
[rust.git] / src / test / ui / span / issue-7575.stderr
1 error[E0599]: no method named `f9` found for type `usize` in the current scope
2   --> $DIR/issue-7575.rs:74:18
3    |
4 74 |     u.f8(42) + u.f9(342) + m.fff(42)
5    |                  ^^
6    |
7    = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
8    = help: try with `usize::f9`
9 note: candidate #1 is defined in the trait `CtxtFn`
10   --> $DIR/issue-7575.rs:16:5
11    |
12 16 |     fn f9(_: usize) -> usize; //~ NOTE candidate
13    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
14    = help: to disambiguate the method call, write `CtxtFn::f9(u, 342)` instead
15 note: candidate #2 is defined in the trait `OtherTrait`
16   --> $DIR/issue-7575.rs:20:5
17    |
18 20 |     fn f9(_: usize) -> usize; //~ NOTE candidate
19    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
20    = help: to disambiguate the method call, write `OtherTrait::f9(u, 342)` instead
21 note: candidate #3 is defined in the trait `UnusedTrait`
22   --> $DIR/issue-7575.rs:29:5
23    |
24 29 |     fn f9(_: usize) -> usize; //~ NOTE candidate
25    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
26    = help: to disambiguate the method call, write `UnusedTrait::f9(u, 342)` instead
27    = help: items from traits can only be used if the trait is implemented and in scope
28    = note: the following traits define an item `f9`, perhaps you need to implement one of them:
29            candidate #1: `CtxtFn`
30            candidate #2: `OtherTrait`
31            candidate #3: `UnusedTrait`
32
33 error[E0599]: no method named `fff` found for type `Myisize` in the current scope
34   --> $DIR/issue-7575.rs:74:30
35    |
36 74 |     u.f8(42) + u.f9(342) + m.fff(42)
37    |                              ^^^
38    |
39    = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
40    = help: try with `Myisize::fff`
41 note: candidate #1 is defined in an impl for the type `Myisize`
42   --> $DIR/issue-7575.rs:51:5
43    |
44 51 | /     fn fff(i: isize) -> isize { //~ NOTE candidate
45 52 | |         i
46 53 | |     }
47    | |_____^
48
49 error[E0599]: no method named `is_str` found for type `T` in the current scope
50   --> $DIR/issue-7575.rs:85:7
51    |
52 85 |     t.is_str()
53    |       ^^^^^^
54    |
55    = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
56    = help: try with `T::is_str`
57 note: candidate #1 is defined in the trait `ManyImplTrait`
58   --> $DIR/issue-7575.rs:57:5
59    |
60 57 | /     fn is_str() -> bool { //~ NOTE candidate
61 58 | |         false
62 59 | |     }
63    | |_____^
64    = help: to disambiguate the method call, write `ManyImplTrait::is_str(t)` instead
65    = help: items from traits can only be used if the trait is implemented and in scope
66    = note: the following trait defines an item `is_str`, perhaps you need to implement it:
67            candidate #1: `ManyImplTrait`
68
69 error: aborting due to 3 previous errors
70