blob: 47323d3096f3da4b8d83b7de32b189099f48af81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#![feature(specialization)]
#![allow(incomplete_features)]
struct MyStruct {}
trait MyTrait {
type MyType: Default;
}
impl MyTrait for i32 {
default type MyType = MyStruct;
//~^ ERROR: the trait bound `MyStruct: std::default::Default` is not satisfied
}
fn main() {
let _x: <i32 as MyTrait>::MyType = <i32 as MyTrait>::MyType::default();
}
|