Add some docs regarding rustc_abi rust-analyzer compat changes

This commit is contained in:
Lukas Wirth 2023-09-29 18:02:59 +02:00
parent 6d141c11c0
commit b25c84510d
2 changed files with 7 additions and 1 deletions

View File

@ -15,7 +15,9 @@ rustc_serialize = { path = "../rustc_serialize", optional = true }
[features]
default = ["nightly", "randomize"]
randomize = ["rand", "rand_xoshiro"]
randomize = ["rand", "rand_xoshiro", "nightly"]
# rust-analyzer depends on this crate and we therefore require it to built on a stable toolchain
# without depending on rustc_data_structures, rustc_macros and rustc_serialize
nightly = [
"rustc_data_structures",
"rustc_index/nightly",

View File

@ -1102,6 +1102,7 @@ impl Scalar {
}
}
// NOTE: This struct is generic over the FieldIdx for rust-analyzer usage.
/// Describes how the fields of a type are located in memory.
#[derive(PartialEq, Eq, Hash, Clone, Debug)]
#[cfg_attr(feature = "nightly", derive(HashStable_Generic))]
@ -1355,6 +1356,7 @@ impl Abi {
}
}
// NOTE: This struct is generic over the FieldIdx and VariantIdx for rust-analyzer usage.
#[derive(PartialEq, Eq, Hash, Clone, Debug)]
#[cfg_attr(feature = "nightly", derive(HashStable_Generic))]
pub enum Variants<FieldIdx: Idx, VariantIdx: Idx> {
@ -1375,6 +1377,7 @@ pub enum Variants<FieldIdx: Idx, VariantIdx: Idx> {
},
}
// NOTE: This struct is generic over the VariantIdx for rust-analyzer usage.
#[derive(PartialEq, Eq, Hash, Clone, Debug)]
#[cfg_attr(feature = "nightly", derive(HashStable_Generic))]
pub enum TagEncoding<VariantIdx: Idx> {
@ -1485,6 +1488,7 @@ impl Niche {
}
}
// NOTE: This struct is generic over the FieldIdx and VariantIdx for rust-analyzer usage.
#[derive(PartialEq, Eq, Hash, Clone)]
#[cfg_attr(feature = "nightly", derive(HashStable_Generic))]
pub struct LayoutS<FieldIdx: Idx, VariantIdx: Idx> {