Skip to content

Commit 37204ee

Browse files
committed
Use associative type defaults in {Layout,FnAbi}OfHelpers.
This avoids some repetitive boilerplate code.
1 parent 15848f3 commit 37204ee

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

‎src/common.rs‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -309,17 +309,13 @@ pub(crate) struct FunctionCx<'m, 'clif, 'tcx: 'm> {
309309
}
310310

311311
impl<'tcx>LayoutOfHelpers<'tcx>forFunctionCx<'_,'_,'tcx>{
312-
typeLayoutOfResult = TyAndLayout<'tcx>;
313-
314312
#[inline]
315313
fnhandle_layout_err(&self,err:LayoutError<'tcx>,span:Span,ty:Ty<'tcx>) -> ! {
316314
RevealAllLayoutCx(self.tcx).handle_layout_err(err, span, ty)
317315
}
318316
}
319317

320318
impl<'tcx>FnAbiOfHelpers<'tcx>forFunctionCx<'_,'_,'tcx>{
321-
typeFnAbiOfResult = &'tcxFnAbi<'tcx,Ty<'tcx>>;
322-
323319
#[inline]
324320
fnhandle_fn_abi_err(
325321
&self,
@@ -450,8 +446,6 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
450446
pub(crate)structRevealAllLayoutCx<'tcx>(pub(crate)TyCtxt<'tcx>);
451447

452448
impl<'tcx>LayoutOfHelpers<'tcx>forRevealAllLayoutCx<'tcx>{
453-
typeLayoutOfResult = TyAndLayout<'tcx>;
454-
455449
#[inline]
456450
fnhandle_layout_err(&self,err:LayoutError<'tcx>,span:Span,ty:Ty<'tcx>) -> ! {
457451
ifletLayoutError::SizeOverflow(_) | LayoutError::ReferencesError(_) = err {
@@ -466,8 +460,6 @@ impl<'tcx> LayoutOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> {
466460
}
467461

468462
impl<'tcx>FnAbiOfHelpers<'tcx>forRevealAllLayoutCx<'tcx>{
469-
typeFnAbiOfResult = &'tcxFnAbi<'tcx,Ty<'tcx>>;
470-
471463
#[inline]
472464
fnhandle_fn_abi_err(
473465
&self,

0 commit comments

Comments
 (0)