diff --git a/compiler/rustc_mir_build/src/build/mod.rs b/compiler/rustc_mir_build/src/build/mod.rs index 390ce59cb489c6abd5f6f59ee8ba8d270a78b0b5..e931c686dde593c0f4fd9a8371eb334d169e1381 100644 --- a/compiler/rustc_mir_build/src/build/mod.rs +++ b/compiler/rustc_mir_build/src/build/mod.rs @@ -28,7 +28,6 @@ if let Some(def) = def.try_upgrade(tcx) { return tcx.mir_built(def); } - debug!("mir_built: def={:?}", def); let mut body = mir_build(tcx, def); if def.const_param_did.is_some() { @@ -41,7 +40,6 @@ /// Construct the MIR for a given `DefId`. fn mir_build(tcx: TyCtxt<'_>, def: ty::WithOptConstParam) -> Body<'_> { - debug!("mir_build: def={:?}", def); let id = tcx.hir().local_def_id_to_hir_id(def.did); let body_owner_kind = tcx.hir().body_owner_kind(id); let typeck_results = tcx.typeck_opt_const_arg(def); diff --git a/compiler/rustc_mir_build/src/thir/cx/expr.rs b/compiler/rustc_mir_build/src/thir/cx/expr.rs index 70a5a9286b0b3c7cf93951eba51e256f6313a34c..66005be05df75683ba3427c2c9719262317287fc 100644 --- a/compiler/rustc_mir_build/src/thir/cx/expr.rs +++ b/compiler/rustc_mir_build/src/thir/cx/expr.rs @@ -149,9 +149,7 @@ fn apply_adjustment( } fn make_mirror_unadjusted(&mut self, expr: &'tcx hir::Expr<'tcx>) -> Expr<'tcx> { - debug!("Expr::make_mirror_unadjusted: expr={:?}", expr); let expr_ty = self.typeck_results().expr_ty(expr); - debug!("Expr::make_mirror_unadjusted: expr_ty={:?}", expr_ty); let temp_lifetime = self.region_scope_tree.temporary_scope(expr.hir_id.local_id); let kind = match expr.kind { @@ -764,7 +762,6 @@ fn make_mirror_unadjusted(&mut self, expr: &'tcx hir::Expr<'tcx>) -> Expr<'tcx> hir::ExprKind::Err => unreachable!(), }; - debug!("Expr::make_mirror_unadjusted: finish"); Expr { temp_lifetime, ty: expr_ty, span: expr.span, kind } } diff --git a/compiler/rustc_mir_build/src/thir/cx/mod.rs b/compiler/rustc_mir_build/src/thir/cx/mod.rs index 5310efbccd655d2e0ad3569e02ecc64f5c3e7e29..5059dd939d92d7ce005e1473c8cbbee263ba6d28 100644 --- a/compiler/rustc_mir_build/src/thir/cx/mod.rs +++ b/compiler/rustc_mir_build/src/thir/cx/mod.rs @@ -20,7 +20,6 @@ tcx: TyCtxt<'tcx>, owner_def: ty::WithOptConstParam, ) -> (&'tcx Steal>, ExprId) { - debug!("thir_body: {:?}", owner_def); let hir = tcx.hir(); let body = hir.body(hir.body_owned_by(hir.local_def_id_to_hir_id(owner_def.did))); let mut cx = Cx::new(tcx, owner_def); diff --git a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs index c47b0c31ca01c09db8a2fdfc64a88105443d4aee..4251dc5e93904fac32c29e21237920aba9127193 100644 --- a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs +++ b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs @@ -435,9 +435,8 @@ pub(super) fn mir_abstract_const<'tcx>( DefKind::AnonConst => (), _ => return Ok(None), } - debug!("mir_abstract_const: {:?}", def); + let body = tcx.thir_body(def); - if body.0.borrow().exprs.is_empty() { // type error in constant, there is no thir return Err(ErrorReported);