thir building: use typing_env directly
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user