Skip to content

Commit 68405fd

Browse files
committed
debug!("paramenv={}paramenv={}paramenv={}paramenv={}")
1 parent 7e0241c commit 68405fd

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

compiler/rustc_infer/src/infer/combine.rs

+1
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ impl<'infcx, 'tcx> InferCtxt<'infcx, 'tcx> {
228228
ct: &'tcx ty::Const<'tcx>,
229229
vid_is_expected: bool,
230230
) -> RelateResult<'tcx, &'tcx ty::Const<'tcx>> {
231+
debug!("unify_const_variable: param_env={:?}", param_env);
231232
let (for_universe, span) = {
232233
let mut inner = self.inner.borrow_mut();
233234
let variable_table = &mut inner.const_unification_table();

compiler/rustc_middle/src/mir/interpret/queries.rs

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ impl<'tcx> TyCtxt<'tcx> {
3939
promoted: Option<mir::Promoted>,
4040
span: Option<Span>,
4141
) -> EvalToConstValueResult<'tcx> {
42+
debug!("const_eval_resolve: param_env={:?}", param_env);
4243
match ty::Instance::resolve_opt_const_arg(self, param_env, def, substs) {
4344
Ok(Some(instance)) => {
4445
let cid = GlobalId { instance, promoted };

compiler/rustc_middle/src/ty/instance.rs

+1
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ impl<'tcx> Instance<'tcx> {
353353
def: ty::WithOptConstParam<DefId>,
354354
substs: SubstsRef<'tcx>,
355355
) -> Result<Option<Instance<'tcx>>, ErrorReported> {
356+
debug!("resolve_opt_const_arg: param_env={:?},substs={:?}", param_env, substs);
356357
// All regions in the result of this query are erased, so it's
357358
// fine to erase all of the input regions.
358359

compiler/rustc_ty_utils/src/instance.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ fn resolve_instance<'tcx>(
1414
tcx: TyCtxt<'tcx>,
1515
key: ty::ParamEnvAnd<'tcx, (DefId, SubstsRef<'tcx>)>,
1616
) -> Result<Option<Instance<'tcx>>, ErrorReported> {
17+
debug!("resolve_instance: key = {:?}", key);
1718
let (param_env, (did, substs)) = key.into_parts();
1819
if let Some(did) = did.as_local() {
1920
if let Some(param_did) = tcx.opt_const_param_of(did) {
@@ -44,7 +45,7 @@ fn inner_resolve_instance<'tcx>(
4445
) -> Result<Option<Instance<'tcx>>, ErrorReported> {
4546
let (param_env, (def, substs)) = key.into_parts();
4647

47-
debug!("resolve(def={:?}, substs={:?})", def.did, substs);
48+
debug!("inner_resolve_instance: key={:?}", key);
4849
let result = if let Some(trait_def_id) = tcx.trait_of_item(def.did) {
4950
debug!(" => associated item, attempting to find impl in param_env {:#?}", param_env);
5051
let item = tcx.associated_item(def.did);
@@ -93,7 +94,10 @@ fn inner_resolve_instance<'tcx>(
9394
};
9495
Ok(Some(Instance { def, substs }))
9596
};
96-
debug!("resolve(def.did={:?}, substs={:?}) = {:?}", def.did, substs, result);
97+
debug!(
98+
"inner_resolve_instance: resolve(def.did={:?}, substs={:?}) = {:?}",
99+
def.did, substs, result
100+
);
97101
result
98102
}
99103

0 commit comments

Comments
 (0)