Skip to content

Emit an error for --cfg=) #92468

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
Jan 2, 2022
Merged

Emit an error for --cfg=) #92468

merged 1 commit into from
Jan 2, 2022

Conversation

meithecatte
Copy link
Contributor

Fixes #73026

See also: #64467, #89468

The issue stems from a FatalError being silently raised in
panictry_buffer. Normally this is not a problem, because
panictry_buffer emits the causes of the error, but they are not
themselves fatal, so they get filtered out by the silent emitter.

To fix this, we use a parser entrypoint which doesn't use
panictry_buffer, and we handle the error ourselves.

Fixes rust-lang#73026

See also: rust-lang#64467, rust-lang#89468

The issue stems from a `FatalError` being silently raised in
`panictry_buffer`. Normally this is not a problem, because
`panictry_buffer` emits the causes of the error, but they are not
themselves fatal, so they get filtered out by the silent emitter.

To fix this, we use a parser entrypoint which doesn't use
`panictry_buffer`, and we handle the error ourselves.
@rust-highfive
Copy link
Contributor

r? @petrochenkov

(rust-highfive has picked a reviewer for you, use r? to override)

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 1, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 1, 2022
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 1, 2022

📌 Commit 193342e has been approved by petrochenkov

@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 Jan 1, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 2, 2022
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#84083 (Clarify the guarantees that ThreadId does and doesn't make.)
 - rust-lang#91593 (Remove unnecessary bounds for some Hash{Map,Set} methods)
 - rust-lang#92297 (Reduce compile time of rustbuild)
 - rust-lang#92332 (Add test for where clause order)
 - rust-lang#92438 (Enforce formatting for rustc_codegen_cranelift)
 - rust-lang#92463 (Remove pronunciation guide from Vec<T>)
 - rust-lang#92468 (Emit an error for `--cfg=)`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2004a51 into rust-lang:master Jan 2, 2022
@rustbot rustbot added this to the 1.59.0 milestone Jan 2, 2022
github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request Mar 11, 2025
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#84083 (Clarify the guarantees that ThreadId does and doesn't make.)
 - rust-lang#91593 (Remove unnecessary bounds for some Hash{Map,Set} methods)
 - rust-lang#92297 (Reduce compile time of rustbuild)
 - rust-lang#92332 (Add test for where clause order)
 - rust-lang#92438 (Enforce formatting for rustc_codegen_cranelift)
 - rust-lang#92463 (Remove pronunciation guide from Vec<T>)
 - rust-lang#92468 (Emit an error for `--cfg=)`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
# for free to join this conversation on GitHub. Already have an account? # 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.

rustc --cfg=')' exits without error
5 participants