Skip to content

Commit 728932d

Browse files
Update posts/2024-05-02-Rust-1.78.0.md
Co-authored-by: scottmcm <[email protected]>
1 parent 51a2efb commit 728932d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

posts/2024-05-02-Rust-1.78.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ The Rust standard library has a number of assertions for the preconditions of `u
8888

8989
Now, the condition for these assertions is delayed until code generation, so they will be checked depending on the user's own setting for debug assertions -- enabled by default in debug and test builds. This change helps users catch undefined behavior in their code, though the details of how much is checked are generally not stable.
9090

91-
For example, [`slice::from_raw_parts`](https://doc.rust-lang.org/std/slice/fn.from_raw_parts.html) requires an aligned non-null pointer. The following use of a purposely-misaligned pointer has undefined behavior, and while that may not have obvious effects, the debug assertion can now catch it:
91+
For example, [`slice::from_raw_parts`](https://doc.rust-lang.org/std/slice/fn.from_raw_parts.html) requires an aligned non-null pointer. The following use of a purposely-misaligned pointer has undefined behavior, and while if you were unlucky it may have *appeared* to "work" in the past, the debug assertion can now catch it:
9292

9393
```rust
9494
fn main() {

0 commit comments

Comments
 (0)