Skip to content

Commit a61537f

Browse files
occured -> occurred
1 parent b4641b2 commit a61537f

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

compiler/rustc_middle/src/mir/terminator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ impl<O> AssertKind<O> {
272272
"\"misaligned pointer dereference: address must be a multiple of {{}} but is {{}}\", {required:?}, {found:?}"
273273
)
274274
}
275-
NullPointerDereference => write!(f, "\"null pointer dereference occured\""),
275+
NullPointerDereference => write!(f, "\"null pointer dereference occurred\""),
276276
ResumedAfterReturn(CoroutineKind::Coroutine(_)) => {
277277
write!(f, "\"coroutine resumed after completion\"")
278278
}

compiler/stable_mir/src/mir/body.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ impl AssertMessage {
307307
AssertMessage::MisalignedPointerDereference { .. } => {
308308
Ok("misaligned pointer dereference")
309309
}
310-
AssertMessage::NullPointerDereference => Ok("null pointer dereference occured"),
310+
AssertMessage::NullPointerDereference => Ok("null pointer dereference occurred"),
311311
}
312312
}
313313
}

compiler/stable_mir/src/mir/pretty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ fn pretty_assert_message<W: Write>(writer: &mut W, msg: &AssertMessage) -> io::R
299299
)
300300
}
301301
AssertMessage::NullPointerDereference => {
302-
write!(writer, "\"null pointer dereference occured.\"")
302+
write!(writer, "\"null pointer dereference occurred\"")
303303
}
304304
AssertMessage::ResumedAfterReturn(_) | AssertMessage::ResumedAfterPanic(_) => {
305305
write!(writer, "{}", msg.description().unwrap())

library/core/src/panicking.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ fn panic_null_pointer_dereference() -> ! {
302302
}
303303

304304
panic_nounwind_fmt(
305-
format_args!("null pointer dereference occured"),
305+
format_args!("null pointer dereference occurred"),
306306
/* force_no_backtrace */ false,
307307
)
308308
}

tests/ui/mir/null/borrowed_mut_null.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ run-fail
22
//@ compile-flags: -C debug-assertions
3-
//@ error-pattern: null pointer dereference occured
3+
//@ error-pattern: null pointer dereference occurred
44

55
fn main() {
66
let ptr: *mut u32 = std::ptr::null_mut();

tests/ui/mir/null/borrowed_null.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ run-fail
22
//@ compile-flags: -C debug-assertions
3-
//@ error-pattern: null pointer dereference occured
3+
//@ error-pattern: null pointer dereference occurred
44

55
fn main() {
66
let ptr: *const u32 = std::ptr::null();

tests/ui/mir/null/borrowed_null_zst.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ run-fail
22
//@ compile-flags: -C debug-assertions
3-
//@ error-pattern: null pointer dereference occured
3+
//@ error-pattern: null pointer dereference occurred
44

55
fn main() {
66
let ptr: *const () = std::ptr::null();

tests/ui/mir/null/null_lhs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ run-fail
22
//@ compile-flags: -C debug-assertions
3-
//@ error-pattern: null pointer dereference occured
3+
//@ error-pattern: null pointer dereference occurred
44

55
fn main() {
66
let ptr: *mut u32 = std::ptr::null_mut();

tests/ui/mir/null/null_rhs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ run-fail
22
//@ compile-flags: -C debug-assertions
3-
//@ error-pattern: null pointer dereference occured
3+
//@ error-pattern: null pointer dereference occurred
44

55
fn main() {
66
let ptr: *mut u32 = std::ptr::null_mut();

tests/ui/mir/null/two_pointers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ run-fail
22
//@ compile-flags: -C debug-assertions
3-
//@ error-pattern: null pointer dereference occured
3+
//@ error-pattern: null pointer dereference occurred
44

55
fn main() {
66
let ptr = std::ptr::null();

0 commit comments

Comments
 (0)