fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
3.1 KiB79 linesraw
1error[E0599]: no method named `f9` found for type `usize` in the current scope
2  --> $DIR/issue-7575.rs:62:18
3   |
4LL |     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
8note: candidate #1 is defined in the trait `CtxtFn`
9  --> $DIR/issue-7575.rs:4:5
10   |
11LL |     fn f9(_: usize) -> usize;
12   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
13note: candidate #2 is defined in the trait `OtherTrait`
14  --> $DIR/issue-7575.rs:8:5
15   |
16LL |     fn f9(_: usize) -> usize;
17   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
18note: candidate #3 is defined in the trait `UnusedTrait`
19  --> $DIR/issue-7575.rs:17:5
20   |
21LL |     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`
28help: disambiguate the method call for candidate #1
29   |
30LL |     u.f8(42) + CtxtFn::f9(u, 342) + m.fff(42)
31   |                ^^^^^^^^^^^^^^^^^^
32help: disambiguate the method call for candidate #2
33   |
34LL |     u.f8(42) + OtherTrait::f9(u, 342) + m.fff(42)
35   |                ^^^^^^^^^^^^^^^^^^^^^^
36help: disambiguate the method call for candidate #3
37   |
38LL |     u.f8(42) + UnusedTrait::f9(u, 342) + m.fff(42)
39   |                ^^^^^^^^^^^^^^^^^^^^^^^
40
41error[E0599]: no method named `fff` found for struct `Myisize` in the current scope
42  --> $DIR/issue-7575.rs:62:30
43   |
44LL | struct Myisize(isize);
45   | ---------------------- method `fff` not found for this
46...
47LL |     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
54note: the candidate is defined in an impl for the type `Myisize`
55  --> $DIR/issue-7575.rs:39:5
56   |
57LL |     fn fff(i: isize) -> isize {
58   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
59
60error[E0599]: no method named `is_str` found for type parameter `T` in the current scope
61  --> $DIR/issue-7575.rs:70:7
62   |
63LL |     t.is_str()
64   |     --^^^^^^--
65   |     | |
66   |     | this is an associated function, not a method
67   |     help: disambiguate the method call for the candidate: `ManyImplTrait::is_str(t)`
68   |
69   = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
70note: the candidate is defined in the trait `ManyImplTrait`
71  --> $DIR/issue-7575.rs:45:5
72   |
73LL |     fn is_str() -> bool {
74   |     ^^^^^^^^^^^^^^^^^^^
75   = help: items from traits can only be used if the type parameter is bounded by the trait
76
77error: aborting due to 3 previous errors
78
79For more information about this error, try `rustc --explain E0599`.