Skip to content

Commit 5fcfb4e

Browse files
committed
Impl TypeInfo for splat
1 parent ce1b06e commit 5fcfb4e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

compiler/rustc_const_eval/src/const_eval/type_info.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,15 @@ impl<'tcx> InterpCx<'tcx, CompileTimeMachine<'tcx>> {
465465
sym::variadic => {
466466
self.write_scalar(Scalar::from_bool(fn_sig_kind.c_variadic()), &field_place)?;
467467
}
468+
sym::splat => {
469+
self.write_scalar(
470+
// Use the same encoding as FnSigKind.splatted
471+
Scalar::from_u16(
472+
fn_sig_kind.splatted().unwrap_or(FnSigKind::NO_SPLATTED_ARG_INDEX),
473+
),
474+
&field_place,
475+
)?;
476+
}
468477
other => span_bug!(self.tcx.def_span(field.did), "unimplemented field {other}"),
469478
}
470479
}

0 commit comments

Comments
 (0)