2014-10-17 13:13:12 +00:00
|
|
|
// Test an ambiguity scenario where one copy of the method is available
|
|
|
|
// from a trait imported from another crate.
|
|
|
|
|
2012-05-03 04:14:26 +00:00
|
|
|
// aux-build:ambig_impl_2_lib.rs
|
2014-02-14 18:10:06 +00:00
|
|
|
extern crate ambig_impl_2_lib;
|
2018-12-17 03:21:47 +00:00
|
|
|
use ambig_impl_2_lib::Me;
|
|
|
|
trait Me2 {
|
2015-01-08 11:02:42 +00:00
|
|
|
fn me(&self) -> usize;
|
2012-07-11 22:00:40 +00:00
|
|
|
}
|
2018-12-17 03:21:47 +00:00
|
|
|
impl Me2 for usize { fn me(&self) -> usize { *self } }
|
2015-02-18 10:42:01 +00:00
|
|
|
fn main() { 1_usize.me(); } //~ ERROR E0034
|