Replace more "NULL" with "null"
This commit is contained in:
parent
68424e2f01
commit
3559565e07
8 changed files with 8 additions and 8 deletions
compiler/rustc_mir_build/src
src/test/ui
|
@ -296,7 +296,7 @@ impl UnsafeOpKind {
|
|||
),
|
||||
DerefOfRawPointer => (
|
||||
"dereference of raw pointer",
|
||||
"raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules \
|
||||
"raw pointers may be null, dangling or unaligned; they can violate aliasing rules \
|
||||
and cause data races: all of these are undefined behavior",
|
||||
),
|
||||
AssignToDroppingUnionField => (
|
||||
|
|
|
@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function
|
|||
LL | *(1 as *mut u32) = 42;
|
||||
| ^^^^^^^^^^^^^^^^ dereference of raw pointer
|
||||
|
|
||||
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
||||
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function
|
|||
LL | match *ptr {}
|
||||
| ^^^^ dereference of raw pointer
|
||||
|
|
||||
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
||||
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function
|
|||
LL | *self += 1;
|
||||
| ^^^^^ dereference of raw pointer
|
||||
|
|
||||
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
||||
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function
|
|||
LL | *(1 as *mut u32) = 42;
|
||||
| ^^^^^^^^^^^^^^^^ dereference of raw pointer
|
||||
|
|
||||
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
||||
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function
|
|||
LL | *p = 0;
|
||||
| ^^ dereference of raw pointer
|
||||
|
|
||||
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
||||
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function
|
|||
LL | return *p;
|
||||
| ^^ dereference of raw pointer
|
||||
|
|
||||
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
||||
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function
|
|||
LL | *a == b
|
||||
| ^^ dereference of raw pointer
|
||||
|
|
||||
= note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
||||
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue