diff options
Diffstat (limited to 'tests/ui/deriving/issue-19358.rs')
-rw-r--r-- | tests/ui/deriving/issue-19358.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/deriving/issue-19358.rs b/tests/ui/deriving/issue-19358.rs new file mode 100644 index 000000000..3970a4155 --- /dev/null +++ b/tests/ui/deriving/issue-19358.rs @@ -0,0 +1,23 @@ +// run-pass + +#![allow(dead_code)] + +trait Trait { fn dummy(&self) { } } + +#[derive(Debug)] +struct Foo<T: Trait> { + foo: T, +} + +#[derive(Debug)] +struct Bar<T> where T: Trait { + bar: T, +} + +impl Trait for isize {} + +fn main() { + let a = Foo { foo: 12 }; + let b = Bar { bar: 12 }; + println!("{:?} {:?}", a, b); +} |