Revert "Auto merge of #91354 - fee1-dead:const_env, r=spastorino"
This reverts commit18bb8c61a9, reversing changes made tod9baa36190.
This commit is contained in:
@@ -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)
|
||||
});
|
||||
|
||||
|
||||
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user