Skip to content

Commit d3653e9

Browse files
Remove an unnecessary unwrap in rustc_codegen_gcc
1 parent 3c5c558 commit d3653e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_codegen_gcc/src/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,9 @@ fn set_rvalue_location<'a, 'gcc, 'tcx>(
503503
bx: &mut Builder<'a, 'gcc, 'tcx>,
504504
rvalue: RValue<'gcc>,
505505
) -> RValue<'gcc> {
506-
if bx.location.is_some() {
506+
if let Some(location) = bx.location {
507507
#[cfg(feature = "master")]
508-
rvalue.set_location(bx.location.unwrap());
508+
rvalue.set_location(location);
509509
}
510510
rvalue
511511
}

0 commit comments

Comments
 (0)