]> git.proxmox.com Git - rustc.git/blobdiff - src/test/run-pass/cycle-trait-type-trait.rs
Imported Upstream version 1.7.0+dfsg1
[rustc.git] / src / test / run-pass / cycle-trait-type-trait.rs
index 50bc9e971fbe587ade419de60ad3a7b6cbbdf8af..4ae5c599b43ddeb5e71b4bfc0c819c8a9010db04 100644 (file)
@@ -22,4 +22,12 @@ trait Get<A> {
 
 struct Struct<C:Chromosome> { c: C }
 
+impl Chromosome for i32 { }
+
+impl Get<Struct<i32>> for i32 {
+    fn get(&self) -> Struct<i32> {
+        Struct { c: *self }
+    }
+}
+
 fn main() { }