mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 19:23:50 +00:00
tweak InvalidIntPointerUsage message
This commit is contained in:
parent
bd0bacc694
commit
671bc08ea8
@ -400,8 +400,8 @@ impl fmt::Debug for UndefinedBehaviorInfo {
|
||||
ptr.alloc_id,
|
||||
allocation_size.bytes()
|
||||
),
|
||||
InvalidIntPointerUsage(0) => write!(f, "invalid use of NULL pointer"),
|
||||
InvalidIntPointerUsage(i) => write!(f, "invalid use of {} as a pointer", i),
|
||||
InvalidIntPointerUsage(0) => write!(f, "dereferencing NULL pointer"),
|
||||
InvalidIntPointerUsage(i) => write!(f, "dereferencing dangling pointer to 0x{:x}", i),
|
||||
AlignmentCheckFailed { required, has } => write!(
|
||||
f,
|
||||
"accessing memory with alignment {}, but alignment {} is required",
|
||||
|
Loading…
Reference in New Issue
Block a user