You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixup return position impl trait overcapturing for the 2024 edition (#528)
The Rust 2024 edition will be changing how `impl Trait` in return
position functions. Namely it will be changing the rules from capturing
no lifetimes, to capturing all lifetimes. The reasons for this are
documented in [RFC
3498](https://github.com/rust-lang/rfcs/blob/master/text/3498-lifetime-capture-rules-2024.md)
and [the migration
guide](https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html).
A new 'precise capturing' syntax has been added to allow cases that
don't need everything captured to scope down what they take. This PR
updates all such cases to use the new syntax.
Note that currently this new syntax requires all type parameters in
scope to be listed. This currently results in overcapturing of type
parameters. This will be relaxed in the future, and is tracked by [RFC
3617](rust-lang/rust#130043).
This PR also marks the edition_2024_expr_fragment_specifier lint as no
longer needing fixing, as I have completed an audit of all our macros
that it flagged and none of them need changing.
Part of #288
0 commit comments