Skip to content

Commit 98bef2b

Browse files
committed
Add missing newline character to callers of dumb_print
1 parent 757f57b commit 98bef2b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/libstd/panicking.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ pub fn on_panic(obj: &(Any+Send), file: &'static str, line: u32) {
206206
// debugger provides a useable stacktrace.
207207
if panics >= 3 {
208208
util::dumb_print(format_args!("thread panicked while processing \
209-
panic. aborting."));
209+
panic. aborting.\n"));
210210
unsafe { intrinsics::abort() }
211211
}
212212

@@ -232,7 +232,7 @@ pub fn on_panic(obj: &(Any+Send), file: &'static str, line: u32) {
232232
// just abort. In the future we may consider resuming
233233
// unwinding or otherwise exiting the thread cleanly.
234234
util::dumb_print(format_args!("thread panicked while panicking. \
235-
aborting."));
235+
aborting.\n"));
236236
unsafe { intrinsics::abort() }
237237
}
238238
}

src/libstd/sys/common/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ pub fn dumb_print(args: fmt::Arguments) {
3535
}
3636

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

4242
#[allow(dead_code)] // stack overflow detection not enabled on all platforms
4343
pub unsafe fn report_overflow() {
44-
dumb_print(format_args!("\nthread '{}' has overflowed its stack",
44+
dumb_print(format_args!("\nthread '{}' has overflowed its stack\n",
4545
thread::current().name().unwrap_or("<unknown>")));
4646
}

src/libstd/sys/windows/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fn oom_handler() -> ! {
5353
// is no need to check the result of GetStdHandle.
5454
c::WriteFile(c::GetStdHandle(c::STD_ERROR_HANDLE),
5555
msg.as_ptr() as c::LPVOID,
56-
msg.len() as DWORD,
56+
msg.len() as c::DWORD,
5757
ptr::null_mut(),
5858
ptr::null_mut());
5959
intrinsics::abort();

0 commit comments

Comments
 (0)