Skip to content

Commit

Permalink
Add some debugging to help identify when errors get reported.
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jul 24, 2015
1 parent 6b49f4d commit 4172c82
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/librustc/middle/expr_use_visitor.rs
Expand Up @@ -256,7 +256,10 @@ macro_rules! return_if_err {
($inp: expr) => (
match $inp {
Ok(v) => v,
Err(()) => return
Err(()) => {
debug!("mc reported err");
return
}
}
)
}
Expand Down
8 changes: 7 additions & 1 deletion src/librustc/middle/mem_categorization.rs
Expand Up @@ -367,7 +367,13 @@ impl<'t, 'a,'tcx> MemCategorizationContext<'t, 'a, 'tcx> {
}

fn expr_ty(&self, expr: &ast::Expr) -> McResult<Ty<'tcx>> {
self.typer.node_ty(expr.id)
match self.typer.node_ty(expr.id) {
Ok(t) => Ok(t),
Err(()) => {
debug!("expr_ty({:?}) yielded Err", expr);
Err(())
}
}
}

fn expr_ty_adjusted(&self, expr: &ast::Expr) -> McResult<Ty<'tcx>> {
Expand Down

0 comments on commit 4172c82

Please sign in to comment.