mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 05:57:03 +03:00
Replace some stray try!s with ?.
This commit is contained in:
+2
-2
@@ -520,7 +520,7 @@ pub(super) fn eval_rvalue_into_lvalue(
|
||||
if let mir::AggregateKind::Adt(_, variant, _, _) = *kind {
|
||||
if nndiscr == variant as u64 {
|
||||
let offsets = nonnull.offsets.iter().map(|s| s.bytes());
|
||||
try!(self.assign_fields(dest, offsets, operands));
|
||||
self.assign_fields(dest, offsets, operands)?;
|
||||
} else {
|
||||
for operand in operands {
|
||||
let operand_ty = self.operand_ty(operand);
|
||||
@@ -533,7 +533,7 @@ pub(super) fn eval_rvalue_into_lvalue(
|
||||
|
||||
let dest = dest.offset(offset.bytes());
|
||||
let dest_size = self.type_size(ty)?.expect("bad StructWrappedNullablePointer discrfield");
|
||||
try!(self.memory.write_int(dest, 0, dest_size));
|
||||
self.memory.write_int(dest, 0, dest_size)?;
|
||||
}
|
||||
} else {
|
||||
bug!("tried to assign {:?} to Layout::RawNullablePointer", kind);
|
||||
|
||||
Reference in New Issue
Block a user