Convert newtype_index to a proc macro

The `macro_rules!` implementation was becomng excessively complicated,
and difficult to modify. The new proc macro implementation should make
it much easier to add new features (e.g. skipping certain `#[derive]`s)
This commit is contained in:
Aaron Hill
2022-02-09 17:24:51 -05:00
parent 4b043faba3
commit 339bbebbc1
4 changed files with 349 additions and 455 deletions

View File

@@ -12,6 +12,8 @@ pub mod bit_set;
pub mod interval;
pub mod vec;
pub use rustc_macros::newtype_index;
/// Type size assertion. The first argument is a type and the second argument is its expected size.
#[macro_export]
macro_rules! static_assert_size {