dtolnay/iota

Support underscore constants

開放

#3 建立於 2019年12月26日

 (0 則留言) (0 個反應) (0 位負責人)Rust (1 個分叉)github user discovery
help wanted

倉庫指標

星標
 (18 顆星)
PR 合併指標
 (30 天內沒有已合併 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

貢獻者指南