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

Don't ICE on illegal dyn* casts #134635

Merged
merged 1 commit into from
Dec 22, 2024
Merged

Conversation

compiler-errors
Copy link
Member

Fixes #134544
Fixes #132127

@rustbot
Copy link
Collaborator

rustbot commented Dec 21, 2024

r? @fmease

rustbot has assigned @fmease.
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 21, 2024
@@ -721,13 +721,11 @@ impl<'a, 'tcx> CastCheck<'tcx> {
use rustc_middle::ty::cast::IntTy::*;

if self.cast_ty.is_dyn_star() {
Copy link
Member

@fmease fmease Dec 22, 2024

Choose a reason for hiding this comment

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

Honestly, this should probably be self.expr_ty.is_dyn_star() || self.cast_ty.is_dyn_star() to fix the diagnostic regression from 46ecb23 that affects tests/ui/dyn-star/dyn-to-rigid.rs.

@fmease
Copy link
Member

fmease commented Dec 22, 2024

Thanks! @bors r+ rollup (unstable)

@bors
Copy link
Contributor

bors commented Dec 22, 2024

📌 Commit f67a739 has been approved by fmease

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 Dec 22, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 22, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#134599 (Detect invalid exprs in parser used by pretty-printer tests)
 - rust-lang#134602 (Document `PointerLike` implementation restrictions.)
 - rust-lang#134635 (Don't ICE on illegal `dyn*` casts)
 - rust-lang#134639 (Make sure we note ambiguity causes on positive/negative impl conflicts)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a8edf08 into rust-lang:master Dec 22, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 22, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 22, 2024
Rollup merge of rust-lang#134635 - compiler-errors:dyn-dyn, r=fmease

Don't ICE on illegal `dyn*` casts

Fixes rust-lang#134544
Fixes rust-lang#132127
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
4 participants