diff --git a/src/librustc_mir/interpret/validity.rs b/src/librustc_mir/interpret/validity.rs index 2e28ed0f91765d1ef726e260b757803d4abdd224..ab836595a7acc57e39f6ebc5bc8aba4386212bad 100644 --- a/src/librustc_mir/interpret/validity.rs +++ b/src/librustc_mir/interpret/validity.rs @@ -651,7 +651,10 @@ fn ecx(&self) -> &InterpCx<'mir, 'tcx, M> { &self.ecx } - fn read_discriminant(&mut self, op: OpTy<'tcx, M::PointerTag>) -> InterpResult<'tcx, VariantIdx> { + fn read_discriminant( + &mut self, + op: OpTy<'tcx, M::PointerTag>, + ) -> InterpResult<'tcx, VariantIdx> { self.with_elem(PathElem::EnumTag, move |this| { Ok(try_validation!( this.ecx.read_discriminant(op), @@ -662,7 +665,8 @@ fn read_discriminant(&mut self, op: OpTy<'tcx, M::PointerTag>) -> InterpResult<' { "uninitialized bytes" } expected { "a valid enum tag" }, err_unsup!(ReadPointerAsBytes) => { "a pointer" } expected { "a valid enum tag" }, - ).1) + ) + .1) }) } @@ -829,8 +833,9 @@ fn visit_aggregate( throw_validation_failure!(self.path, { "uninitialized bytes" }) } - err_unsup!(ReadPointerAsBytes) => - throw_validation_failure!(self.path, { "a pointer" } expected { "plain (non-pointer) bytes" }), + err_unsup!(ReadPointerAsBytes) => { + throw_validation_failure!(self.path, { "a pointer" } expected { "plain (non-pointer) bytes" }) + } // Propagate upwards (that will also check for unexpected errors). _ => return Err(err),