Skip to content

Syntax gating information is out of date #2401

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

Open
clubby789 opened this issue May 20, 2025 · 0 comments
Open

Syntax gating information is out of date #2401

clubby789 opened this issue May 20, 2025 · 0 comments

Comments

@clubby789
Copy link
Contributor

rust-lang/rust@de17ec9/https://github.com/rust-lang/rust/pull/117204 updated the gate_feature_* macros, but

### Do not require the feature-gate to use the feature
Most importantly, remove the code which flags an error if the
feature-gate is not present (since the feature is now considered
stable). If the feature can be detected because it employs some
new syntax, then a common place for that code to be is in the
same `compiler/rustc_ast_passes/src/feature_gate.rs`.
For example, you might see code like this:
```rust,ignore
gate_feature_post!(&self, pub_restricted, span,
"`pub(restricted)` syntax is experimental");
```
This `gate_feature_post!` macro prints an error if the
`pub_restricted` feature is not enabled. It is not needed
now that `#[pub_restricted]` is stable.
still mentions gate_feature_post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant