Skip to content

fix ICE on type error in promoted #134010

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Dec 7, 2024

Fixes #133968

Ensure that when we turn a type error into a "this promoted failed to evaluate" error, we do record this as something that may happen even in "infallible" promoteds.

@rustbot
Copy link
Collaborator

rustbot commented Dec 7, 2024

r? @pnkfelix

rustbot has assigned @pnkfelix.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 7, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 7, 2024

Some changes occurred to the CTFE machinery

cc @rust-lang/wg-const-eval

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri, @rust-lang/wg-const-eval

Copy link
Member Author

Choose a reason for hiding this comment

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

When a const fails to typecheck, we no longer point at where that const is used... IMO that is an improvement, since the typecheck error doesn't really depend on usage.

@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the promoted-type-error-ice branch from 6b8a273 to 16742ed Compare December 7, 2024 16:55
@rustbot
Copy link
Collaborator

rustbot commented Dec 7, 2024

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the promoted-type-error-ice branch from 16742ed to f348c7e Compare December 7, 2024 17:37
@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the promoted-type-error-ice branch from f348c7e to 8168822 Compare December 8, 2024 07:32
@RalfJung RalfJung force-pushed the promoted-type-error-ice branch from 8168822 to ed8ee39 Compare December 9, 2024 14:17
@RalfJung
Copy link
Member Author

RalfJung commented Dec 9, 2024

r? @oli-obk
@bors r=oli-obk
(Hoping I interpreted your GH approval correctly.)

@bors
Copy link
Collaborator

bors commented Dec 9, 2024

📌 Commit ed8ee39 has been approved by oli-obk

It is now in the queue for this repository.

@rustbot rustbot assigned oli-obk and unassigned pnkfelix Dec 9, 2024
@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 Dec 9, 2024
fmease added a commit to fmease/rust that referenced this pull request Dec 9, 2024
…r=oli-obk

fix ICE on type error in promoted

Fixes rust-lang#133968

Ensure that when we turn a type error into a "this promoted failed to evaluate" error, we do record this as something that may happen even in "infallible" promoteds.
fmease added a commit to fmease/rust that referenced this pull request Dec 9, 2024
…r=oli-obk

fix ICE on type error in promoted

Fixes rust-lang#133968

Ensure that when we turn a type error into a "this promoted failed to evaluate" error, we do record this as something that may happen even in "infallible" promoteds.
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 10, 2024
Rollup of 10 pull requests

Successful merges:

 - rust-lang#131558 (Lint on combining `#[no_mangle]` and `#[export_name]`)
 - rust-lang#133122 (Add unpolished, experimental support for AFIDT (async fn in dyn trait))
 - rust-lang#133184 (wasi/fs: Improve stopping condition for <ReadDir as Iterator>::next)
 - rust-lang#133456 (Add licenses + Run `cargo update`)
 - rust-lang#133472 (Run TLS destructors for wasm32-wasip1-threads)
 - rust-lang#133853 (use vendor sources by default on dist tarballs)
 - rust-lang#133946 (coverage: Prefer to visit nodes whose predecessors have been visited)
 - rust-lang#134010 (fix ICE on type error in promoted)
 - rust-lang#134029 (coverage: Use a query to find counters/expressions that must be zero)
 - rust-lang#134071 (Configure renovatebot)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 10, 2024
Rollup of 10 pull requests

Successful merges:

 - rust-lang#131558 (Lint on combining `#[no_mangle]` and `#[export_name]`)
 - rust-lang#133184 (wasi/fs: Improve stopping condition for <ReadDir as Iterator>::next)
 - rust-lang#133456 (Add licenses + Run `cargo update`)
 - rust-lang#133472 (Run TLS destructors for wasm32-wasip1-threads)
 - rust-lang#133853 (use vendor sources by default on dist tarballs)
 - rust-lang#133946 (coverage: Prefer to visit nodes whose predecessors have been visited)
 - rust-lang#134010 (fix ICE on type error in promoted)
 - rust-lang#134029 (coverage: Use a query to find counters/expressions that must be zero)
 - rust-lang#134071 (Configure renovatebot)
 - rust-lang#134102 (Miscellaneous fixes for nix-dev-shell)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4d544d9 into rust-lang:master Dec 10, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 10, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 10, 2024
Rollup merge of rust-lang#134010 - RalfJung:promoted-type-error-ice, r=oli-obk

fix ICE on type error in promoted

Fixes rust-lang#133968

Ensure that when we turn a type error into a "this promoted failed to evaluate" error, we do record this as something that may happen even in "infallible" promoteds.
@RalfJung RalfJung deleted the promoted-type-error-ice branch December 11, 2024 21:09
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 15, 2024
…r=oli-obk

fix ICE on type error in promoted

Fixes rust-lang#133968

Ensure that when we turn a type error into a "this promoted failed to evaluate" error, we do record this as something that may happen even in "infallible" promoteds.
# for free to join this conversation on GitHub. Already have an account? # 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.

ICE: interpret const eval failure of Unevaluated(UnevaluatedConst .. which is not in required_consts
6 participants