Skip to content

Commit

Permalink
Add missing newline character to callers of dumb_print
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Jan 13, 2016
1 parent 757f57b commit 98bef2b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/libstd/panicking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub fn on_panic(obj: &(Any+Send), file: &'static str, line: u32) {
// debugger provides a useable stacktrace.
if panics >= 3 {
util::dumb_print(format_args!("thread panicked while processing \
panic. aborting."));
panic. aborting.\n"));
unsafe { intrinsics::abort() }
}

Expand All @@ -232,7 +232,7 @@ pub fn on_panic(obj: &(Any+Send), file: &'static str, line: u32) {
// just abort. In the future we may consider resuming
// unwinding or otherwise exiting the thread cleanly.
util::dumb_print(format_args!("thread panicked while panicking. \
aborting."));
aborting.\n"));
unsafe { intrinsics::abort() }
}
}
4 changes: 2 additions & 2 deletions src/libstd/sys/common/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ pub fn dumb_print(args: fmt::Arguments) {
}

pub fn abort(args: fmt::Arguments) -> ! {
dumb_print(format_args!("fatal runtime error: {}", args));
dumb_print(format_args!("fatal runtime error: {}\n", args));
unsafe { intrinsics::abort(); }
}

#[allow(dead_code)] // stack overflow detection not enabled on all platforms
pub unsafe fn report_overflow() {
dumb_print(format_args!("\nthread '{}' has overflowed its stack",
dumb_print(format_args!("\nthread '{}' has overflowed its stack\n",
thread::current().name().unwrap_or("<unknown>")));
}
2 changes: 1 addition & 1 deletion src/libstd/sys/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fn oom_handler() -> ! {
// is no need to check the result of GetStdHandle.
c::WriteFile(c::GetStdHandle(c::STD_ERROR_HANDLE),
msg.as_ptr() as c::LPVOID,
msg.len() as DWORD,
msg.len() as c::DWORD,
ptr::null_mut(),
ptr::null_mut());
intrinsics::abort();
Expand Down

0 comments on commit 98bef2b

Please sign in to comment.