thir building: use typing_env directly
This commit is contained in:
parent
0f8405f702
commit
f4b516b10c
5 changed files with 32 additions and 67 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue