Skip to content

Commit e267fb4

Browse files
committed
Review comments
1 parent 7f92eab commit e267fb4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/diagnostics.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ pub fn report_error<'tcx, 'mir>(
115115

116116
e.print_backtrace();
117117
let msg = e.to_string();
118-
let result = report_msg(ecx, &format!("{}: {}", title, msg), msg, helps, true);
118+
report_msg(ecx, &format!("{}: {}", title, msg), msg, helps, true);
119119

120+
// Extra output to help debug specific issues.
120121
if let UndefinedBehavior(UndefinedBehaviorInfo::InvalidUndefBytes(Some(ptr))) = e.kind {
121122
eprintln!(
122123
"Uninitialized read occurred at offset 0x{:x} into this allocation:",
@@ -126,7 +127,7 @@ pub fn report_error<'tcx, 'mir>(
126127
eprintln!();
127128
}
128129

129-
result
130+
None
130131
}
131132

132133
/// 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>(
137138
span_msg: String,
138139
mut helps: Vec<String>,
139140
error: bool,
140-
) -> Option<i64> {
141+
) {
141142
let span = if let Some(frame) = ecx.machine.stack.last() {
142143
frame.current_source_info().unwrap().span
143144
} else {
@@ -178,8 +179,6 @@ fn report_msg<'tcx, 'mir>(
178179
trace!(" local {}: {:?}", i, local.value);
179180
}
180181
}
181-
// Let the reported error determine the return code.
182-
return None;
183182
}
184183

185184
thread_local! {

0 commit comments

Comments
 (0)