]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/impls.rs
Fix up tests for empty impls
[rust.git] / tests / target / impls.rs
index e0070adcad4d87b86e4e62b7deef3aef93ad2e9b..390f1a12cd3090eccebfcf4421dd4d46561966fd 100644 (file)
@@ -48,11 +48,7 @@ fn foo() {
     }
 }
 
-impl<T> Foo for Bar<T>
-where
-    T: Baz,
-{
-}
+impl<T> Foo for Bar<T> where T: Baz {}
 
 impl<T> Foo for Bar<T>
 where
@@ -78,7 +74,6 @@ fn foo() {}
     }
 }
 
-
 mod b {
     mod a {
         impl Foo {
@@ -134,20 +129,16 @@ fn eq(&self, other: &Self) {
         }
     }
 
-    impl<T> PartialEq for S<T>
-    where
-        T: PartialEq,
-    {
-    }
+    impl<T> PartialEq for S<T> where T: PartialEq {}
 }
 
 impl<BorrowType, K, V, NodeType, HandleType>
-    Handle<NodeRef<BorrowType, K, V, NodeType>, HandleType> {
-}
+    Handle<NodeRef<BorrowType, K, V, NodeType>, HandleType>
+{}
 
 impl<BorrowType, K, V, NodeType, HandleType> PartialEq
-    for Handle<NodeRef<BorrowType, K, V, NodeType>, HandleType> {
-}
+    for Handle<NodeRef<BorrowType, K, V, NodeType>, HandleType>
+{}
 
 mod x {
     impl<A, B, C, D> Foo
@@ -156,12 +147,12 @@ impl<A, B, C, D> Foo
         B: 'static,
         C: 'static,
         D: 'static,
-    {
-    }
+    {}
 }
 
 impl<ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNodeFoo>
-    Issue1249<ConcreteThreadSafeLayoutNode> {
+    Issue1249<ConcreteThreadSafeLayoutNode>
+{
     // Creates a new flow constructor.
     fn foo() {}
 }
@@ -172,8 +163,8 @@ fn drop() {}
 }
 
 // #1168
-pub trait Number
-    Copy
+pub trait Number:
+    Copy
     + Eq
     + Not<Output = Self>
     + Shl<u8, Output = Self>
@@ -181,14 +172,15 @@ pub trait Number
     + BitAnd<Self, Output = Self>
     + BitOr<Self, Output = Self>
     + BitAndAssign
-    + BitOrAssign {
+    + BitOrAssign
+{
     // test
     fn zero() -> Self;
 }
 
 // #1642
-pub trait SomeTrait
-    Clone
+pub trait SomeTrait:
+    Clone
     + Eq
     + PartialEq
     + Ord
@@ -199,7 +191,8 @@ pub trait SomeTrait
     + Display
     + Write
     + Read
-    + FromStr {
+    + FromStr
+{
     // comment
 }
 
@@ -215,3 +208,25 @@ fn f(
         1
     }
 }
+
+// #2491
+impl<'a, 'b, 'c> SomeThing<Something>
+    for (
+        &'a mut SomethingLong,
+        &'b mut SomethingLong,
+        &'c mut SomethingLong,
+    )
+{
+    fn foo() {}
+}
+
+// #2746
+impl<'seq1, 'seq2, 'body, 'scope, Channel>
+    Adc12<
+        Dual,
+        MasterRunningDma<'seq1, 'body, 'scope, Channel>,
+        SlaveRunningDma<'seq2, 'body, 'scope>,
+    >
+where
+    Channel: DmaChannel,
+{}