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

Move a const-prop-lint specific hack from mir interpret to const-prop-lint and make it fallible #109938

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Apr 4, 2023

fixes #109743

This hack didn't need to live in the mir interpreter. For const-prop-lint it is entirely correct to avoid doing any const prop if normalization fails at this stage. Most likely we couldn't const propagate anything anyway, and if revealing was needed (so opaque types were involved), we wouldn't want to be too smart and leak the hidden type anyway.

@rustbot
Copy link
Collaborator

rustbot commented Apr 4, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @WaffleLapkin (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@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 Apr 4, 2023
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

ty, r=me

@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 4, 2023

📌 Commit b5d96d5 has been approved by compiler-errors

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 Apr 4, 2023
@compiler-errors compiler-errors added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Apr 4, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 4, 2023
…mpiler-errors

Rollup of 9 pull requests

Successful merges:

 - rust-lang#109723 (Pull some tuple variant fields out into their own struct)
 - rust-lang#109838 (Fix `non_exhaustive_omitted_patterns` lint span)
 - rust-lang#109901 (Enforce VarDebugInfo::Place in MIR validation.)
 - rust-lang#109913 (Doc-comment  `IndexVec::from_elem` and use it in a few more places)
 - rust-lang#109914 (Emit feature error for parenthesized generics in associated type bounds)
 - rust-lang#109919 (rustdoc: escape GAT args in more cases)
 - rust-lang#109937 (Don't collect return-position impl traits for documentation)
 - rust-lang#109938 (Move a const-prop-lint specific hack from mir interpret to const-prop-lint and make it fallible)
 - rust-lang#109940 (Add regression test for rust-lang#93911)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
// that the `RevealAll` pass has happened and that the body's consts
// are normalized, so any call to resolve before that needs to be
// manually normalized.
let val = self.tcx.try_normalize_erasing_regions(self.param_env, c.literal).ok()?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this needs to be added to the equivalent method in the ConstProp opt too?

@bors bors merged commit b0483e8 into rust-lang:master Apr 4, 2023
@rustbot rustbot added this to the 1.70.0 milestone Apr 4, 2023
@apiraino
Copy link
Contributor

apiraino commented Apr 6, 2023

Beta backport accepted as per compiler team on Zulip

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Apr 6, 2023
@pietroalbini pietroalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Apr 16, 2023
@RalfJung
Copy link
Member

Strange, why did the bot not ping wg-const-eval here?
(Just saw this because the bot did ping us in the rollup in #110413.)

Though you also got the first-time contributor message, so clearly the bot was confused...

@saethlin
Copy link
Member

Oli is special and (always?) usually gets the first-time contributor message.

@RalfJung
Copy link
Member

Oh, fascinating. Seems worth a bug report for the bot though? Is there an issue tracking this?

@saethlin
Copy link
Member

I'm not aware of one but also don't know where one would be reported.

@RalfJung
Copy link
Member

@oli-obk oli-obk deleted the try_norm branch April 16, 2023 19:42
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 16, 2023
…troalbini

[stable] Prepare Rust 1.69.0

Last minute backports:

*  rust-lang#109643
* rust-lang#110135
* rust-lang#109938
* rust-lang#109937
* rust-lang#109266

This PR also bumps the channel to stable, and backports the release notes from master.

r? `@ghost`
cc `@rust-lang/release`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. 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.

regression: ICE failing to normalize
10 participants