]> git.lizzy.rs Git - rust.git/blob - tests/ui/methods/method-ambig-two-traits-from-bounds.stderr
Rollup merge of #106397 - compiler-errors:new-solver-impl-wc, r=lcnr
[rust.git] / tests / ui / methods / method-ambig-two-traits-from-bounds.stderr
1 error[E0034]: multiple applicable items in scope
2   --> $DIR/method-ambig-two-traits-from-bounds.rs:5:7
3    |
4 LL |     t.foo();
5    |       ^^^ multiple `foo` found
6    |
7 note: candidate #1 is defined in the trait `A`
8   --> $DIR/method-ambig-two-traits-from-bounds.rs:1:11
9    |
10 LL | trait A { fn foo(&self); }
11    |           ^^^^^^^^^^^^^^
12 note: candidate #2 is defined in the trait `B`
13   --> $DIR/method-ambig-two-traits-from-bounds.rs:2:11
14    |
15 LL | trait B { fn foo(&self); }
16    |           ^^^^^^^^^^^^^^
17 help: disambiguate the associated function for candidate #1
18    |
19 LL |     A::foo(t);
20    |     ~~~~~~~~~
21 help: disambiguate the associated function for candidate #2
22    |
23 LL |     B::foo(t);
24    |     ~~~~~~~~~
25
26 error: aborting due to previous error
27
28 For more information about this error, try `rustc --explain E0034`.