Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 671bc08

Browse files
committed
tweak InvalidIntPointerUsage message
1 parent bd0bacc commit 671bc08

File tree

1 file changed

+2
-2
lines changed
  • src/librustc_middle/mir/interpret

1 file changed

+2
-2
lines changed

src/librustc_middle/mir/interpret/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ impl fmt::Debug for UndefinedBehaviorInfo {
400400
ptr.alloc_id,
401401
allocation_size.bytes()
402402
),
403-
InvalidIntPointerUsage(0) => write!(f, "invalid use of NULL pointer"),
404-
InvalidIntPointerUsage(i) => write!(f, "invalid use of {} as a pointer", i),
403+
InvalidIntPointerUsage(0) => write!(f, "dereferencing NULL pointer"),
404+
InvalidIntPointerUsage(i) => write!(f, "dereferencing dangling pointer to 0x{:x}", i),
405405
AlignmentCheckFailed { required, has } => write!(
406406
f,
407407
"accessing memory with alignment {}, but alignment {} is required",

0 commit comments

Comments
 (0)