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

fmt

上级 751b594c
......@@ -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),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册