2016-08-03 23:51:52 +00:00
|
|
|
trait T1 {}
|
|
|
|
trait T2 {}
|
|
|
|
|
|
|
|
trait Foo {
|
2017-12-10 21:12:25 +00:00
|
|
|
type A: T1;
|
2016-08-03 23:51:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
trait Bar : Foo {
|
2017-12-10 21:12:25 +00:00
|
|
|
type A: T2;
|
2016-08-03 23:51:52 +00:00
|
|
|
fn do_something() {
|
2016-08-17 22:43:18 +00:00
|
|
|
let _: Self::A;
|
2016-08-17 22:07:24 +00:00
|
|
|
//~^ ERROR E0221
|
2016-10-23 18:53:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
trait T3 {}
|
|
|
|
|
|
|
|
trait My : std::str::FromStr {
|
2017-12-10 21:12:25 +00:00
|
|
|
type Err: T3;
|
2016-10-23 18:53:31 +00:00
|
|
|
fn test() {
|
|
|
|
let _: Self::Err;
|
|
|
|
//~^ ERROR E0221
|
2016-08-03 23:51:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|