2018-12-28 17:11:13 -06:00
|
|
|
// revisions: old re
|
|
|
|
|
|
|
|
#![cfg_attr(re, feature(re_rebalance_coherence))]
|
|
|
|
|
2015-02-21 05:28:28 -06:00
|
|
|
use std::fmt::Debug;
|
2014-10-09 16:19:50 -05:00
|
|
|
use std::default::Default;
|
2014-02-03 19:31:00 -06:00
|
|
|
|
2014-10-09 16:19:50 -05:00
|
|
|
// Test that a blank impl for all T conflicts with an impl for some
|
|
|
|
// specific T, even when there are multiple type parameters involved.
|
2014-02-03 19:31:00 -06:00
|
|
|
|
2014-10-09 16:19:50 -05:00
|
|
|
trait MyTrait<T> {
|
|
|
|
fn get(&self) -> T;
|
2014-02-03 19:31:00 -06:00
|
|
|
}
|
|
|
|
|
2015-12-29 23:18:24 -06:00
|
|
|
impl<T> MyTrait<T> for T {
|
2014-10-09 16:19:50 -05:00
|
|
|
fn get(&self) -> T {
|
2014-10-09 14:17:22 -05:00
|
|
|
panic!()
|
2014-10-09 16:19:50 -05:00
|
|
|
}
|
2014-02-03 19:31:00 -06:00
|
|
|
}
|
2014-10-09 16:19:50 -05:00
|
|
|
|
2014-12-30 22:32:49 -06:00
|
|
|
#[derive(Clone)]
|
2014-10-09 16:19:50 -05:00
|
|
|
struct MyType {
|
2015-01-08 05:02:42 -06:00
|
|
|
dummy: usize
|
2014-10-09 16:19:50 -05:00
|
|
|
}
|
|
|
|
|
2018-12-28 17:11:13 -06:00
|
|
|
impl MyTrait<MyType> for MyType {
|
|
|
|
//[old]~^ ERROR E0119
|
|
|
|
//[re]~^^ ERROR E0119
|
2015-01-08 05:02:42 -06:00
|
|
|
fn get(&self) -> usize { (*self).clone() }
|
2014-10-09 16:19:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|