static-assertions
static-assertions copied to clipboard
Select the 2018 language edition
The use of the ? macro operator, for zero-or-one selection, is only available
in the 2018 edition of the language. Without the edition key set in the
manifest, Rust compiles the crate in the 2015 syntax version, and rejects the
macros.
Observation
1.1.0 fails to compile on my machine, with the following error:
error: expected `*` or `+`
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823\static_assertions-1.1.0/src/assert_cfg.rs:41:35
|
41 | ($($cfg:meta)+, $msg:expr $(,)?) => {
| ^
|
= note: `?` is not a macro repetition operator in the 2015 edition, but is accepted in the 2018 edition
+1
I'm not sure why, but this is also now starting to show up in downstream crates. Don't know if that's a recent development. Any particular reason not to land this @nvzqz ?
Ah, it fails only on rust 1.36.0 and below it seems.