2015-04-17 22:12:20 -07:00
|
|
|
trait Foo {
|
2015-01-01 11:16:44 -05:00
|
|
|
type Item;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct X;
|
|
|
|
|
|
|
|
impl Foo for X {
|
|
|
|
type Item = bool;
|
|
|
|
}
|
|
|
|
|
2015-03-16 18:45:01 +02:00
|
|
|
fn print_x(_: &Foo<Item=bool>, extra: &str) {
|
2015-01-01 11:16:44 -05:00
|
|
|
println!("{}", extra);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2016-08-04 08:28:48 -04:00
|
|
|
print_x(X);
|
2016-12-01 16:33:48 -08:00
|
|
|
//~^ ERROR E0061
|
2015-01-01 11:16:44 -05:00
|
|
|
}
|