]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0034]: multiple applicable items in scope |
0731742a | 2 | --> $DIR/method-ambig-two-traits-with-default-method.rs:12:13 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | 1_usize.method(); |
b7449926 XL |
5 | | ^^^^^^ multiple `method` found |
6 | | | |
7 | note: candidate #1 is defined in an impl of the trait `Foo` for the type `usize` | |
0731742a | 8 | --> $DIR/method-ambig-two-traits-with-default-method.rs:5:13 |
b7449926 XL |
9 | | |
10 | LL | trait Foo { fn method(&self) {} } | |
11 | | ^^^^^^^^^^^^^^^^ | |
12 | note: candidate #2 is defined in an impl of the trait `Bar` for the type `usize` | |
0731742a | 13 | --> $DIR/method-ambig-two-traits-with-default-method.rs:6:13 |
b7449926 XL |
14 | | |
15 | LL | trait Bar { fn method(&self) {} } | |
16 | | ^^^^^^^^^^^^^^^^ | |
ba9703b0 | 17 | help: disambiguate the associated function for candidate #1 |
dfeec247 XL |
18 | | |
19 | LL | Foo::method(&1_usize); | |
94222f64 | 20 | | ~~~~~~~~~~~~~~~~~~~~~ |
ba9703b0 | 21 | help: disambiguate the associated function for candidate #2 |
dfeec247 XL |
22 | | |
23 | LL | Bar::method(&1_usize); | |
94222f64 | 24 | | ~~~~~~~~~~~~~~~~~~~~~ |
b7449926 XL |
25 | |
26 | error: aborting due to previous error | |
27 | ||
28 | For more information about this error, try `rustc --explain E0034`. |