Don't ICE in coerce when autoderef fails to structurally normalize non-WF type in new solver by compiler-errors · Pull Request #134746 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation5 Commits1 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

compiler-errors

compiler-errors

let err = first_error.expect("coerce_borrowed_pointer had no error");
debug!("coerce_borrowed_pointer: failed with err = {:?}", err);
return Err(err);
if let Some(first_error) = first_error {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This unwrap fails b/c above we simply do not see any types to autoderef, since structurally resolving the first autoderef of &<not wf alias> simply fails.

lcnr

debug!("coerce_borrowed_pointer: failed with err = {:?}", first_error);
return Err(first_error);
} else {
// :(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls explain when this happens, after that r=me

@lcnr

@rustbot rustbot added S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Jan 21, 2025

@compiler-errors

@compiler-errors

@bors

📌 Commit 72fa874 has been approved by lcnr

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-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Jan 22, 2025

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Jan 22, 2025

@matthiaskrgr

…-wf-coerce-ice, r=lcnr

Don't ICE in coerce when autoderef fails to structurally normalize non-WF type in new solver

r? lcnr

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jan 23, 2025

@bors

…iaskrgr

Rollup of 8 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

jhpratt added a commit to jhpratt/rust that referenced this pull request

Jan 23, 2025

@jhpratt

…-wf-coerce-ice, r=lcnr

Don't ICE in coerce when autoderef fails to structurally normalize non-WF type in new solver

r? lcnr

jieyouxu added a commit to jieyouxu/rust that referenced this pull request

Jan 23, 2025

@jieyouxu

…-wf-coerce-ice, r=lcnr

Don't ICE in coerce when autoderef fails to structurally normalize non-WF type in new solver

r? lcnr

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jan 23, 2025

@bors

Rollup of 10 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jan 23, 2025

@bors

…iaskrgr

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

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.

WG-trait-system-refactor

The Rustc Trait System Refactor Initiative (-Znext-solver)