about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authortempdragon <88025134+tempdragon@users.noreply.github.com>2024-02-29 03:00:46 +0800
committerGitHub <noreply@github.com>2024-02-29 03:00:46 +0800
commite18d3c3dfdfbf9c8f50479ac64de5da6754035fb (patch)
treec770ca1243223cf9d1e9d3b537854785d141fb24 /src
parentef158f295ecd37413a11b9f01d203f7b2440cbe6 (diff)
downloadrust-e18d3c3dfdfbf9c8f50479ac64de5da6754035fb.tar.gz
rust-e18d3c3dfdfbf9c8f50479ac64de5da6754035fb.zip
fix(builder.rs): Apply suggestions from code review
Co-authored-by: antoyo <antoyo@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/builder.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/builder.rs b/src/builder.rs
index 87b5b04af13..9afca472b5f 100644
--- a/src/builder.rs
+++ b/src/builder.rs
@@ -659,7 +659,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
     }
 
     fn xor(&mut self, a: RValue<'gcc>, b: RValue<'gcc>) -> RValue<'gcc> {
-        set_rval_location(self,self.gcc_xor(a, b))
+        set_rval_location(self, self.gcc_xor(a, b))
     }
 
     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> {
 
     fn frem_fast(&mut self, lhs: RValue<'gcc>, rhs: RValue<'gcc>) -> RValue<'gcc> {
         // NOTE: it seems like we cannot enable fast-mode for a single operation in GCC.
-        let i = self.frem(lhs, rhs);
-        set_rval_location(self,i);
-        i
+        let result = self.frem(lhs, rhs);
+        set_rval_location(self, i);
+        result
     }
 
     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> {
     }
 
     fn fptoui(&mut self, value: RValue<'gcc>, dest_ty: Type<'gcc>) -> RValue<'gcc> {
-        set_rval_location(self,self.gcc_float_to_uint_cast(value, dest_ty))
+        set_rval_location(self, self.gcc_float_to_uint_cast(value, dest_ty))
     }
 
     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> {
 
     fn ptrtoint(&mut self, value: RValue<'gcc>, dest_ty: Type<'gcc>) -> RValue<'gcc> {
         let usize_value = self.cx.const_bitcast(value, self.cx.type_isize());
-        self.intcast(usize_value, dest_ty, false)        
+        self.intcast(usize_value, dest_ty, false)
     }
 
     fn inttoptr(&mut self, value: RValue<'gcc>, dest_ty: Type<'gcc>) -> RValue<'gcc> {