Review comments
This commit is contained in:
parent
7f92eab3c4
commit
e267fb4ede
@ -115,8 +115,9 @@ pub fn report_error<'tcx, 'mir>(
|
||||
|
||||
e.print_backtrace();
|
||||
let msg = e.to_string();
|
||||
let result = report_msg(ecx, &format!("{}: {}", title, msg), msg, helps, true);
|
||||
report_msg(ecx, &format!("{}: {}", title, msg), msg, helps, true);
|
||||
|
||||
// Extra output to help debug specific issues.
|
||||
if let UndefinedBehavior(UndefinedBehaviorInfo::InvalidUndefBytes(Some(ptr))) = e.kind {
|
||||
eprintln!(
|
||||
"Uninitialized read occurred at offset 0x{:x} into this allocation:",
|
||||
@ -126,7 +127,7 @@ pub fn report_error<'tcx, 'mir>(
|
||||
eprintln!();
|
||||
}
|
||||
|
||||
result
|
||||
None
|
||||
}
|
||||
|
||||
/// Report an error or note (depending on the `error` argument) at the current frame's current statement.
|
||||
@ -137,7 +138,7 @@ fn report_msg<'tcx, 'mir>(
|
||||
span_msg: String,
|
||||
mut helps: Vec<String>,
|
||||
error: bool,
|
||||
) -> Option<i64> {
|
||||
) {
|
||||
let span = if let Some(frame) = ecx.machine.stack.last() {
|
||||
frame.current_source_info().unwrap().span
|
||||
} else {
|
||||
@ -178,8 +179,6 @@ fn report_msg<'tcx, 'mir>(
|
||||
trace!(" local {}: {:?}", i, local.value);
|
||||
}
|
||||
}
|
||||
// Let the reported error determine the return code.
|
||||
return None;
|
||||
}
|
||||
|
||||
thread_local! {
|
||||
|
Loading…
Reference in New Issue
Block a user