Do not ICE on generics mismatch with non-local traits

Fixes #49841
This commit is contained in:
Shotaro Yamada 2018-04-23 13:54:09 +09:00
parent 81135c9dbc
commit 98c2e0976d
2 changed files with 12 additions and 2 deletions

View file

@ -28,4 +28,15 @@ impl Bar for () {
//~^ Error method `bar` has incompatible signature for trait
}
// With non-local trait (#49841):
use std::hash::{Hash, Hasher};
struct X;
impl Hash for X {
fn hash(&self, hasher: &mut impl Hasher) {}
//~^ Error method `hash` has incompatible signature for trait
}
fn main() {}