]> git.lizzy.rs Git - rust.git/blob - src/test/ui/methods/method-ambig-two-traits-with-default-method.rs
move an `assert!` to the right place
[rust.git] / src / test / ui / methods / method-ambig-two-traits-with-default-method.rs
1 // Test that we correctly report an ambiguity where two applicable traits
2 // are in scope and the method being invoked is a default method not
3 // defined directly in the impl.
4
5 trait Foo { fn method(&self) {} }
6 trait Bar { fn method(&self) {} }
7
8 impl Foo for usize {}
9 impl Bar for usize {}
10
11 fn main() {
12     1_usize.method(); //~ ERROR E0034
13 }