]> git.proxmox.com Git - rustc.git/blob - 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
1 error[E0034]: multiple applicable items in scope
2 --> $DIR/method-ambig-two-traits-with-default-method.rs:12:13
3 |
4 LL | 1_usize.method();
5 | ^^^^^^ multiple `method` found
6 |
7 note: candidate #1 is defined in an impl of the trait `Foo` for the type `usize`
8 --> $DIR/method-ambig-two-traits-with-default-method.rs:5:13
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`
13 --> $DIR/method-ambig-two-traits-with-default-method.rs:6:13
14 |
15 LL | trait Bar { fn method(&self) {} }
16 | ^^^^^^^^^^^^^^^^
17 help: disambiguate the associated function for candidate #1
18 |
19 LL | Foo::method(&1_usize);
20 | ~~~~~~~~~~~~~~~~~~~~~
21 help: disambiguate the associated function for candidate #2
22 |
23 LL | Bar::method(&1_usize);
24 | ~~~~~~~~~~~~~~~~~~~~~
25
26 error: aborting due to previous error
27
28 For more information about this error, try `rustc --explain E0034`.