提交 319c7f77 编写于 作者: R Ralf Jung

fmt

上级 751b594c
...@@ -651,7 +651,10 @@ fn ecx(&self) -> &InterpCx<'mir, 'tcx, M> { ...@@ -651,7 +651,10 @@ fn ecx(&self) -> &InterpCx<'mir, 'tcx, M> {
&self.ecx &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| { self.with_elem(PathElem::EnumTag, move |this| {
Ok(try_validation!( Ok(try_validation!(
this.ecx.read_discriminant(op), this.ecx.read_discriminant(op),
...@@ -662,7 +665,8 @@ fn read_discriminant(&mut self, op: OpTy<'tcx, M::PointerTag>) -> InterpResult<' ...@@ -662,7 +665,8 @@ fn read_discriminant(&mut self, op: OpTy<'tcx, M::PointerTag>) -> InterpResult<'
{ "uninitialized bytes" } expected { "a valid enum tag" }, { "uninitialized bytes" } expected { "a valid enum tag" },
err_unsup!(ReadPointerAsBytes) => err_unsup!(ReadPointerAsBytes) =>
{ "a pointer" } expected { "a valid enum tag" }, { "a pointer" } expected { "a valid enum tag" },
).1) )
.1)
}) })
} }
...@@ -829,8 +833,9 @@ fn visit_aggregate( ...@@ -829,8 +833,9 @@ fn visit_aggregate(
throw_validation_failure!(self.path, { "uninitialized bytes" }) throw_validation_failure!(self.path, { "uninitialized bytes" })
} }
err_unsup!(ReadPointerAsBytes) => err_unsup!(ReadPointerAsBytes) => {
throw_validation_failure!(self.path, { "a pointer" } expected { "plain (non-pointer) bytes" }), throw_validation_failure!(self.path, { "a pointer" } expected { "plain (non-pointer) bytes" })
}
// Propagate upwards (that will also check for unexpected errors). // Propagate upwards (that will also check for unexpected errors).
_ => return Err(err), _ => return Err(err),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册