1
Fork 0

Begin nightly-ifying rustc_type_ir

This commit is contained in:
Michael Goulet 2023-10-24 00:16:14 +00:00
parent 2831701757
commit 4506681e2f
19 changed files with 214 additions and 102 deletions

View file

@ -6,6 +6,7 @@ edition = "2021"
[dependencies]
# tidy-alphabetical-start
arrayvec = { version = "0.7", default-features = false }
rustc_index_macros = { path = "../rustc_index_macros", default-features = false }
rustc_macros = { path = "../rustc_macros", optional = true }
rustc_serialize = { path = "../rustc_serialize", optional = true }
smallvec = "1.8.1"
@ -14,5 +15,5 @@ smallvec = "1.8.1"
[features]
# tidy-alphabetical-start
default = ["nightly"]
nightly = ["rustc_serialize", "rustc_macros"]
nightly = ["rustc_serialize", "rustc_macros", "rustc_index_macros/nightly"]
# tidy-alphabetical-end

View file

@ -25,8 +25,7 @@ mod vec;
pub use {idx::Idx, slice::IndexSlice, vec::IndexVec};
#[cfg(feature = "rustc_macros")]
pub use rustc_macros::newtype_index;
pub use rustc_index_macros::newtype_index;
/// Type size assertion. The first argument is a type and the second argument is its expected size.
///

View file

@ -1,7 +1,7 @@
// Allows the macro invocation below to work
use crate as rustc_index;
rustc_macros::newtype_index! {
crate::newtype_index! {
#[max = 0xFFFF_FFFA]
struct MyIdx {}
}