Skip to content

Commit

Permalink
Run x.py fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Dec 16, 2021
1 parent 070bf94 commit a5b3dfe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion compiler/rustc_middle/src/mir/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,9 @@ pub struct RenderAllocation<'a, 'tcx, Tag, Extra> {
alloc: &'a Allocation<Tag, Extra>,
}

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())?;
Expand Down
6 changes: 5 additions & 1 deletion compiler/rustc_middle/src/ty/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T, usize>,
Expand Down

0 comments on commit a5b3dfe

Please sign in to comment.