summaryrefslogtreecommitdiffstats
path: root/src/test/ui/span/issue-7575.stderr
blob: 4f30edb3f89d3d5e663d0a24b7373f3b5ed8979e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
error[E0599]: no method named `f9` found for type `usize` in the current scope
  --> $DIR/issue-7575.rs:62:18
   |
LL |     u.f8(42) + u.f9(342) + m.fff(42)
   |                  ^^ this is an associated function, not a method
   |
   = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
note: candidate #1 is defined in the trait `CtxtFn`
  --> $DIR/issue-7575.rs:4:5
   |
LL |     fn f9(_: usize) -> usize;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait `OtherTrait`
  --> $DIR/issue-7575.rs:8:5
   |
LL |     fn f9(_: usize) -> usize;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #3 is defined in the trait `UnusedTrait`
  --> $DIR/issue-7575.rs:17:5
   |
LL |     fn f9(_: usize) -> usize;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following traits define an item `f9`, perhaps you need to implement one of them:
           candidate #1: `CtxtFn`
           candidate #2: `OtherTrait`
           candidate #3: `UnusedTrait`
help: disambiguate the associated function for candidate #1
   |
LL |     u.f8(42) + <usize as CtxtFn>::f9(u, 342) + m.fff(42)
   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: disambiguate the associated function for candidate #2
   |
LL |     u.f8(42) + <usize as OtherTrait>::f9(u, 342) + m.fff(42)
   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: disambiguate the associated function for candidate #3
   |
LL |     u.f8(42) + <usize as UnusedTrait>::f9(u, 342) + m.fff(42)
   |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0599]: no method named `fff` found for struct `Myisize` in the current scope
  --> $DIR/issue-7575.rs:62:30
   |
LL | struct Myisize(isize);
   | -------------- method `fff` not found for this struct
...
LL |     u.f8(42) + u.f9(342) + m.fff(42)
   |                            --^^^
   |                            | |
   |                            | this is an associated function, not a method
   |                            help: use associated function syntax instead: `Myisize::fff`
   |
   = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
note: the candidate is defined in an impl for the type `Myisize`
  --> $DIR/issue-7575.rs:39:5
   |
LL |     fn fff(i: isize) -> isize {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: no method named `is_str` found for type parameter `T` in the current scope
  --> $DIR/issue-7575.rs:70:7
   |
LL | fn param_bound<T: ManyImplTrait>(t: T) -> bool {
   |                - method `is_str` not found for this type parameter
LL |     t.is_str()
   |       ^^^^^^ this is an associated function, not a method
   |
   = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
note: the candidate is defined in the trait `ManyImplTrait`
  --> $DIR/issue-7575.rs:45:5
   |
LL |     fn is_str() -> bool {
   |     ^^^^^^^^^^^^^^^^^^^
   = help: items from traits can only be used if the type parameter is bounded by the trait
help: disambiguate the associated function for the candidate
   |
LL |     <T as ManyImplTrait>::is_str(t)
   |

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0599`.