Skip to content

Commit b1315e8

Browse files
committed
clarify what is UB
1 parent 5120b2a commit b1315e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reference/src/glossary.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ let raw2_wrong = raw1.wrapping_add(raw2.wrapping_sub(raw1 as usize) as usize);
7878
// raw2_wrong points to address 0x200 and has provenance @1.
7979
// In other words, raw2 and raw2_wrong have same *address*...
8080
assert_eq!(raw2 as usize, raw2_wrong as usize);
81-
// ...but it would be UB to use raw2_wrong, as it has the wrong *provenance*:
81+
// ...but it would be UB to dereference raw2_wrong, as it has the wrong *provenance*:
8282
// it points to address 0x200, which is in allocation @2, but the pointer
8383
// has provenance @1.
8484
```

0 commit comments

Comments
 (0)