Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for return-position impl Trait in trait in opt_suggest_box_span #105846

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

compiler-errors
Copy link
Member

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

@rustbot
Copy link
Collaborator

rustbot commented Dec 17, 2022

r? @jackh726

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 17, 2022
@jackh726
Copy link
Member

jackh726 commented Jan 4, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 4, 2023

📌 Commit 7df33a0 has been approved by jackh726

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 4, 2023
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Jan 5, 2023
…ckh726

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 rust-lang#105838
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 5, 2023
…mpiler-errors

Rollup of 6 pull requests

Successful merges:

 - rust-lang#105846 (Account for return-position `impl Trait` in trait in `opt_suggest_box_span`)
 - rust-lang#106385 (Split `-Zchalk` flag into `-Ztrait-solver=(classic|chalk|next)` flag)
 - rust-lang#106403 (Rename `hir::Map::{get_,find_}parent_node` to `hir::Map::{,opt_}parent_id`, and add `hir::Map::{get,find}_parent`)
 - rust-lang#106462 (rustdoc: remove unnecessary wrapper around sidebar and mobile logos)
 - rust-lang#106464 (Update Fuchsia walkthrough with new configs)
 - rust-lang#106478 (Tweak wording of fn call with wrong number of args)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f9ccbf0 into rust-lang:master Jan 5, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 5, 2023
@compiler-errors compiler-errors deleted the issue-105838 branch August 11, 2023 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

return_position_impl_trait_in_trait compiler bug
4 participants