]> git.proxmox.com Git - rustc.git/blob - src/test/ui/span/issue-7575.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.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) + CtxtFn::f9(u, 342) + m.fff(42)
31 | ~~~~~~~~~~~~~~~~~~
32 help: disambiguate the associated function for candidate #2
33 |
34 LL | u.f8(42) + OtherTrait::f9(u, 342) + m.fff(42)
35 | ~~~~~~~~~~~~~~~~~~~~~~
36 help: disambiguate the associated function for candidate #3
37 |
38 LL | u.f8(42) + 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
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 | t.is_str()
64 | ^^^^^^ this is an associated function, not a method
65 |
66 = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
67 note: the candidate is defined in the trait `ManyImplTrait`
68 --> $DIR/issue-7575.rs:45:5
69 |
70 LL | fn is_str() -> bool {
71 | ^^^^^^^^^^^^^^^^^^^
72 = help: items from traits can only be used if the type parameter is bounded by the trait
73 help: disambiguate the associated function for the candidate
74 |
75 LL | ManyImplTrait::is_str(t)
76 |
77
78 error: aborting due to 3 previous errors
79
80 For more information about this error, try `rustc --explain E0599`.