Skip to content

Commit b763f90

Browse files
committed
Remove debugging-related code
1 parent 026a673 commit b763f90

File tree

5 files changed

+4
-18
lines changed

5 files changed

+4
-18
lines changed

compiler/rustc_const_eval/src/const_eval/eval_queries.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ use crate::interpret::{
2222
RefTracking, StackPopCleanup,
2323
};
2424

25-
use tracing::info;
26-
2725
const NOTE_ON_UNDEFINED_BEHAVIOR_ERROR: &str = "The rules on what exactly is undefined behavior aren't clear, \
2826
so this check might be overzealous. Please open an issue on the rustc \
2927
repository if you believe it should not be considered undefined behavior.";
@@ -35,7 +33,6 @@ fn eval_body_using_ecx<'mir, 'tcx>(
3533
body: &'mir mir::Body<'tcx>,
3634
) -> InterpResult<'tcx, MPlaceTy<'tcx>> {
3735
debug!("eval_body_using_ecx: {:?}, {:?}", cid, ecx.param_env);
38-
info!("HERE body is {:#?}", body);
3936
let tcx = *ecx.tcx;
4037
assert!(
4138
cid.promoted.is_some()

compiler/rustc_const_eval/src/const_eval/machine.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
369369
}
370370
}
371371

372-
#[instrument(skip(ecx), ret)]
373372
fn load_mir(
374373
ecx: &InterpCx<'mir, 'tcx, Self>,
375374
instance: ty::InstanceDef<'tcx>,

compiler/rustc_const_eval/src/interpret/step.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
129129
// FIXME(#73156): Handle source code coverage in const eval
130130
Coverage(..) => {}
131131

132-
// FIXME(bryangarza): Update this to do some logic!!!
133132
ConstEvalCounter => {
134133
self.increment_const_eval_counter();
135134
}

compiler/rustc_middle/src/mir/query.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -441,14 +441,10 @@ impl<'tcx> TyCtxt<'tcx> {
441441

442442
#[inline]
443443
pub fn mir_for_ctfe_opt_const_arg(self, def: ty::WithOptConstParam<DefId>) -> &'tcx Body<'tcx> {
444-
let res = if let Some((did, param_did)) = def.as_const_arg() {
445-
info!("calling mir_for_ctfe_of_const_arg for DedId {did:?}");
444+
if let Some((did, param_did)) = def.as_const_arg() {
446445
self.mir_for_ctfe_of_const_arg((did, param_did))
447446
} else {
448-
info!("calling mir_for_ctfe for DefId {:?}", def.did);
449447
self.mir_for_ctfe(def.did)
450-
};
451-
//info!("RES OF CALLING MIR_FOR_CTFE_OPT_CONST_ARG: {:#?}", res);
452-
res
448+
}
453449
}
454450
}

compiler/rustc_mir_transform/src/lib.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -350,14 +350,11 @@ fn mir_promoted(
350350
/// Compute the MIR that is used during CTFE (and thus has no optimizations run on it)
351351
fn mir_for_ctfe(tcx: TyCtxt<'_>, def_id: DefId) -> &Body<'_> {
352352
let did = def_id.expect_local();
353-
let body = if let Some(def) = ty::WithOptConstParam::try_lookup(did, tcx) {
353+
if let Some(def) = ty::WithOptConstParam::try_lookup(did, tcx) {
354354
tcx.mir_for_ctfe_of_const_arg(def)
355355
} else {
356356
tcx.arena.alloc(inner_mir_for_ctfe(tcx, ty::WithOptConstParam::unknown(did)))
357-
};
358-
//info!("MIR_FOR_CTFE (DefId = {def_id:?}) body res: {:#?}", body);
359-
info!("MIR_FOR_CTFE (DefId = {def_id:?})");
360-
body
357+
}
361358
}
362359

363360
/// Same as `mir_for_ctfe`, but used to get the MIR of a const generic parameter.
@@ -451,7 +448,6 @@ fn mir_drops_elaborated_and_const_checked(
451448

452449
run_analysis_to_runtime_passes(tcx, &mut body);
453450

454-
//info!("MIR after runtime passes: {:#?}", body);
455451
tcx.alloc_steal_mir(body)
456452
}
457453

@@ -623,7 +619,6 @@ fn inner_optimized_mir(tcx: TyCtxt<'_>, did: LocalDefId) -> Body<'_> {
623619
let mut body = remap_mir_for_const_eval_select(tcx, body, hir::Constness::NotConst);
624620
debug!("body: {:#?}", body);
625621
run_optimization_passes(tcx, &mut body);
626-
//info!("body after OPTIMIZATION: {:#?}", body);
627622

628623
debug_assert!(!body.has_free_regions(), "Free regions in optimized MIR");
629624

0 commit comments

Comments
 (0)