Skip to content

Commit

Permalink
Auto merge of rust-lang#93878 - Aaron1011:newtype-macro, r=cjgillot
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
bors committed Feb 25, 2022
2 parents d4de1f2 + 7b7b0f1 commit f6a7993
Show file tree
Hide file tree
Showing 7 changed files with 342 additions and 457 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_index/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading

0 comments on commit f6a7993

Please sign in to comment.