1
Fork 0

Put FnAbiError behind reference to shrink result

The `FnAbi` is just a pointer, so the error type should not be bigger.
This commit is contained in:
Nilstrieb 2023-04-30 23:14:53 +02:00
parent 3019c1cb2a
commit 4be84771a7
4 changed files with 20 additions and 25 deletions

View file

@ -71,8 +71,8 @@ impl<T> EraseType for Result<&'_ T, traits::CodegenObligationError> {
type Result = [u8; size_of::<Result<&'static (), traits::CodegenObligationError>>()];
}
impl<T> EraseType for Result<&'_ T, ty::layout::FnAbiError<'_>> {
type Result = [u8; size_of::<Result<&'static (), ty::layout::FnAbiError<'static>>>()];
impl<T> EraseType for Result<&'_ T, &'_ ty::layout::FnAbiError<'_>> {
type Result = [u8; size_of::<Result<&'static (), &'static ty::layout::FnAbiError<'static>>>()];
}
impl<T> EraseType for Result<(&'_ T, rustc_middle::thir::ExprId), rustc_errors::ErrorGuaranteed> {