]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #98637 - cjgillot:bare-trait-anon-lt, r=petrochenkov
authorbors <bors@rust-lang.org>
Mon, 11 Jul 2022 17:09:37 +0000 (17:09 +0000)
committerbors <bors@rust-lang.org>
Mon, 11 Jul 2022 17:09:37 +0000 (17:09 +0000)
Create fresh lifetime parameters for bare fn trait too

The current code fails to account for the equivalence between `dyn FnMut(&mut u8)` and bare `FnMut(&mut u8)`, and treated them differently.

This PR introduces a special case for `Fn` traits, which are always fully resolved.

Fixes #98616
Fixes #98726
This will require a beta-backport, as beta contains that bug.

r? `@petrochenkov`

1  2 
compiler/rustc_ast_lowering/src/lib.rs
compiler/rustc_resolve/src/late.rs

Simple merge