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
drop(b); // Error: cannot move out of `b` because it is borrowed
1646
+
}
1647
+
```
1648
+
1649
+
Adding generic parameters to an RPIT places additional constraints on how the resulting type may be used.
1650
+
1651
+
Note that there are implicit captures when the `use<>` syntax is not specified. In Rust 2021 and earlier editions, the lifetime parameters are only captured if they appear syntactically within a bound in the RPIT type signature. Starting in Rust 2024, all lifetime parameters are unconditionally captured. This means that starting in Rust 2024, the default is maximally compatible, requiring you to be explicit when you want to capture less, which is a SemVer commitment.
1652
+
1653
+
See the [edition guide][rpit-capture-guide] and the [reference][rpit-reference] for more information on RPIT capturing.
1654
+
1655
+
It is a minor change to capture fewer generic parameters in an RPIT.
1656
+
1657
+
> Note: All in-scope type and const generic parameters must be either implicitly captured (no `+ use<…>` specified) or explicitly captured (must be listed in `+ use<…>`), and thus currently it is not allowed to change what is captured of those kinds of generics.
0 commit comments