]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #103852 - compiler-errors:rpitit-early-from-impl, r=lcnr
authorMatthias Krüger <matthias.krueger@famsik.de>
Thu, 17 Nov 2022 21:33:17 +0000 (22:33 +0100)
committerGitHub <noreply@github.com>
Thu, 17 Nov 2022 21:33:17 +0000 (22:33 +0100)
Don't remap early-bound regions for return-position `impl Trait` in trait originating from `impl`

long title :sweat:

We don't want to remap early-bound regions that originate from the `impl`s themselves, since they have no corresponding region in the trait. Not sure if there's a better condition than checking if the EBR's def-id's parent is the impl -- maybe we should be checking if the region comes from the method or RPITIT... :shrug:

r? types

Fixes #103850

1  2 
compiler/rustc_hir_analysis/src/check/compare_method.rs