You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected to see this happen: program compiles on stable when "foobar" feature is not set.
Instead, this happened:
error[E0658]: async closures are unstable
--> src/lib.rs:5:13
|
5 | let x = async || {};
| ^^^^^
|
= note: see issue #62290 <https://github.com/rust-lang/rust/issues/62290> for more information
= help: to use an async block, remove the `||`: `async {`
fmease
added
C-discussion
Category: Discussion or questions that doesn't represent real issues.
and removed
C-bug
Category: This is a bug.
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
May 21, 2024
This works as intended. Feature gates for experimental syntax extensions are intentionally run before macro expansion to prevent stable code from relying on it. We promise not to break stable code (with some exceptions ofc). Permitting experimental syntax in “cfg'ed out” code would hinder us to adjust or remove the syntax as stable crates could now fail with syntax errors.
We have some syntax extensions which still have post-expansion feature gates (which used to be default in the past iirc) like auto_traits. Due to the aforementioned reasons, we can't change the syntax of auto traits anymore (not easily at least).
I tried this code:
I expected to see this happen: program compiles on stable when "foobar" feature is not set.
Instead, this happened:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: