提交 15101c8e 编写于 作者: E Ellen

remove debug stmts

上级 1f57f8b9
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册