2015-02-21 11:28:28 +00:00
|
|
|
use std::fmt::Debug;
|
2014-10-09 21:19:50 +00:00
|
|
|
use std::default::Default;
|
2014-02-04 01:31:00 +00:00
|
|
|
|
2014-10-09 21:19:50 +00:00
|
|
|
// Test that a blank impl for all T conflicts with an impl for some
|
|
|
|
// specific T.
|
2014-02-04 01:31:00 +00:00
|
|
|
|
2014-10-09 21:19:50 +00:00
|
|
|
trait MyTrait {
|
2015-01-08 11:02:42 +00:00
|
|
|
fn get(&self) -> usize;
|
2014-02-04 01:31:00 +00:00
|
|
|
}
|
|
|
|
|
2015-12-30 05:18:24 +00:00
|
|
|
impl<T> MyTrait for (T,T) {
|
2015-01-08 11:02:42 +00:00
|
|
|
fn get(&self) -> usize { 0 }
|
2014-02-04 01:31:00 +00:00
|
|
|
}
|
2014-10-09 21:19:50 +00:00
|
|
|
|
2018-12-28 23:11:13 +00:00
|
|
|
impl<A,B> MyTrait for (A,B) {
|
2019-10-26 15:28:02 +00:00
|
|
|
//~^ ERROR E0119
|
2015-01-08 11:02:42 +00:00
|
|
|
fn get(&self) -> usize { self.dummy }
|
2024-02-09 12:17:55 +00:00
|
|
|
//~^ ERROR: no field `dummy`
|
2014-10-09 21:19:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|