about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-09-08 18:28:13 +0800
committerkennytm <kennytm@gmail.com>2018-09-08 18:28:13 +0800
commit51c387931ed8df9b7daece4ad64b48bdd2b8335b (patch)
treef5f2ded8fa1727bcfc7324f85691353e6ebe729f /src/libsyntax/parse
parentb1ef2b81b93ee53d29a0fe71934eeda52740fb1b (diff)
parentab43c1e9a43d5c62e0e6ea7442221a2d2f638f7f (diff)
downloadrust-51c387931ed8df9b7daece4ad64b48bdd2b8335b.tar.gz
rust-51c387931ed8df9b7daece4ad64b48bdd2b8335b.zip
Rollup merge of #53315 - nikomatsakis:newtype-index, r=Mark-Simulacrum
use `NonZeroU32` in `newtype_index!`macro, change syntax

Various improvements to the `newtype_index!` macro:

- Use `NonZeroU32` so that `Option<T>` is cheap
- More ergonomic helper method, no need to import `Idx` trait all the time
- Improve syntax to use `struct` keyword so that ripgrep works to find type def'n

Fixes https://github.com/rust-lang/rust/issues/50337

I'm curious to see if this passes tests =)
Diffstat (limited to 'src/libsyntax/parse')
0 files changed, 0 insertions, 0 deletions