remove debug stmts
This commit is contained in:
parent
1f57f8b903
commit
15101c8e95
@ -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<LocalDefId>) -> 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);
|
||||
|
@ -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 }
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
tcx: TyCtxt<'tcx>,
|
||||
owner_def: ty::WithOptConstParam<LocalDefId>,
|
||||
) -> (&'tcx Steal<Thir<'tcx>>, 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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user