Make #[max]
an attribute in newtype_index
This commit is contained in:
parent
93429948cf
commit
91c3c2040c
4 changed files with 21 additions and 17 deletions
|
@ -3,7 +3,10 @@
|
|||
// Allows the macro invocation below to work
|
||||
use crate as rustc_index;
|
||||
|
||||
rustc_macros::newtype_index!(struct MyIdx { MAX = 0xFFFF_FFFA });
|
||||
rustc_macros::newtype_index! {
|
||||
#[max = 0xFFFF_FFFA]
|
||||
struct MyIdx { }
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn index_size_is_optimized() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue