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