Skip to content

Commit ca63a1e

Browse files
committed
reiterate conclusion
1 parent 011f612 commit ca63a1e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

posts/2024-09-05-impl-trait-capture-rules.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,10 @@ fn indices<'s, T>(
234234

235235
## Conclusion
236236

237-
This example demonstrates the way that editions can help us to remove complexity from Rust. The new `impl Trait` capture rules mean that:
237+
This example demonstrates the way that editions can help us to remove complexity from Rust. In Rust 2021, the default rules for when lifetime parameters can be used in `impl Trait` had not aged well. They frequently didn't express what users needed and led to obscure workarounds being required. They led to other inconsistencies, such as between `-> impl Future` and `async fn`, or between the semantics of return-position `impl Trait` in top-level functions and trait functions.
238238

239-
* Most code will "just work" in Rust 2024, avoiding confusing errors.
240-
* For the code where annotations are required, we now have a more powerful annotation mechanism that can let you say exactly what you need to say.
239+
Thanks to editions, we are able to address that without breaking existing code. With the newer rules coming in Rust 2024,
240+
241+
* most code will "just work" in Rust 2024, avoiding confusing errors;
242+
* for the code where annotations are required, we now have a more powerful annotation mechanism that can let you say exactly what you need to say.
241243

0 commit comments

Comments
 (0)