]> git.proxmox.com Git - rustc.git/blob - tests/ui/deriving/issue-19358.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / deriving / issue-19358.rs
1 // run-pass
2
3 #![allow(dead_code)]
4
5 trait Trait { fn dummy(&self) { } }
6
7 #[derive(Debug)]
8 struct Foo<T: Trait> {
9 foo: T,
10 }
11
12 #[derive(Debug)]
13 struct Bar<T> where T: Trait {
14 bar: T,
15 }
16
17 impl Trait for isize {}
18
19 fn main() {
20 let a = Foo { foo: 12 };
21 let b = Bar { bar: 12 };
22 println!("{:?} {:?}", a, b);
23 }