1
Fork 0

Return a LocalDefId in get_parent_item.

This commit is contained in:
Camille GILLOT 2021-10-21 19:41:47 +02:00
parent 5a123c265b
commit 60064726ae
51 changed files with 151 additions and 140 deletions

View file

@ -629,7 +629,7 @@ impl<'tcx> Visitor<'tcx> for MissingStabilityAnnotations<'tcx> {
}
fn visit_impl_item(&mut self, ii: &'tcx hir::ImplItem<'tcx>) {
let impl_def_id = self.tcx.hir().local_def_id(self.tcx.hir().get_parent_item(ii.hir_id()));
let impl_def_id = self.tcx.hir().get_parent_item(ii.hir_id());
if self.tcx.impl_trait_ref(impl_def_id).is_none() {
self.check_missing_stability(ii.def_id, ii.span);
}