Skip to content

Commit e18d3c3

Browse files
tempdragonantoyo
andauthored
fix(builder.rs): Apply suggestions from code review
Co-authored-by: antoyo <[email protected]>
1 parent ef158f2 commit e18d3c3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/builder.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
659659
}
660660

661661
fn xor(&mut self, a: RValue<'gcc>, b: RValue<'gcc>) -> RValue<'gcc> {
662-
set_rval_location(self,self.gcc_xor(a, b))
662+
set_rval_location(self, self.gcc_xor(a, b))
663663
}
664664

665665
fn neg(&mut self, a: RValue<'gcc>) -> RValue<'gcc> {
@@ -721,9 +721,9 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
721721

722722
fn frem_fast(&mut self, lhs: RValue<'gcc>, rhs: RValue<'gcc>) -> RValue<'gcc> {
723723
// NOTE: it seems like we cannot enable fast-mode for a single operation in GCC.
724-
let i = self.frem(lhs, rhs);
725-
set_rval_location(self,i);
726-
i
724+
let result = self.frem(lhs, rhs);
725+
set_rval_location(self, i);
726+
result
727727
}
728728

729729
fn checked_binop(&mut self, oop: OverflowOp, typ: Ty<'_>, lhs: Self::Value, rhs: Self::Value) -> (Self::Value, Self::Value) {
@@ -1010,7 +1010,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
10101010
}
10111011

10121012
fn fptoui(&mut self, value: RValue<'gcc>, dest_ty: Type<'gcc>) -> RValue<'gcc> {
1013-
set_rval_location(self,self.gcc_float_to_uint_cast(value, dest_ty))
1013+
set_rval_location(self, self.gcc_float_to_uint_cast(value, dest_ty))
10141014
}
10151015

10161016
fn fptosi(&mut self, value: RValue<'gcc>, dest_ty: Type<'gcc>) -> RValue<'gcc> {
@@ -1036,7 +1036,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
10361036

10371037
fn ptrtoint(&mut self, value: RValue<'gcc>, dest_ty: Type<'gcc>) -> RValue<'gcc> {
10381038
let usize_value = self.cx.const_bitcast(value, self.cx.type_isize());
1039-
self.intcast(usize_value, dest_ty, false)
1039+
self.intcast(usize_value, dest_ty, false)
10401040
}
10411041

10421042
fn inttoptr(&mut self, value: RValue<'gcc>, dest_ty: Type<'gcc>) -> RValue<'gcc> {

0 commit comments

Comments
 (0)