]> git.lizzy.rs Git - rust.git/commit
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)
commitf9ccbf084f972cf50a08ab5c565b9287676fc927
tree9ac40f85883adffae2899513431de9f5d82a476e
parentd26242d35faf50aa9c873fa3c7c15e5564384baa
parent7df33a093c56d81f29914116df53fa0612b454eb
Rollup merge of #105846 - compiler-errors:issue-105838, r=jackh726

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