]> git.lizzy.rs Git - rust.git/blobdiff - tests/source/trait.rs
Update tests
[rust.git] / tests / source / trait.rs
index 5e7a0c78ba70cfe0b921ab12276c8c453d64dd15..7ed858a9ca6c9123216e039c225f978b2f27b55f 100644 (file)
@@ -35,3 +35,25 @@ trait TraitWithExpr {
 trait Test {
     fn read_struct<T, F>(&mut self, s_name: &str, len: usize, f: F) -> Result<T, Self::Error> where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
 }
+
+trait T<> {}
+
+trait Foo { type Bar: Baz; type Inner: Foo   = Box< Foo >; }
+
+trait ConstCheck<T>:Foo   where   T: Baz { 
+        const   J:   i32;
+}
+
+trait Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttt<T> 
+    where T: Foo {}
+
+trait Ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt<T> where T: Foo {}
+
+trait FooBar<T> : Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt where J: Bar { fn test(); }
+
+trait WhereList<T, J> where T: Foo, J: Bar {}
+
+trait X /* comment */ {}
+trait Y // comment
+{
+}