]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #92917 - jackh726:issue-91762-2, r=nikomatsakis
authorMatthias Krüger <matthias.krueger@famsik.de>
Tue, 8 Feb 2022 15:40:48 +0000 (16:40 +0100)
committerGitHub <noreply@github.com>
Tue, 8 Feb 2022 15:40:48 +0000 (16:40 +0100)
commita11e2b1f755e392e7c776b98e76aa86a30b7b22e
treeb332e296015c8868de7e32f74c4417dbcee92619
parent8429dcdb79b35182036e8de574287a7acc4b14d8
parent7ad48bd4e22aaffa5ac32809b9196fab9c04de2c
Rollup merge of #92917 - jackh726:issue-91762-2, r=nikomatsakis

Don't constrain projection predicates with inference vars in GAT substs

cc #91762

Not a fix, but a mitigation to prevent a backwards-compatible hazard where we normalize using a predicate only because it's the only one available, but shouldn't. This would constrain an inference variable which didn't really want. We already do this when selecting a projection candidate, which isn't always correct. But changing that is a problem for a different day.

Also found out that a suggestion for `await`ing a future was using the wrong substs.

r? ``@nikomatsakis``
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs