Skip to content

Commit a5a5fce

Browse files
committed
Auto merge of #25834 - steveklabnik:gh25326, r=alexcrichton
Fixes #25326
2 parents 4233cbd + 62e5dee commit a5a5fce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc/diagnostics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ Therefore, casting one of these non-constant pointers to an integer results
218218
in a non-constant integer which lead to this error. Example:
219219
220220
```
221-
const X: u32 = 50;
222-
const Y: *const u32 = &X;
223-
println!("{:?}", Y);
221+
const X: u32 = 1;
222+
const Y: usize = &X as *const u32 as usize;
223+
println!("{}", Y);
224224
```
225225
"##,
226226

0 commit comments

Comments
 (0)