Skip to content

Special-case alias ty during the delayed bug emission in try_from_lit #129042

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
Aug 16, 2024

Conversation

Jaic1
Copy link
Contributor

@Jaic1 Jaic1 commented Aug 13, 2024

This PR tries to fix #116308.

A delayed bug in try_from_lit will not be emitted so that the compiler will not ICE when it sees the pair (ast::LitKind::Int, ty::TyKind::Alias) in lit_to_const (called from try_from_lit).

This PR is related to an unstable feature adt_const_params (#95174).

r? @BoxyUwU

@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 Aug 13, 2024
Copy link
Member

@BoxyUwU BoxyUwU left a comment

Choose a reason for hiding this comment

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

Thanks :3 This looks good to me, one little comment and then we can merge this

@Jaic1 Jaic1 requested a review from BoxyUwU August 15, 2024 07:02
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Jaic1
Copy link
Contributor Author

Jaic1 commented Aug 15, 2024

Sorry for the several reckless commits without the tidy check.

@BoxyUwU
Copy link
Member

BoxyUwU commented Aug 15, 2024

Can you squash all the commits into one? thanks

@BoxyUwU BoxyUwU 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 Aug 15, 2024
@Jaic1
Copy link
Contributor Author

Jaic1 commented Aug 16, 2024

Can you squash all the commits into one? thanks

Done

@Jaic1 Jaic1 changed the title Remove the delayed bug emission in try_from_lit Special-case alias ty during the delayed bug emission in try_from_lit Aug 16, 2024
@BoxyUwU
Copy link
Member

BoxyUwU commented Aug 16, 2024

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 16, 2024

📌 Commit cd2b030 has been approved by BoxyUwU

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 Aug 16, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 16, 2024
Special-case alias ty during the delayed bug emission in `try_from_lit`

This PR tries to fix rust-lang#116308.

A delayed bug in `try_from_lit` will not be emitted so that the compiler will not ICE when it sees the pair `(ast::LitKind::Int, ty::TyKind::Alias)` in `lit_to_const` (called from `try_from_lit`).

This PR is related to an unstable feature `adt_const_params` (rust-lang#95174).

r? `@BoxyUwU`
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 16, 2024
…iaskrgr

Rollup of 3 pull requests

Successful merges:

 - rust-lang#128598 (float to/from bits and classify: update for float semantics RFC)
 - rust-lang#128990 (Re-enable more debuginfo tests on freebsd)
 - rust-lang#129042 (Special-case alias ty during the delayed bug emission in `try_from_lit`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 16, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#128990 (Re-enable more debuginfo tests on freebsd)
 - rust-lang#129042 (Special-case alias ty during the delayed bug emission in `try_from_lit`)
 - rust-lang#129086 (Stabilize `is_none_or`)
 - rust-lang#129149 (Migrate `validate_json.py` script to rust in `run-make/rustdoc-map-file` test)
 - rust-lang#129154 (Fix wrong source location for some incorrect macro definitions)
 - rust-lang#129161 (Stabilize std::thread::Builder::spawn_unchecked)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f04d25f into rust-lang:master Aug 16, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 16, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 16, 2024
Rollup merge of rust-lang#129042 - Jaic1:fix-116308, r=BoxyUwU

Special-case alias ty during the delayed bug emission in `try_from_lit`

This PR tries to fix rust-lang#116308.

A delayed bug in `try_from_lit` will not be emitted so that the compiler will not ICE when it sees the pair `(ast::LitKind::Int, ty::TyKind::Alias)` in `lit_to_const` (called from `try_from_lit`).

This PR is related to an unstable feature `adt_const_params` (rust-lang#95174).

r? ``@BoxyUwU``
@BoxyUwU
Copy link
Member

BoxyUwU commented Aug 17, 2024

@bors r- (bors machine broke and thinks this PR still needs to be merged, your PR is fine and landed dont worry lol)

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 17, 2024
@Jaic1 Jaic1 deleted the fix-116308 branch August 31, 2024 02:25
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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: Const::from_anon_const: couldn't lit_to_const TypeError
5 participants