dtolnay/iota

Support underscore constants

オープン

#3 opened on 2019/12/26

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Rust (1 件のフォーク)github user discovery
help wanted

Repository metrics

Stars
 (18 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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

コントリビューターガイド