mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 13:40:15 +03:00
Handle provided trait methods when giving inference error suggestions
This fixes an ICE. Closes issue #17758
This commit is contained in:
@@ -869,6 +869,19 @@ fn give_suggestion(&self, same_regions: &[SameRegions]) {
|
||||
ast::TypeImplItem(_) => None,
|
||||
}
|
||||
},
|
||||
ast_map::NodeTraitItem(ref item) => {
|
||||
match **item {
|
||||
ast::ProvidedMethod(ref m) => {
|
||||
Some((m.pe_fn_decl(),
|
||||
m.pe_generics(),
|
||||
m.pe_fn_style(),
|
||||
m.pe_ident(),
|
||||
Some(&m.pe_explicit_self().node),
|
||||
m.span))
|
||||
}
|
||||
_ => None
|
||||
}
|
||||
}
|
||||
_ => None
|
||||
},
|
||||
None => None
|
||||
|
||||
Reference in New Issue
Block a user