dtolnay/iota

Support underscore constants

Offen

#3 geöffnet am 26.12.2019

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (1 Fork)github user discovery
help wanted

Repository-Metriken

Stars
 (18 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

As introduced in rust 1.37: https://blog.rust-lang.org/2019/08/15/Rust-1.37.0.html#using-unnamed-const-items-for-macros

Iota currently rejects code containing underscore names.

iota! {
    const A: u8 = 1 << iota;
        | _
        | C
}
error: no rules expected the token `|`
 --> src/main.rs:5:9
  |
5 |         | _
  |         ^ no rules expected this token in macro call

Contributor Guide