]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-7575.stderr
Auto merge of #99028 - tmiasko:inline, r=estebank
[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:62:18
3    |
4 LL |     u.f8(42) + u.f9(342) + m.fff(42)
5    |                  ^^ this is an associated function, not a method
6    |
7    = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
8 note: candidate #1 is defined in the trait `CtxtFn`
9   --> $DIR/issue-7575.rs:4:5
10    |
11 LL |     fn f9(_: usize) -> usize;
12    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
13 note: candidate #2 is defined in the trait `OtherTrait`
14   --> $DIR/issue-7575.rs:8:5
15    |
16 LL |     fn f9(_: usize) -> usize;
17    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
18 note: candidate #3 is defined in the trait `UnusedTrait`
19   --> $DIR/issue-7575.rs:17:5
20    |
21 LL |     fn f9(_: usize) -> usize;
22    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
23    = help: items from traits can only be used if the trait is implemented and in scope
24    = note: the following traits define an item `f9`, perhaps you need to implement one of them:
25            candidate #1: `CtxtFn`
26            candidate #2: `OtherTrait`
27            candidate #3: `UnusedTrait`
28 help: disambiguate the associated function for candidate #1
29    |
30 LL |     u.f8(42) + <usize as CtxtFn>::f9(u, 342) + m.fff(42)
31    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 help: disambiguate the associated function for candidate #2
33    |
34 LL |     u.f8(42) + <usize as OtherTrait>::f9(u, 342) + m.fff(42)
35    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36 help: disambiguate the associated function for candidate #3
37    |
38 LL |     u.f8(42) + <usize as UnusedTrait>::f9(u, 342) + m.fff(42)
39    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40
41 error[E0599]: no method named `fff` found for struct `Myisize` in the current scope
42   --> $DIR/issue-7575.rs:62:30
43    |
44 LL | struct Myisize(isize);
45    | -------------- method `fff` not found for this struct
46 ...
47 LL |     u.f8(42) + u.f9(342) + m.fff(42)
48    |                            --^^^
49    |                            | |
50    |                            | this is an associated function, not a method
51    |                            help: use associated function syntax instead: `Myisize::fff`
52    |
53    = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
54 note: the candidate is defined in an impl for the type `Myisize`
55   --> $DIR/issue-7575.rs:39:5
56    |
57 LL |     fn fff(i: isize) -> isize {
58    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
59
60 error[E0599]: no method named `is_str` found for type parameter `T` in the current scope
61   --> $DIR/issue-7575.rs:70:7
62    |
63 LL | fn param_bound<T: ManyImplTrait>(t: T) -> bool {
64    |                - method `is_str` not found for this type parameter
65 LL |     t.is_str()
66    |       ^^^^^^ this is an associated function, not a method
67    |
68    = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
69 note: the candidate is defined in the trait `ManyImplTrait`
70   --> $DIR/issue-7575.rs:45:5
71    |
72 LL |     fn is_str() -> bool {
73    |     ^^^^^^^^^^^^^^^^^^^
74    = help: items from traits can only be used if the type parameter is bounded by the trait
75 help: disambiguate the associated function for the candidate
76    |
77 LL |     <T as ManyImplTrait>::is_str(t)
78    |
79
80 error: aborting due to 3 previous errors
81
82 For more information about this error, try `rustc --explain E0599`.