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