]> git.lizzy.rs Git - rust.git/blob - tests/ui/methods/method-ambig-two-traits-cross-crate.rs
fn-trait-closure test now pass on new solver
[rust.git] / tests / ui / methods / method-ambig-two-traits-cross-crate.rs
1 // Test an ambiguity scenario where one copy of the method is available
2 // from a trait imported from another crate.
3
4 // aux-build:ambig_impl_2_lib.rs
5 extern crate ambig_impl_2_lib;
6 use ambig_impl_2_lib::Me;
7 trait Me2 {
8     fn me(&self) -> usize;
9 }
10 impl Me2 for usize { fn me(&self) -> usize { *self } }
11 fn main() { 1_usize.me(); } //~ ERROR E0034