diff options
| author | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-02-22 12:10:29 +0000 |
|---|---|---|
| committer | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-02-22 16:04:04 +0000 |
| commit | 6e48b96692d63a79a14563f27fe5185f122434f8 (patch) | |
| tree | 171bd5869f5d38c5b2b5d8e6dae91884cde9a173 /tests/mir-opt/inline | |
| parent | cbf10affb04c701c58087f450f63e769ad25f3c4 (diff) | |
| download | rust-6e48b96692d63a79a14563f27fe5185f122434f8.tar.gz rust-6e48b96692d63a79a14563f27fe5185f122434f8.zip | |
[AUTO_GENERATED] Migrate compiletest to use `ui_test`-style `//@` directives
Diffstat (limited to 'tests/mir-opt/inline')
25 files changed, 35 insertions, 35 deletions
diff --git a/tests/mir-opt/inline/asm_unwind.rs b/tests/mir-opt/inline/asm_unwind.rs index 0ae20e52211..7708f567c71 100644 --- a/tests/mir-opt/inline/asm_unwind.rs +++ b/tests/mir-opt/inline/asm_unwind.rs @@ -1,9 +1,9 @@ // Tests inlining of `may_unwind` inline assembly. // // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// needs-asm-support -// needs-unwind -// compile-flags: -Zinline-mir-hint-threshold=1000 +//@ needs-asm-support +//@ needs-unwind +//@ compile-flags: -Zinline-mir-hint-threshold=1000 #![feature(asm_unwind)] struct D; diff --git a/tests/mir-opt/inline/caller_with_trivial_bound.rs b/tests/mir-opt/inline/caller_with_trivial_bound.rs index 40f7f4bbab2..2e26a948645 100644 --- a/tests/mir-opt/inline/caller_with_trivial_bound.rs +++ b/tests/mir-opt/inline/caller_with_trivial_bound.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// needs-unwind +//@ needs-unwind #![crate_type = "lib"] pub trait Factory<T> { diff --git a/tests/mir-opt/inline/cycle.rs b/tests/mir-opt/inline/cycle.rs index c251226673d..b2eacfe33b1 100644 --- a/tests/mir-opt/inline/cycle.rs +++ b/tests/mir-opt/inline/cycle.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Zinline-mir-hint-threshold=1000 +//@ compile-flags: -Zinline-mir-hint-threshold=1000 // EMIT_MIR cycle.f.Inline.diff #[inline(always)] diff --git a/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs b/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs index ce5e1855a71..abc0ef5c61d 100644 --- a/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs +++ b/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Zmir-enable-passes=+Inline --crate-type=lib +//@ compile-flags: -Zmir-enable-passes=+Inline --crate-type=lib #![feature(fn_traits, tuple_trait, unboxed_closures)] diff --git a/tests/mir-opt/inline/indirect_destination.rs b/tests/mir-opt/inline/indirect_destination.rs index 82143d85c25..337f617e703 100644 --- a/tests/mir-opt/inline/indirect_destination.rs +++ b/tests/mir-opt/inline/indirect_destination.rs @@ -1,8 +1,8 @@ // Test for inlining with an indirect destination place. // -// unit-test: Inline -// edition: 2021 -// needs-unwind +//@ unit-test: Inline +//@ edition: 2021 +//@ needs-unwind #![crate_type = "lib"] #![feature(custom_mir, core_intrinsics)] use core::intrinsics::mir::*; diff --git a/tests/mir-opt/inline/inline_any_operand.rs b/tests/mir-opt/inline/inline_any_operand.rs index 659b7c3a0a1..8151949214b 100644 --- a/tests/mir-opt/inline/inline_any_operand.rs +++ b/tests/mir-opt/inline/inline_any_operand.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z span_free_formats +//@ compile-flags: -Z span_free_formats // Tests that MIR inliner works for any operand diff --git a/tests/mir-opt/inline/inline_async.rs b/tests/mir-opt/inline/inline_async.rs index 1de87e1e43c..c5684f51cce 100644 --- a/tests/mir-opt/inline/inline_async.rs +++ b/tests/mir-opt/inline/inline_async.rs @@ -3,7 +3,7 @@ // The outcome of optimization is not verfied, just the absence of the cycle. // Regression test for #76181. // -// edition:2018 +//@ edition:2018 #![crate_type = "lib"] diff --git a/tests/mir-opt/inline/inline_box_fn.rs b/tests/mir-opt/inline/inline_box_fn.rs index d2da2393992..3e006016f8c 100644 --- a/tests/mir-opt/inline/inline_box_fn.rs +++ b/tests/mir-opt/inline/inline_box_fn.rs @@ -1,6 +1,6 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// unit-test: Inline -// compile-flags: --crate-type=lib +//@ unit-test: Inline +//@ compile-flags: --crate-type=lib // EMIT_MIR inline_box_fn.call.Inline.diff fn call(x: Box<dyn Fn(i32)>) { diff --git a/tests/mir-opt/inline/inline_closure.rs b/tests/mir-opt/inline/inline_closure.rs index 65f55d49a80..9a3cf54ef07 100644 --- a/tests/mir-opt/inline/inline_closure.rs +++ b/tests/mir-opt/inline/inline_closure.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z span_free_formats +//@ compile-flags: -Z span_free_formats // Tests that MIR inliner can handle closure arguments. (#45894) diff --git a/tests/mir-opt/inline/inline_closure_borrows_arg.rs b/tests/mir-opt/inline/inline_closure_borrows_arg.rs index 1570ab057c7..367037e113c 100644 --- a/tests/mir-opt/inline/inline_closure_borrows_arg.rs +++ b/tests/mir-opt/inline/inline_closure_borrows_arg.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z span_free_formats -Zunsound-mir-opts +//@ compile-flags: -Z span_free_formats -Zunsound-mir-opts // Tests that MIR inliner can handle closure arguments, // even when (#45894) diff --git a/tests/mir-opt/inline/inline_closure_captures.rs b/tests/mir-opt/inline/inline_closure_captures.rs index 2b08b106887..2c2d556f9a9 100644 --- a/tests/mir-opt/inline/inline_closure_captures.rs +++ b/tests/mir-opt/inline/inline_closure_captures.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z span_free_formats +//@ compile-flags: -Z span_free_formats // Tests that MIR inliner can handle closure captures. diff --git a/tests/mir-opt/inline/inline_compatibility.rs b/tests/mir-opt/inline/inline_compatibility.rs index 3ad880715fe..13f28aaacd6 100644 --- a/tests/mir-opt/inline/inline_compatibility.rs +++ b/tests/mir-opt/inline/inline_compatibility.rs @@ -1,6 +1,6 @@ // Checks that only functions with compatible attributes are inlined. -// only-x86_64 -// compile-flags: -Cpanic=abort +//@ only-x86_64 +//@ compile-flags: -Cpanic=abort #![crate_type = "lib"] #![feature(no_sanitize)] diff --git a/tests/mir-opt/inline/inline_coroutine.rs b/tests/mir-opt/inline/inline_coroutine.rs index a82586bf2bf..9500c2261cc 100644 --- a/tests/mir-opt/inline/inline_coroutine.rs +++ b/tests/mir-opt/inline/inline_coroutine.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Zinline-mir-hint-threshold=1000 +//@ compile-flags: -Zinline-mir-hint-threshold=1000 #![feature(coroutines, coroutine_trait)] use std::ops::Coroutine; diff --git a/tests/mir-opt/inline/inline_diverging.rs b/tests/mir-opt/inline/inline_diverging.rs index 25a5b9c5c5e..89ef0fc4a61 100644 --- a/tests/mir-opt/inline/inline_diverging.rs +++ b/tests/mir-opt/inline/inline_diverging.rs @@ -1,7 +1,7 @@ // Tests inlining of diverging calls. // // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Zinline-mir-hint-threshold=1000 +//@ compile-flags: -Zinline-mir-hint-threshold=1000 #![crate_type = "lib"] // EMIT_MIR inline_diverging.f.Inline.diff diff --git a/tests/mir-opt/inline/inline_instruction_set.rs b/tests/mir-opt/inline/inline_instruction_set.rs index 7cb59645587..44faf3a4ed9 100644 --- a/tests/mir-opt/inline/inline_instruction_set.rs +++ b/tests/mir-opt/inline/inline_instruction_set.rs @@ -2,8 +2,8 @@ // // A function is "compatible" when the *callee* has the same attribute or no attribute. // -// compile-flags: --target thumbv4t-none-eabi -// needs-llvm-components: arm +//@ compile-flags: --target thumbv4t-none-eabi +//@ needs-llvm-components: arm #![crate_type = "lib"] #![feature(rustc_attrs)] diff --git a/tests/mir-opt/inline/inline_options.rs b/tests/mir-opt/inline/inline_options.rs index b940c64f0b8..7d7c4f718bd 100644 --- a/tests/mir-opt/inline/inline_options.rs +++ b/tests/mir-opt/inline/inline_options.rs @@ -2,8 +2,8 @@ // Checks that inlining threshold can be controlled with // inline-mir-threshold and inline-hint-threshold options. // -// compile-flags: -Zinline-mir-threshold=90 -// compile-flags: -Zinline-mir-hint-threshold=50 +//@ compile-flags: -Zinline-mir-threshold=90 +//@ compile-flags: -Zinline-mir-hint-threshold=50 // EMIT_MIR inline_options.main.Inline.after.mir fn main() { diff --git a/tests/mir-opt/inline/inline_retag.rs b/tests/mir-opt/inline/inline_retag.rs index 9fb6f709223..5cf7f768f91 100644 --- a/tests/mir-opt/inline/inline_retag.rs +++ b/tests/mir-opt/inline/inline_retag.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z span_free_formats -Z mir-emit-retag +//@ compile-flags: -Z span_free_formats -Z mir-emit-retag // Tests that MIR inliner fixes up `Retag`'s `fn_entry` flag diff --git a/tests/mir-opt/inline/inline_trait_method.rs b/tests/mir-opt/inline/inline_trait_method.rs index b39355637a1..34d2c205791 100644 --- a/tests/mir-opt/inline/inline_trait_method.rs +++ b/tests/mir-opt/inline/inline_trait_method.rs @@ -1,6 +1,6 @@ // Verify that we do not inline the default impl in a trait object. // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Z span_free_formats +//@ compile-flags: -Z span_free_formats fn main() { println!("{}", test(&())); diff --git a/tests/mir-opt/inline/inline_trait_method_2.rs b/tests/mir-opt/inline/inline_trait_method_2.rs index b0b6a7b9b01..c3a71e63783 100644 --- a/tests/mir-opt/inline/inline_trait_method_2.rs +++ b/tests/mir-opt/inline/inline_trait_method_2.rs @@ -1,5 +1,5 @@ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// compile-flags: -Z span_free_formats -Z mir-opt-level=4 +//@ compile-flags: -Z span_free_formats -Z mir-opt-level=4 // EMIT_MIR inline_trait_method_2.test2.Inline.after.mir fn test2(x: &dyn X) -> bool { diff --git a/tests/mir-opt/inline/issue_78442.rs b/tests/mir-opt/inline/issue_78442.rs index f9a5234283a..2fbe0c6c64c 100644 --- a/tests/mir-opt/inline/issue_78442.rs +++ b/tests/mir-opt/inline/issue_78442.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z mir-opt-level=3 -Z inline-mir +//@ compile-flags: -Z mir-opt-level=3 -Z inline-mir // EMIT_MIR_FOR_EACH_PANIC_STRATEGY #![crate_type = "lib"] diff --git a/tests/mir-opt/inline/polymorphic_recursion.rs b/tests/mir-opt/inline/polymorphic_recursion.rs index f71e382e867..0338d604635 100644 --- a/tests/mir-opt/inline/polymorphic_recursion.rs +++ b/tests/mir-opt/inline/polymorphic_recursion.rs @@ -1,6 +1,6 @@ // skip-filecheck // Make sure that the MIR inliner does not loop indefinitely on polymorphic recursion. -// compile-flags: --crate-type lib +//@ compile-flags: --crate-type lib // Randomize `def_path_hash` by defining them under a module with different names macro_rules! emit { diff --git a/tests/mir-opt/inline/unchecked_shifts.rs b/tests/mir-opt/inline/unchecked_shifts.rs index 0de80641c9c..2fd18f3d5eb 100644 --- a/tests/mir-opt/inline/unchecked_shifts.rs +++ b/tests/mir-opt/inline/unchecked_shifts.rs @@ -2,8 +2,8 @@ #![crate_type = "lib"] #![feature(unchecked_shifts)] -// ignore-debug: the debug assertions prevent the inlining we are testing for -// compile-flags: -Zmir-opt-level=2 -Zinline-mir +//@ ignore-debug: the debug assertions prevent the inlining we are testing for +//@ compile-flags: -Zmir-opt-level=2 -Zinline-mir // EMIT_MIR unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.diff // EMIT_MIR unchecked_shifts.unchecked_shl_unsigned_smaller.PreCodegen.after.mir diff --git a/tests/mir-opt/inline/unit_test.rs b/tests/mir-opt/inline/unit_test.rs index 0d877bb10b4..f6c3d6a58de 100644 --- a/tests/mir-opt/inline/unit_test.rs +++ b/tests/mir-opt/inline/unit_test.rs @@ -1,5 +1,5 @@ // Check that `-Zmir-enable-passes=+Inline` does not ICE because of stolen MIR. -// unit-test: Inline +//@ unit-test: Inline // skip-filecheck #![crate_type = "lib"] diff --git a/tests/mir-opt/inline/unsized_argument.rs b/tests/mir-opt/inline/unsized_argument.rs index e8c2bc10be2..281f7fe7753 100644 --- a/tests/mir-opt/inline/unsized_argument.rs +++ b/tests/mir-opt/inline/unsized_argument.rs @@ -1,4 +1,4 @@ -// needs-unwind +//@ needs-unwind #![feature(unsized_fn_params)] #[inline(always)] diff --git a/tests/mir-opt/inline/unwrap_unchecked.rs b/tests/mir-opt/inline/unwrap_unchecked.rs index 1adf2224d97..e44e4e23a2c 100644 --- a/tests/mir-opt/inline/unwrap_unchecked.rs +++ b/tests/mir-opt/inline/unwrap_unchecked.rs @@ -1,8 +1,8 @@ #![crate_type = "lib"] // EMIT_MIR_FOR_EACH_PANIC_STRATEGY -// ignore-debug: the debug assertions prevent the inlining we are testing for -// compile-flags: -Zmir-opt-level=2 -Zinline-mir -Cdebug-assertions=no +//@ ignore-debug: the debug assertions prevent the inlining we are testing for +//@ compile-flags: -Zmir-opt-level=2 -Zinline-mir -Cdebug-assertions=no // EMIT_MIR unwrap_unchecked.unwrap_unchecked.Inline.diff // EMIT_MIR unwrap_unchecked.unwrap_unchecked.PreCodegen.after.mir |
