Revert "Auto merge of #91354 - fee1-dead:const_env, r=spastorino"

This reverts commit 18bb8c61a9, reversing
changes made to d9baa36190.
This commit is contained in:
Santiago Pastorino 2021-12-03 10:11:21 -03:00
parent 3e21768a0a
commit 85b723c4e6
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
49 changed files with 428 additions and 376 deletions

View file

@ -817,7 +817,8 @@ impl Visitor<'tcx> for Checker<'mir, 'tcx> {
);
let implsrc = tcx.infer_ctxt().enter(|infcx| {
let mut selcx = SelectionContext::new(&infcx);
let mut selcx =
SelectionContext::with_constness(&infcx, hir::Constness::Const);
selcx.select(&obligation)
});

View file

@ -3,6 +3,7 @@
//! See the `Qualif` trait for more info.
use rustc_errors::ErrorReported;
use rustc_hir as hir;
use rustc_infer::infer::TyCtxtInferExt;
use rustc_middle::mir::*;
use rustc_middle::ty::{self, subst::SubstsRef, AdtDef, Ty};
@ -166,7 +167,7 @@ impl Qualif for NeedsNonConstDrop {
);
let implsrc = cx.tcx.infer_ctxt().enter(|infcx| {
let mut selcx = SelectionContext::new(&infcx);
let mut selcx = SelectionContext::with_constness(&infcx, hir::Constness::Const);
selcx.select(&obligation)
});
!matches!(