Rollup merge of #50227 - sinkuu:ice_non_local_trait, r=estebank
Fix ICE with erroneous `impl Trait` in a trait impl Fixes #49841.
This commit is contained in:
commit
3f4e5b28b9
2 changed files with 12 additions and 2 deletions
|
|
@ -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() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue