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

Additional tests to ensure let is rejected during parsing #132828

Merged
merged 2 commits into from
Nov 10, 2024

Conversation

est31
Copy link
Member

@est31 est31 commented Nov 9, 2024

In the original stabilization PR, @ compiler-errors has pointed out that #97295 wasn't enough to address the concerns about having let in expressions being rejected at parsing time, instead of later.

Thankfully, since then the situation has been greatly improved by #115677. This PR adds some additional tests to disallowed-positions.rs, and adds two additional revisions to the "normal" case which is now given the feature name:

  • no_feature: Added to incorporate disallowed-positions-without-feature-gate.rs into the file, reducing duplication.
  • nothing: like feature, but all functions are cfg'd out. Ensures that the errors are really emitted during parsing.

cc tracking issue #53667

@rustbot
Copy link
Collaborator

rustbot commented Nov 9, 2024

r? @petrochenkov

rustbot has assigned @petrochenkov.
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 Nov 9, 2024
@compiler-errors compiler-errors self-assigned this Nov 9, 2024
@rust-log-analyzer

This comment has been minimized.

Also make the file have a third mode for where everything is cfg'd out to make sure it's an early error.
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 10, 2024

📌 Commit 935bf69 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 Nov 10, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 10, 2024
…kingjubilee

Rollup of 6 pull requests

Successful merges:

 - rust-lang#131258 (Stabilize s390x inline assembly)
 - rust-lang#132801 (interpret: get_alloc_info: also return mutability)
 - rust-lang#132823 (require const_impl_trait gate for all conditional and trait const calls)
 - rust-lang#132824 (Update grammar in wasm-c-abi's compiler flag documentation)
 - rust-lang#132825 (Exclude relnotes-tracking-issue from needs-triage)
 - rust-lang#132828 (Additional tests to ensure let is rejected during parsing)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c19d56c into rust-lang:master Nov 10, 2024
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 10, 2024
Rollup merge of rust-lang#132828 - est31:let_chains_parsing_tests, r=compiler-errors

Additional tests to ensure let is rejected during parsing

In the original stabilization PR, @ `compiler-errors` has [pointed out](rust-lang#94927 (comment)) that rust-lang#97295 wasn't enough to address the concerns about having `let` in expressions being rejected at parsing time, instead of later.

Thankfully, since then the situation has been greatly improved by rust-lang#115677. This PR adds some additional tests to `disallowed-positions.rs`, and adds two additional revisions to the "normal" case which is now given the `feature` name:

* `no_feature`: Added to incorporate `disallowed-positions-without-feature-gate.rs` into the file, reducing duplication.
* `nothing`: like feature, but all functions are cfg'd out. Ensures that the errors are really emitted during parsing.

cc tracking issue rust-lang#53667
@rustbot rustbot added this to the 1.84.0 milestone Nov 10, 2024
mati865 pushed a commit to mati865/rust that referenced this pull request Nov 12, 2024
…compiler-errors

Additional tests to ensure let is rejected during parsing

In the original stabilization PR, @ `compiler-errors` has [pointed out](rust-lang#94927 (comment)) that rust-lang#97295 wasn't enough to address the concerns about having `let` in expressions being rejected at parsing time, instead of later.

Thankfully, since then the situation has been greatly improved by rust-lang#115677. This PR adds some additional tests to `disallowed-positions.rs`, and adds two additional revisions to the "normal" case which is now given the `feature` name:

* `no_feature`: Added to incorporate `disallowed-positions-without-feature-gate.rs` into the file, reducing duplication.
* `nothing`: like feature, but all functions are cfg'd out. Ensures that the errors are really emitted during parsing.

cc tracking issue rust-lang#53667
mati865 pushed a commit to mati865/rust that referenced this pull request Nov 12, 2024
…kingjubilee

Rollup of 6 pull requests

Successful merges:

 - rust-lang#131258 (Stabilize s390x inline assembly)
 - rust-lang#132801 (interpret: get_alloc_info: also return mutability)
 - rust-lang#132823 (require const_impl_trait gate for all conditional and trait const calls)
 - rust-lang#132824 (Update grammar in wasm-c-abi's compiler flag documentation)
 - rust-lang#132825 (Exclude relnotes-tracking-issue from needs-triage)
 - rust-lang#132828 (Additional tests to ensure let is rejected during parsing)

r? `@ghost`
`@rustbot` modify labels: rollup
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
Development

Successfully merging this pull request may close these issues.

6 participants