rust/tests/ui/deriving/issue-19358.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
320 B
Rust
Raw Normal View History

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