mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-04 02:54:00 +00:00
debug!("paramenv={}paramenv={}paramenv={}paramenv={}")
This commit is contained in:
parent
7e0241c637
commit
68405fdc2e
@ -228,6 +228,7 @@ impl<'infcx, 'tcx> InferCtxt<'infcx, 'tcx> {
|
||||
ct: &'tcx ty::Const<'tcx>,
|
||||
vid_is_expected: bool,
|
||||
) -> RelateResult<'tcx, &'tcx ty::Const<'tcx>> {
|
||||
debug!("unify_const_variable: param_env={:?}", param_env);
|
||||
let (for_universe, span) = {
|
||||
let mut inner = self.inner.borrow_mut();
|
||||
let variable_table = &mut inner.const_unification_table();
|
||||
|
@ -39,6 +39,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||
promoted: Option<mir::Promoted>,
|
||||
span: Option<Span>,
|
||||
) -> EvalToConstValueResult<'tcx> {
|
||||
debug!("const_eval_resolve: param_env={:?}", param_env);
|
||||
match ty::Instance::resolve_opt_const_arg(self, param_env, def, substs) {
|
||||
Ok(Some(instance)) => {
|
||||
let cid = GlobalId { instance, promoted };
|
||||
|
@ -353,6 +353,7 @@ impl<'tcx> Instance<'tcx> {
|
||||
def: ty::WithOptConstParam<DefId>,
|
||||
substs: SubstsRef<'tcx>,
|
||||
) -> Result<Option<Instance<'tcx>>, ErrorReported> {
|
||||
debug!("resolve_opt_const_arg: param_env={:?},substs={:?}", param_env, substs);
|
||||
// All regions in the result of this query are erased, so it's
|
||||
// fine to erase all of the input regions.
|
||||
|
||||
|
@ -14,6 +14,7 @@ fn resolve_instance<'tcx>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
key: ty::ParamEnvAnd<'tcx, (DefId, SubstsRef<'tcx>)>,
|
||||
) -> Result<Option<Instance<'tcx>>, ErrorReported> {
|
||||
debug!("resolve_instance: key = {:?}", key);
|
||||
let (param_env, (did, substs)) = key.into_parts();
|
||||
if let Some(did) = did.as_local() {
|
||||
if let Some(param_did) = tcx.opt_const_param_of(did) {
|
||||
@ -44,7 +45,7 @@ fn inner_resolve_instance<'tcx>(
|
||||
) -> Result<Option<Instance<'tcx>>, ErrorReported> {
|
||||
let (param_env, (def, substs)) = key.into_parts();
|
||||
|
||||
debug!("resolve(def={:?}, substs={:?})", def.did, substs);
|
||||
debug!("inner_resolve_instance: key={:?}", key);
|
||||
let result = if let Some(trait_def_id) = tcx.trait_of_item(def.did) {
|
||||
debug!(" => associated item, attempting to find impl in param_env {:#?}", param_env);
|
||||
let item = tcx.associated_item(def.did);
|
||||
@ -93,7 +94,10 @@ fn inner_resolve_instance<'tcx>(
|
||||
};
|
||||
Ok(Some(Instance { def, substs }))
|
||||
};
|
||||
debug!("resolve(def.did={:?}, substs={:?}) = {:?}", def.did, substs, result);
|
||||
debug!(
|
||||
"inner_resolve_instance: resolve(def.did={:?}, substs={:?}) = {:?}",
|
||||
def.did, substs, result
|
||||
);
|
||||
result
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user