2014-10-17 08:13:12 -05:00
|
|
|
// Test that we correctly report an ambiguity where two applicable traits
|
|
|
|
// are in scope and the method being invoked is a default method not
|
|
|
|
// defined directly in the impl.
|
|
|
|
|
|
|
|
trait Foo { fn method(&self) {} }
|
|
|
|
trait Bar { fn method(&self) {} }
|
2013-10-03 11:10:28 -05:00
|
|
|
|
2015-01-08 05:02:42 -06:00
|
|
|
impl Foo for usize {}
|
|
|
|
impl Bar for usize {}
|
2013-10-03 11:10:28 -05:00
|
|
|
|
|
|
|
fn main() {
|
2015-02-18 04:42:01 -06:00
|
|
|
1_usize.method(); //~ ERROR E0034
|
2013-10-03 11:10:28 -05:00
|
|
|
}
|