Make #[max] an attribute in newtype_index
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user