diff options
| author | Ralf Jung <post@ralfj.de> | 2020-04-30 10:49:45 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-05-01 10:50:04 +0200 |
| commit | 671bc08ea8af5800a76203507a2ad68525b767d9 (patch) | |
| tree | 6383def024bff82218b1baa29511f0d6ba58e550 | |
| parent | bd0bacc694d7d8175804bb6f690cb846bfa4a9ee (diff) | |
| download | rust-671bc08ea8af5800a76203507a2ad68525b767d9.tar.gz rust-671bc08ea8af5800a76203507a2ad68525b767d9.zip | |
tweak InvalidIntPointerUsage message
| -rw-r--r-- | src/librustc_middle/mir/interpret/error.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_middle/mir/interpret/error.rs b/src/librustc_middle/mir/interpret/error.rs index 7b222121245..8c392950276 100644 --- a/src/librustc_middle/mir/interpret/error.rs +++ b/src/librustc_middle/mir/interpret/error.rs @@ -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", |
