Skip to content

Commit 3559565

Browse files
Replace more "NULL" with "null"
1 parent 68424e2 commit 3559565

8 files changed

+8
-8
lines changed

compiler/rustc_mir_build/src/check_unsafety.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ impl UnsafeOpKind {
296296
),
297297
DerefOfRawPointer => (
298298
"dereference of raw pointer",
299-
"raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules \
299+
"raw pointers may be null, dangling or unaligned; they can violate aliasing rules \
300300
and cause data races: all of these are undefined behavior",
301301
),
302302
AssignToDroppingUnionField => (

src/test/ui/generator/issue-45729-unsafe-in-generator.thir.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function
44
LL | *(1 as *mut u32) = 42;
55
| ^^^^^^^^^^^^^^^^ dereference of raw pointer
66
|
7-
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
7+
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
88

99
error: aborting due to previous error
1010

src/test/ui/issues/issue-47412.thir.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function
44
LL | match *ptr {}
55
| ^^^^ dereference of raw pointer
66
|
7-
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
7+
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
88

99
error: aborting due to previous error
1010

src/test/ui/traits/safety-fn-body.thir.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function
44
LL | *self += 1;
55
| ^^^^^ dereference of raw pointer
66
|
7-
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
7+
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
88

99
error: aborting due to previous error
1010

src/test/ui/unsafe/issue-45087-unreachable-unsafe.thir.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function
44
LL | *(1 as *mut u32) = 42;
55
| ^^^^^^^^^^^^^^^^ dereference of raw pointer
66
|
7-
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
7+
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
88

99
error: aborting due to previous error
1010

src/test/ui/unsafe/unsafe-fn-assign-deref-ptr.thir.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function
44
LL | *p = 0;
55
| ^^ dereference of raw pointer
66
|
7-
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
7+
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
88

99
error: aborting due to previous error
1010

src/test/ui/unsafe/unsafe-fn-deref-ptr.thir.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function
44
LL | return *p;
55
| ^^ dereference of raw pointer
66
|
7-
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
7+
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
88

99
error: aborting due to previous error
1010

src/test/ui/unsafe/unsafe-unstable-const-fn.thir.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function
44
LL | *a == b
55
| ^^ dereference of raw pointer
66
|
7-
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
7+
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
88

99
error: aborting due to previous error
1010

0 commit comments

Comments
 (0)