about summary refs log tree commit diff
path: root/tests/ui/methods/wrong-ambig-message.stderr
blob: 9a254595e40bcde65db63b6ba8e8545192d3689f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
error[E0034]: multiple applicable items in scope
  --> $DIR/wrong-ambig-message.rs:32:30
   |
LL |     println!("c2 = {:?}", c2.name());
   |                              ^^^^ multiple `name` found
   |
note: candidate #1 is defined in an impl of the trait `AName2` for the type `Container2`
  --> $DIR/wrong-ambig-message.rs:20:9
   |
LL |         fn name(&self) -> String {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in an impl of the trait `BName2` for the type `Container2`
  --> $DIR/wrong-ambig-message.rs:26:9
   |
LL |         fn name(&self, _v: bool) -> String {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the method for candidate #1
   |
LL -     println!("c2 = {:?}", c2.name());
LL +     println!("c2 = {:?}", AName2::name(&c2));
   |
help: disambiguate the method for candidate #2
   |
LL -     println!("c2 = {:?}", c2.name());
LL +     println!("c2 = {:?}", BName2::name(&c2));
   |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0034`.