2014-02-07 13:08:32 -06:00
|
|
|
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
2012-12-10 19:32:48 -06:00
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
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;
|
2012-09-05 14:32:05 -05:00
|
|
|
use ambig_impl_2_lib::me;
|
2014-08-12 22:31:30 -05:00
|
|
|
trait me2 {
|
2015-01-08 05:02:42 -06:00
|
|
|
fn me(&self) -> usize;
|
2012-07-11 17:00:40 -05:00
|
|
|
}
|
2015-01-08 05:02:42 -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
|