]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/impl.rs
Tidy up and pass tests
[rust.git] / tests / target / impl.rs
index 5dde5ee73826d9d6c4c2f4471c41f363ad5980ff..5895c74bcc9f1d5dcff6a118e8778ac25c0e6fa8 100644 (file)
@@ -5,3 +5,39 @@
 impl<K, V, NodeRef: Deref<Target = Node<K, V>>> Handle<NodeRef, handle::Edge, handle::Internal> {
     // Keep this.
 }
+
+impl<V> Test<V>
+where
+    V: Clone, // This comment is NOT removed by formating!
+{
+    pub fn new(value: V) -> Self {
+        Test {
+            cloned_value: value.clone(),
+            value,
+        }
+    }
+}
+
+impl X<T> /* comment */ {}
+impl Y<T> // comment
+{
+}
+
+impl<T> Foo for T
+// comment1
+where
+    // comment2
+    // blah
+    T: Clone,
+{
+}
+
+// #1823
+default impl Trait for X {}
+default unsafe impl Trait for Y {}
+pub default unsafe impl Trait for Z {}
+
+// #2212
+impl ConstWithDefault {
+    default const CAN_RECONSTRUCT_QUERY_KEY: bool = false;
+}