Use associative type defaults in {Layout,FnAbi}OfHelpers
.
This avoids some repetitive boilerplate code.
This commit is contained in:
parent
a8d22eb39e
commit
acb832d640
8 changed files with 5 additions and 34 deletions
|
@ -93,8 +93,6 @@ impl HasTargetSpec for Builder<'_, '_, '_> {
|
|||
}
|
||||
|
||||
impl<'tcx> LayoutOfHelpers<'tcx> for Builder<'_, '_, 'tcx> {
|
||||
type LayoutOfResult = TyAndLayout<'tcx>;
|
||||
|
||||
#[inline]
|
||||
fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! {
|
||||
self.cx.handle_layout_err(err, span, ty)
|
||||
|
@ -102,8 +100,6 @@ impl<'tcx> LayoutOfHelpers<'tcx> for Builder<'_, '_, 'tcx> {
|
|||
}
|
||||
|
||||
impl<'tcx> FnAbiOfHelpers<'tcx> for Builder<'_, '_, 'tcx> {
|
||||
type FnAbiOfResult = &'tcx FnAbi<'tcx, Ty<'tcx>>;
|
||||
|
||||
#[inline]
|
||||
fn handle_fn_abi_err(
|
||||
&self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue