]> git.lizzy.rs Git - rust.git/commit
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)
commit34425c8c00e85d3480746ddc1eef466b6fc8a697
treed3451e54309b76a71473a69ca684cbb837e8fd33
parentadd6f14fbfbb5dfce58818559cbe6976dfe90c9e
parent9c8037c43070ab93bb66d1351901d717319e79c2
Rollup merge of #104258 - compiler-errors:tait-closure-deduce, r=oli-obk

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.
compiler/rustc_hir_typeck/src/closure.rs
compiler/rustc_middle/src/ty/subst.rs