mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 21:15:18 +03:00
add a debug log for more MC failures
I don't see why MC should fail on well-formed code, so it might be a better idea to just add a `delay_span_bug` there (anyone remember the `cat_expr Errd` bug from the 1.0 days?). However, I don't think this is a good idea to backport a new delay_span_bug into stable and this code is going away soon-ish anyway.
This commit is contained in:
@@ -105,7 +105,10 @@
|
||||
|
||||
// a variation on try that just returns unit
|
||||
macro_rules! ignore_err {
|
||||
($e:expr) => (match $e { Ok(e) => e, Err(_) => return () })
|
||||
($e:expr) => (match $e { Ok(e) => e, Err(_) => {
|
||||
debug!("ignoring mem-categorization error!");
|
||||
return ()
|
||||
}})
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -1034,7 +1037,7 @@ fn link_pattern(&self, discr_cmt: mc::cmt<'tcx>, root_pat: &hir::Pat) {
|
||||
debug!("link_pattern(discr_cmt={:?}, root_pat={:?})",
|
||||
discr_cmt,
|
||||
root_pat);
|
||||
let _ = self.with_mc(|mc| {
|
||||
ignore_err!(self.with_mc(|mc| {
|
||||
mc.cat_pattern(discr_cmt, root_pat, |sub_cmt, sub_pat| {
|
||||
match sub_pat.node {
|
||||
// `ref x` pattern
|
||||
@@ -1051,7 +1054,7 @@ fn link_pattern(&self, discr_cmt: mc::cmt<'tcx>, root_pat: &hir::Pat) {
|
||||
_ => {}
|
||||
}
|
||||
})
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
/// Link lifetime of borrowed pointer resulting from autoref to lifetimes in the value being
|
||||
|
||||
Reference in New Issue
Block a user