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 silently eat label before block in block-like expr #103986

Merged

Conversation

compiler-errors
Copy link
Member

Fixes #103983
cc #92823 (where the regression was introduced)

@rustbot
Copy link
Collaborator

rustbot commented Nov 4, 2022

r? @lcnr

(rustbot has picked a reviewer for you, use r? to override)

@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 Nov 4, 2022
@compiler-errors
Copy link
Member Author

compiler-errors commented Nov 4, 2022

Beta nominating bc this is a pretty simple fix, and this is a strange parse that should be removed as quickly as possible.

Also stable nominating, because why not (in case we ever need to make 1.65.1, this could easily be folded in) -- but I don't think this should warrant a point release.

@compiler-errors compiler-errors added beta-nominated Nominated for backporting to the compiler in the beta channel. stable-nominated Nominated for backporting to the compiler in the stable channel. labels Nov 4, 2022
@rust-log-analyzer

This comment has been minimized.

@compiler-errors compiler-errors force-pushed the oh-no-bad-block-should-not-have-label branch from 30884ad to 4e7fc66 Compare November 4, 2022 21:36
@est31
Copy link
Member

est31 commented Nov 4, 2022

In #50045 I have added label_break_value_illegal_uses.rs, and that seems to not have been regressed upon, but it only tested for stuff like if true 'b: {} where a : is present.

@compiler-errors
Copy link
Member Author

compiler-errors commented Nov 4, 2022

@est31, so the root-cause of this specific regression is that we eat 'label, but then don't proceed to emit an error unless 1. : is present, and 2. { follows. If either is false, we just silently eat 'label and proceed.

@lcnr
Copy link
Contributor

lcnr commented Nov 7, 2022

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 7, 2022

📌 Commit 4e7fc66 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-review Status: Awaiting review from the assignee but also interested parties. labels Nov 7, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 7, 2022
Rollup of 6 pull requests

Successful merges:

 - rust-lang#103757 (Mention const and lifetime parameters in error E0207)
 - rust-lang#103986 (Don't silently eat label before block in block-like expr)
 - rust-lang#104003 (Move some tests to more reasonable directories)
 - rust-lang#104038 (Normalize types when deducing closure signature from supertraits)
 - rust-lang#104052 (Fix `resolution_failure` ICE)
 - rust-lang#104090 (Modify comment syntax error)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 170ad4a into rust-lang:master Nov 7, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 7, 2022
@pnkfelix
Copy link
Member

@rustbot label beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Nov 10, 2022
@apiraino
Copy link
Contributor

and stable backport declined

@rustbot label -stable-nominated

@rustbot rustbot removed the stable-nominated Nominated for backporting to the compiler in the stable channel. label Nov 10, 2022
@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Nov 15, 2022
@Mark-Simulacrum Mark-Simulacrum modified the milestones: 1.67.0, 1.66.0 Nov 15, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 20, 2022
…mulacrum

[beta] backport

*  Use nominal_obligations_without_const in wf for FnDef rust-lang#104180
*  Don't silently eat label before block in block-like expr rust-lang#103986
*  Revert "Update CI to use Android NDK r25b" rust-lang#104628
*  rustdoc: Resolve doc links in external traits having local impls rust-lang#104364
*  Use 64 bits for incremental cache in-file positions rust-lang#104164
*  rustdoc: Do not add external traits to the crate in register_res rust-lang#103649
*  Revert "Normalize opaques with escaping bound vars" rust-lang#103509
* Bump to released stable compiler
* [beta] Update cargo rust-lang#104486

r? `@Mark-Simulacrum`
@compiler-errors compiler-errors deleted the oh-no-bad-block-should-not-have-label branch August 11, 2023 20:12
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
9 participants