]> git.lizzy.rs Git - rust.git/commit
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)
commit38b72154ded23847cd08a796d0c6708b5efac265
tree6250bc421ddfbb5a6e85c2e4bdb5a4cb28b24b73
parent9fb32dc924653e35950f17c8d91793c9ca983d03
parent21a12e8ab78f7e67a4ddc1d13d289a496f2f619d
Auto merge of #98637 - cjgillot:bare-trait-anon-lt, r=petrochenkov

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`
compiler/rustc_ast_lowering/src/lib.rs
compiler/rustc_resolve/src/late.rs