Remove an unnecessary unwrap in rustc_codegen_gcc

This commit is contained in:
AudaciousAxiom 2025-11-29 10:19:56 +01:00
parent 3c5c55864f
commit d3653e9f59

View file

@ -503,9 +503,9 @@ fn set_rvalue_location<'a, 'gcc, 'tcx>(
bx: &mut Builder<'a, 'gcc, 'tcx>,
rvalue: RValue<'gcc>,
) -> RValue<'gcc> {
if bx.location.is_some() {
if let Some(location) = bx.location {
#[cfg(feature = "master")]
rvalue.set_location(bx.location.unwrap());
rvalue.set_location(location);
}
rvalue
}