Skip to content

Commit a292d79

Browse files
committed
add explicit debug! in mem_categorization when it puts a TyError
in for a closure env deref rather than the proper type (so someone going through log output at least gets a hint that this is happening).
1 parent cd97d2f commit a292d79

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc/middle/mem_categorization.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,8 @@ impl<'t, 'a,'tcx> MemCategorizationContext<'t, 'a, 'tcx> {
753753
// away with stuffing a `TyError` in there
754754
// instead of bothering to construct a proper
755755
// one.
756+
debug!("env_deref constructing fake TyError for ref of {:?}",
757+
cmt_result);
756758
let cmt_result = cmt_ {
757759
mutbl: McImmutable,
758760
ty: self.tcx().types.err,

0 commit comments

Comments
 (0)