1
Fork 0

Auto merge of #116269 - Veykril:rustc-abi, r=WaffleLapkin

Bring back generic parameters for indices in rustc_abi and make it compile on stable

This effectively reverses https://github.com/rust-lang/rust/pull/107163, allowing rust-analyzer to depend on this crate again,

It also moves some glob imports / expands them in the first commit because they made it more difficult for me to reason about things.
This commit is contained in:
bors 2023-10-06 00:03:56 +00:00
commit 2c9b0de8ea
9 changed files with 295 additions and 232 deletions

View file

@ -85,7 +85,7 @@ fn univariant_uninterned<'tcx>(
fields: &IndexSlice<FieldIdx, Layout<'_>>,
repr: &ReprOptions,
kind: StructKind,
) -> Result<LayoutS, &'tcx LayoutError<'tcx>> {
) -> Result<LayoutS<FieldIdx, VariantIdx>, &'tcx LayoutError<'tcx>> {
let dl = cx.data_layout();
let pack = repr.pack;
if pack.is_some() && repr.align.is_some() {