Skip to content

Commit

Permalink
Do not run check on foreign items.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Jan 5, 2024
1 parent 7366bda commit 6dfdeab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/collect/type_of/opaque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ impl<'tcx> intravisit::Visitor<'tcx> for TaitConstraintLocator<'tcx> {
fn visit_foreign_item(&mut self, it: &'tcx hir::ForeignItem<'tcx>) {
trace!(?it.owner_id);
assert_ne!(it.owner_id.def_id, self.def_id);
self.check(it.owner_id.def_id);
// No need to call `check`, as we do not run borrowck on foreign items.
intravisit::walk_foreign_item(self, it);
}
}
Expand Down

0 comments on commit 6dfdeab

Please sign in to comment.