1
Fork 0

Enable new capture rules by default on edition 2024

This commit is contained in:
Michael Goulet 2023-11-07 00:07:57 +00:00
parent acba7efe1b
commit 803772e81d
5 changed files with 40 additions and 9 deletions

View file

@ -1575,6 +1575,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
fn_kind.expect("expected RPITs to be lowered with a FnKind"),
FnDeclKind::Impl | FnDeclKind::Trait
) || self.tcx.features().lifetime_capture_rules_2024
|| span.at_least_rust_2024()
{
// return-position impl trait in trait was decided to capture all
// in-scope lifetimes, which we collect for all opaques during resolution.