]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/impl-trait/impl-generic-mismatch.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / impl-trait / impl-generic-mismatch.rs
index ba678bb032dcb4b931c95a23f9aa96d25a03ced6..fb8bde0d08131b34ef7d50adf5b99afdacadbf1b 100644 (file)
@@ -18,6 +18,15 @@ impl Bar for () {
     //~^ Error method `bar` has incompatible signature for trait
 }
 
+trait Baz {
+    fn baz<U: Debug, T: Debug>(&self, _: &U, _: &T);
+}
+
+impl Baz for () {
+    fn baz<T: Debug>(&self, _: &impl Debug, _: &T) { }
+    //~^ Error method `baz` has incompatible signature for trait
+}
+
 // With non-local trait (#49841):
 
 use std::hash::{Hash, Hasher};