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
Which results in the attributes being placed in invalid positions.
error[E0658]: attributes on expressions are experimental
--> src\main.rs:6:9
|
6 | #[cfg(debug_assertions)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note:for more information, see https://github.com/rust-lang/rust/issues/15701
error: removing an expression is not supported in this position
--> src\main.rs:6:9
|
6 | #[cfg(debug_assertions)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0658]: attributes on expressions are experimental
--> src\main.rs:14:13
|
14 | #[allow(unsafe_code)]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note:for more information, see https://github.com/rust-lang/rust/issues/15701error: aborting due to 3previous errors
I assume it's related to blocks, as the following code is not changed by rustfmt:
If a match arm starts with a block with an attribute, rustfmt removes the brackets, resulting in code that cannot compile.
Before rustfmt:
After rustfmt:
Which results in the attributes being placed in invalid positions.
I assume it's related to blocks, as the following code is not changed by rustfmt:
rustfmt 1.4.11-stable (9eb4b56 2020-01-29)
rustfmt 1.4.12-nightly (9f53665 2020-02-10)
The text was updated successfully, but these errors were encountered: