Skip to content

Commit 339bbeb

Browse files
committed
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)
1 parent 4b043fa commit 339bbeb

File tree

4 files changed

+349
-455
lines changed

4 files changed

+349
-455
lines changed

compiler/rustc_index/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pub mod bit_set;
1212
pub mod interval;
1313
pub mod vec;
1414

15+
pub use rustc_macros::newtype_index;
16+
1517
/// Type size assertion. The first argument is a type and the second argument is its expected size.
1618
#[macro_export]
1719
macro_rules! static_assert_size {

0 commit comments

Comments
 (0)