]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/explicit_auto_deref.fixed
Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup
[rust.git] / src / tools / clippy / tests / ui / explicit_auto_deref.fixed
index d1d35e5c0eb46f493aaa3c7b07fdda965be3bef4..59ff5e4040a3d6b67443d71ea52f6f8b1eb13ba4 100644 (file)
@@ -266,4 +266,15 @@ fn main() {
         }
         x
     };
+
+    trait WithAssoc {
+        type Assoc: ?Sized;
+    }
+    impl WithAssoc for String {
+        type Assoc = str;
+    }
+    fn takes_assoc<T: WithAssoc>(_: &T::Assoc) -> T {
+        unimplemented!()
+    }
+    let _: String = takes_assoc(&*String::new());
 }