Closed
Description
struct S<T>(T);
trait Tr {}
impl<T: Tr> S<T> {
fn call(&self, arg: u8) {}
}
impl S<()> {
fn call(&self) {}
}
fn main() {
S(()).call();
}
This gets a false-positive mismatched-arg-count
diagnostic, because we choose the first impl
block (despite the missing (): Tr
impl), while the second one is actually correct.
This causes issues when using wasmer or wasm3, since they expose function handles with impls like these.