Add some debugging to help identify when errors get reported.

This commit is contained in:
Niko Matsakis 2015-07-17 08:21:11 -04:00
parent 6b49f4ded7
commit 4172c8237b
2 changed files with 11 additions and 2 deletions

View file

@ -256,7 +256,10 @@ macro_rules! return_if_err {
($inp: expr) => (
match $inp {
Ok(v) => v,
Err(()) => return
Err(()) => {
debug!("mc reported err");
return
}
}
)
}

View file

@ -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>> {