summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src/common.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2024-07-17 20:22:07 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2024-07-17 20:22:07 +0200
commit213782dd715452afbf2af1c8f6ea5ae6a93d000c (patch)
tree32cfda93d259af0939c7d913607241ae193390f2 /compiler/rustc_codegen_gcc/src/common.rs
parent12bedc3e2b81a7d74fe2986d1582644fb8ed558b (diff)
downloadrust-213782dd715452afbf2af1c8f6ea5ae6a93d000c.tar.gz
rust-213782dd715452afbf2af1c8f6ea5ae6a93d000c.zip
Format cg_gcc with same formatting parameters
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/common.rs')
-rw-r--r--compiler/rustc_codegen_gcc/src/common.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_gcc/src/common.rs b/compiler/rustc_codegen_gcc/src/common.rs
index 19333689aaa..70f0dc37e39 100644
--- a/compiler/rustc_codegen_gcc/src/common.rs
+++ b/compiler/rustc_codegen_gcc/src/common.rs
@@ -58,11 +58,7 @@ pub fn type_is_pointer(typ: Type<'_>) -> bool {
 
 impl<'gcc, 'tcx> ConstMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
     fn const_null(&self, typ: Type<'gcc>) -> RValue<'gcc> {
-        if type_is_pointer(typ) {
-            self.context.new_null(typ)
-        } else {
-            self.const_int(typ, 0)
-        }
+        if type_is_pointer(typ) { self.context.new_null(typ) } else { self.const_int(typ, 0) }
     }
 
     fn const_undef(&self, typ: Type<'gcc>) -> RValue<'gcc> {