]> git.proxmox.com Git - rustc.git/blame - src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / methods / method-ambig-two-traits-with-default-method.stderr
CommitLineData
b7449926 1error[E0034]: multiple applicable items in scope
0731742a 2 --> $DIR/method-ambig-two-traits-with-default-method.rs:12:13
b7449926 3 |
532ac7d7 4LL | 1_usize.method();
b7449926
XL
5 | ^^^^^^ multiple `method` found
6 |
7note: 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 |
10LL | trait Foo { fn method(&self) {} }
11 | ^^^^^^^^^^^^^^^^
12note: 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 |
15LL | trait Bar { fn method(&self) {} }
16 | ^^^^^^^^^^^^^^^^
ba9703b0 17help: disambiguate the associated function for candidate #1
dfeec247
XL
18 |
19LL | Foo::method(&1_usize);
94222f64 20 | ~~~~~~~~~~~~~~~~~~~~~
ba9703b0 21help: disambiguate the associated function for candidate #2
dfeec247
XL
22 |
23LL | Bar::method(&1_usize);
94222f64 24 | ~~~~~~~~~~~~~~~~~~~~~
b7449926
XL
25
26error: aborting due to previous error
27
28For more information about this error, try `rustc --explain E0034`.