]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #105846 - compiler-errors:issue-105838, r=jackh726
authorMichael Goulet <michael@errs.io>
Thu, 5 Jan 2023 04:36:27 +0000 (20:36 -0800)
committerGitHub <noreply@github.com>
Thu, 5 Jan 2023 04:36:27 +0000 (20:36 -0800)
Account for return-position `impl Trait` in trait in `opt_suggest_box_span`

RPITITs are the only types where their opaque bounds might normalize to some other self type than the opaque type itself. To avoid needing to do normalization, let's just match on either alias kind.

Ideally, we'd just get rid of `opt_suggest_box_span`. It's kind of a wart on type-checking `if`/`match`. I've recently refactored this expression for being confusing/wrong, but moving it into the error path is pretty hard.

Fixes #105838


Trivial merge