rust/src/test/ui/issues/issue-19358.rs

21 lines
297 B
Rust
Raw Normal View History

// run-pass
trait Trait { fn dummy(&self) { } }
2015-01-28 13:34:18 +00:00
#[derive(Debug)]
struct Foo<T: Trait> {
foo: T,
}
2015-01-28 13:34:18 +00:00
#[derive(Debug)]
struct Bar<T> where T: Trait {
bar: T,
}
impl Trait for isize {}
fn main() {
2015-01-25 21:05:03 +00:00
let a = Foo { foo: 12 };
let b = Bar { bar: 12 };
println!("{:?} {:?}", a, b);
}