Skip to content

Commit

Permalink
Improve some wording
Browse files Browse the repository at this point in the history
Thanks to CE for this suggestion.
  • Loading branch information
traviscross committed Aug 6, 2024
1 parent b1cda1e commit 9dcf78c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rust-2024/rpit-lifetime-capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 72,7 @@ fn f_implicit<T, const C: usize>() -> impl Sized {}
fn f_explicit<T, const C: usize>() -> impl Sized use<T, C> {}
```

In Rust 2021 and earlier editions, when the `use<..>` bound is not present, generic lifetime parameters are only implicitly captured when they appear syntactically within a bound in RPIT opaque types in the signature of bare functions and associated functions and methods within inherent impls. However, starting in Rust 2024, these in-scope generic lifetime parameters *are* implicitly captured. E.g.:
In Rust 2021 and earlier editions, when the `use<..>` bound is not present, generic lifetime parameters are only captured when they appear syntactically within a bound in RPIT opaque types in the signature of bare functions and associated functions and methods within inherent impls. However, starting in Rust 2024, these in-scope generic lifetime parameters are unconditionally captured. E.g.:

```rust
# #![feature(precise_capturing)]
Expand Down

0 comments on commit 9dcf78c

Please sign in to comment.