]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #104258 - compiler-errors:tait-closure-deduce, r=oli-obk
authorMatthias Krüger <matthias.krueger@famsik.de>
Tue, 15 Nov 2022 09:44:10 +0000 (10:44 +0100)
committerGitHub <noreply@github.com>
Tue, 15 Nov 2022 09:44:10 +0000 (10:44 +0100)
Deduce closure signature from a type alias `impl Trait`'s supertraits

r? `@oli-obk`

Basically pass the TAIT's bounds through the same method that we're using to deduce a signature from infer var closure bounds.

Does this need a new FCP? I see it as a logical extension of #101834, but happy to rfcbot a new one if it does.

1  2 
compiler/rustc_hir_typeck/src/closure.rs
compiler/rustc_middle/src/ty/subst.rs

Simple merge