about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAntoni Boucher <bouanto@zoho.com>2023-06-18 19:42:20 -0400
committerAntoni Boucher <bouanto@zoho.com>2023-06-18 19:42:20 -0400
commit37413a2cea694f4a447f2268afc11fca1afe026a (patch)
tree7b7e0f85b253b56b55537355d337b7df803c0a74
parent607cbfda14ab8a4292d34afdffdf817f81fe95ab (diff)
downloadrust-37413a2cea694f4a447f2268afc11fca1afe026a.tar.gz
rust-37413a2cea694f4a447f2268afc11fca1afe026a.zip
Fix indent
-rw-r--r--src/asm.rs67
-rwxr-xr-xtest.sh3
2 files changed, 34 insertions, 36 deletions
diff --git a/src/asm.rs b/src/asm.rs
index be7ae603ca6..4c3b7f5036c 100644
--- a/src/asm.rs
+++ b/src/asm.rs
@@ -502,49 +502,48 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
             let builtin_unreachable = self.context.get_builtin_function("__builtin_unreachable");
             let builtin_unreachable: RValue<'gcc> = unsafe { std::mem::transmute(builtin_unreachable) };
             self.call(self.type_void(), None, None, builtin_unreachable, &[], None);
-    }
+        }
 
-    // Write results to outputs.
-    //
-    // We need to do this because:
-    //  1. Turning `PlaceRef` into `RValue` is error-prone and has nasty edge cases
-    //     (especially with current `rustc_backend_ssa` API).
-    //  2. Not every output operand has an `out_place`, and it's required by `add_output_operand`.
-    //
-    // Instead, we generate a temporary output variable for each output operand, and then this loop,
-    // generates `out_place = tmp_var;` assignments if out_place exists.
-    for op in &outputs {
-        if let Some(place) = op.out_place {
-            OperandValue::Immediate(op.tmp_var.to_rvalue()).store(self, place);
+        // Write results to outputs.
+        //
+        // We need to do this because:
+        //  1. Turning `PlaceRef` into `RValue` is error-prone and has nasty edge cases
+        //     (especially with current `rustc_backend_ssa` API).
+        //  2. Not every output operand has an `out_place`, and it's required by `add_output_operand`.
+        //
+        // Instead, we generate a temporary output variable for each output operand, and then this loop,
+        // generates `out_place = tmp_var;` assignments if out_place exists.
+        for op in &outputs {
+            if let Some(place) = op.out_place {
+                OperandValue::Immediate(op.tmp_var.to_rvalue()).store(self, place);
+            }
         }
     }
-
-}
 }
 
 fn estimate_template_length(template: &[InlineAsmTemplatePiece], constants_len: usize, att_dialect: bool) -> usize {
-let len: usize = template.iter().map(|piece| {
-    match *piece {
-        InlineAsmTemplatePiece::String(ref string) => {
-            string.len()
-        }
-        InlineAsmTemplatePiece::Placeholder { .. } => {
-            // '%' + 1 char modifier + 1 char index
-            3
+    let len: usize = template.iter().map(|piece| {
+        match *piece {
+            InlineAsmTemplatePiece::String(ref string) => {
+                string.len()
+            }
+            InlineAsmTemplatePiece::Placeholder { .. } => {
+                // '%' + 1 char modifier + 1 char index
+                3
+            }
         }
-    }
-})
-.sum();
+    })
+    .sum();
 
-// increase it by 5% to account for possible '%' signs that'll be duplicated
-// I pulled the number out of blue, but should be fair enough
-// as the upper bound
-let mut res = (len as f32 * 1.05) as usize + constants_len;
+    // increase it by 5% to account for possible '%' signs that'll be duplicated
+    // I pulled the number out of blue, but should be fair enough
+    // as the upper bound
+    let mut res = (len as f32 * 1.05) as usize + constants_len;
 
-if att_dialect {
-    res += INTEL_SYNTAX_INS.len() + ATT_SYNTAX_INS.len();
-}
-res
+    if att_dialect {
+        res += INTEL_SYNTAX_INS.len() + ATT_SYNTAX_INS.len();
+    }
+    res
 }
 
 /// Converts a register class to a GCC constraint code.
diff --git a/test.sh b/test.sh
index d12fe718a96..592997b8ab9 100755
--- a/test.sh
+++ b/test.sh
@@ -357,7 +357,6 @@ function test_rustc() {
 
     RUSTC_ARGS="$TEST_FLAGS -Csymbol-mangling-version=v0 -Zcodegen-backend="$(pwd)"/../target/"$CHANNEL"/librustc_codegen_gcc."$dylib_ext" --sysroot "$(pwd)"/../build_sysroot/sysroot"
 
-
     if [ $# -eq 0 ]; then
         # No argument supplied to the function. Doing nothing.
         echo "No argument provided. Keeping all UI tests"
@@ -388,7 +387,7 @@ function test_rustc() {
     fi
 
     echo "[TEST] rustc test suite"
-    COMPILETEST_FORCE_STAGE0=1 ./x.py test --run always --stage 0 tests/ui --rustc-args "$RUSTC_ARGS"
+    COMPILETEST_FORCE_STAGE0=1 ./x.py test --run always --stage 0 tests/ui/ --rustc-args "$RUSTC_ARGS"
 }
 
 function test_failing_rustc() {