Handle provided trait methods when giving inference error suggestions

This fixes an ICE.  Closes issue #17758
This commit is contained in:
Brian Koropoff 2014-10-03 22:35:16 -07:00
parent 908c9e6a1b
commit 4c166abbbb

View file

@ -869,6 +869,19 @@ impl<'a, 'tcx> ErrorReporting for InferCtxt<'a, 'tcx> {
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