mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-27 21:24:34 +00:00
31 lines
1.0 KiB
Plaintext
31 lines
1.0 KiB
Plaintext
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`.
|