Skip to content

Commit 4172c82

Browse files
committed
Add some debugging to help identify when errors get reported.
1 parent 6b49f4d commit 4172c82

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/librustc/middle/expr_use_visitor.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,10 @@ macro_rules! return_if_err {
256256
($inp: expr) => (
257257
match $inp {
258258
Ok(v) => v,
259-
Err(()) => return
259+
Err(()) => {
260+
debug!("mc reported err");
261+
return
262+
}
260263
}
261264
)
262265
}

src/librustc/middle/mem_categorization.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,13 @@ impl<'t, 'a,'tcx> MemCategorizationContext<'t, 'a, 'tcx> {
367367
}
368368

369369
fn expr_ty(&self, expr: &ast::Expr) -> McResult<Ty<'tcx>> {
370-
self.typer.node_ty(expr.id)
370+
match self.typer.node_ty(expr.id) {
371+
Ok(t) => Ok(t),
372+
Err(()) => {
373+
debug!("expr_ty({:?}) yielded Err", expr);
374+
Err(())
375+
}
376+
}
371377
}
372378

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

0 commit comments

Comments
 (0)