Use TypingEnv from MIR builder
This commit is contained in:
parent
c434b4b4b6
commit
1f352acd34
1 changed files with 1 additions and 4 deletions
|
@ -1119,10 +1119,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
region_scope: region::Scope,
|
region_scope: region::Scope,
|
||||||
local: Local,
|
local: Local,
|
||||||
) {
|
) {
|
||||||
if !self.local_decls[local].ty.has_significant_drop(self.tcx, ty::TypingEnv {
|
if !self.local_decls[local].ty.has_significant_drop(self.tcx, self.typing_env()) {
|
||||||
typing_mode: ty::TypingMode::non_body_analysis(),
|
|
||||||
param_env: self.param_env,
|
|
||||||
}) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for scope in self.scopes.scopes.iter_mut().rev() {
|
for scope in self.scopes.scopes.iter_mut().rev() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue