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