1
Fork 0

thir building: use typing_env directly

This commit is contained in:
lcnr 2024-11-22 12:17:50 +01:00
parent 0f8405f702
commit f4b516b10c
5 changed files with 32 additions and 67 deletions

View file

@ -595,7 +595,7 @@ impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for NonExhaustivePatternsTypeNo
}
if let ty::Ref(_, sub_ty, _) = self.ty.kind() {
if !sub_ty.is_inhabited_from(self.cx.tcx, self.cx.module, self.cx.typing_env()) {
if !sub_ty.is_inhabited_from(self.cx.tcx, self.cx.module, self.cx.typing_env) {
diag.note(fluent::mir_build_reference_note);
}
}