Run x.py fmt

This commit is contained in:
Aaron Hill 2021-12-15 19:48:59 -05:00
parent 070bf94a6f
commit a5b3dfe453
No known key found for this signature in database
GPG Key ID: B4087E510E98B164
2 changed files with 8 additions and 2 deletions

View File

@ -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())?;

View File

@ -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>,