From a5b3dfe45355969796747fd4167e837463ccf998 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Wed, 15 Dec 2021 19:48:59 -0500 Subject: [PATCH] Run x.py fmt --- compiler/rustc_middle/src/mir/pretty.rs | 4 +++- compiler/rustc_middle/src/ty/codec.rs | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_middle/src/mir/pretty.rs b/compiler/rustc_middle/src/mir/pretty.rs index 0af9c29759a1a..8cc705384b03e 100644 --- a/compiler/rustc_middle/src/mir/pretty.rs +++ b/compiler/rustc_middle/src/mir/pretty.rs @@ -775,7 +775,9 @@ pub struct RenderAllocation<'a, 'tcx, Tag, Extra> { alloc: &'a Allocation, } -impl<'a, 'tcx, Tag: Provenance, Extra> std::fmt::Display for RenderAllocation<'a, 'tcx, Tag, Extra> { +impl<'a, 'tcx, Tag: Provenance, Extra> std::fmt::Display + for RenderAllocation<'a, 'tcx, Tag, Extra> +{ fn fmt(&self, w: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let RenderAllocation { tcx, alloc } = *self; write!(w, "size: {}, align: {})", alloc.size().bytes(), alloc.align.bytes())?; diff --git a/compiler/rustc_middle/src/ty/codec.rs b/compiler/rustc_middle/src/ty/codec.rs index b1e2054124bb2..f7601a18790b2 100644 --- a/compiler/rustc_middle/src/ty/codec.rs +++ b/compiler/rustc_middle/src/ty/codec.rs @@ -76,7 +76,11 @@ pub trait RefDecodable<'tcx, D: TyDecoder<'tcx>> { } /// Encode the given value or a previously cached shorthand. -pub fn encode_with_shorthand<'tcx, E, T, M>(encoder: &mut E, value: &T, cache: M) -> Result<(), E::Error> +pub fn encode_with_shorthand<'tcx, E, T, M>( + encoder: &mut E, + value: &T, + cache: M, +) -> Result<(), E::Error> where E: TyEncoder<'tcx>, M: for<'b> Fn(&'b mut E) -> &'b mut FxHashMap,