diff options
| author | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-02-16 20:02:50 +0000 |
|---|---|---|
| committer | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-02-16 20:02:50 +0000 |
| commit | ec2cc761bc7067712ecc7734502f703fe3b024c8 (patch) | |
| tree | 7ab55cd9562da45b86c959f1b98c199b2b03ca92 /tests/ui/codegen | |
| parent | e53d6dd35bb38b81dff4b00497f4c152e9009499 (diff) | |
| download | rust-ec2cc761bc7067712ecc7734502f703fe3b024c8.tar.gz rust-ec2cc761bc7067712ecc7734502f703fe3b024c8.zip | |
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
Diffstat (limited to 'tests/ui/codegen')
26 files changed, 59 insertions, 59 deletions
diff --git a/tests/ui/codegen/const-bool-bitcast.rs b/tests/ui/codegen/const-bool-bitcast.rs index 24ae76b9029..58db7859438 100644 --- a/tests/ui/codegen/const-bool-bitcast.rs +++ b/tests/ui/codegen/const-bool-bitcast.rs @@ -1,6 +1,6 @@ // This is a regression test for https://github.com/rust-lang/rust/issues/118047 -// build-pass -// compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+DataflowConstProp +//@ build-pass +//@ compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+DataflowConstProp #![crate_type = "lib"] diff --git a/tests/ui/codegen/freeze-on-polymorphic-projection.rs b/tests/ui/codegen/freeze-on-polymorphic-projection.rs index edc79f8fd94..f382a3780fc 100644 --- a/tests/ui/codegen/freeze-on-polymorphic-projection.rs +++ b/tests/ui/codegen/freeze-on-polymorphic-projection.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Copt-level=1 --crate-type=lib +//@ build-pass +//@ compile-flags: -Copt-level=1 --crate-type=lib #![feature(specialization)] //~^ WARN the feature `specialization` is incomplete diff --git a/tests/ui/codegen/init-large-type.rs b/tests/ui/codegen/init-large-type.rs index ce905572f2a..34b40693ab1 100644 --- a/tests/ui/codegen/init-large-type.rs +++ b/tests/ui/codegen/init-large-type.rs @@ -1,13 +1,13 @@ -// compile-flags: -O -// run-pass +//@ compile-flags: -O +//@ run-pass #![allow(unused_must_use)] // Makes sure that zero-initializing large types is reasonably fast, // Doing it incorrectly causes massive slowdown in LLVM during // optimisation. -// pretty-expanded FIXME #23616 -// ignore-emscripten no threads support +//@ pretty-expanded FIXME #23616 +//@ ignore-emscripten no threads support #![feature(intrinsics)] diff --git a/tests/ui/codegen/issue-101585-128bit-repeat.rs b/tests/ui/codegen/issue-101585-128bit-repeat.rs index c6a686597e9..18c02a33438 100644 --- a/tests/ui/codegen/issue-101585-128bit-repeat.rs +++ b/tests/ui/codegen/issue-101585-128bit-repeat.rs @@ -1,5 +1,5 @@ // Regression test for issue 101585. -// run-pass +//@ run-pass fn main() { fn min_array_ok() -> [i128; 1] { diff --git a/tests/ui/codegen/issue-16602-1.rs b/tests/ui/codegen/issue-16602-1.rs index dd64ee75b34..248050adb32 100644 --- a/tests/ui/codegen/issue-16602-1.rs +++ b/tests/ui/codegen/issue-16602-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let mut t = [1; 2]; t = [t[1] * 2, t[0] * 2]; diff --git a/tests/ui/codegen/issue-16602-2.rs b/tests/ui/codegen/issue-16602-2.rs index 6364630ffa9..333ea289b4a 100644 --- a/tests/ui/codegen/issue-16602-2.rs +++ b/tests/ui/codegen/issue-16602-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct A { pub x: u32, pub y: u32, diff --git a/tests/ui/codegen/issue-16602-3.rs b/tests/ui/codegen/issue-16602-3.rs index 2307cfb81c7..51fc4a370e2 100644 --- a/tests/ui/codegen/issue-16602-3.rs +++ b/tests/ui/codegen/issue-16602-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(unused_assignments)] #[derive(Debug)] diff --git a/tests/ui/codegen/issue-28950.rs b/tests/ui/codegen/issue-28950.rs index 8b55f42f3f4..8e55172af6d 100644 --- a/tests/ui/codegen/issue-28950.rs +++ b/tests/ui/codegen/issue-28950.rs @@ -1,6 +1,6 @@ -// run-pass -// ignore-emscripten no threads -// compile-flags: -O +//@ run-pass +//@ ignore-emscripten no threads +//@ compile-flags: -O // Tests that the `vec!` macro does not overflow the stack when it is // given data larger than the stack. diff --git a/tests/ui/codegen/issue-55976.rs b/tests/ui/codegen/issue-55976.rs index fee54fc6206..e28d5ab114c 100644 --- a/tests/ui/codegen/issue-55976.rs +++ b/tests/ui/codegen/issue-55976.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ^-- The above is needed as this issue is related to LLVM/codegen. fn main() { diff --git a/tests/ui/codegen/issue-63787.rs b/tests/ui/codegen/issue-63787.rs index cba079b2315..b8de6d3c5c8 100644 --- a/tests/ui/codegen/issue-63787.rs +++ b/tests/ui/codegen/issue-63787.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -O +//@ run-pass +//@ compile-flags: -O // Make sure that `Ref` and `RefMut` do not make false promises about aliasing, // because once they drop, their reference/pointer can alias other writes. diff --git a/tests/ui/codegen/issue-64401.rs b/tests/ui/codegen/issue-64401.rs index 53f85c63b53..02e5b8ac2ba 100644 --- a/tests/ui/codegen/issue-64401.rs +++ b/tests/ui/codegen/issue-64401.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // The ICE didn't happen with `cargo check` but `cargo build`. use std::marker::PhantomData; diff --git a/tests/ui/codegen/issue-79865-llvm-miscompile.rs b/tests/ui/codegen/issue-79865-llvm-miscompile.rs index 6f994a5cb74..fbd9f0dd4fb 100644 --- a/tests/ui/codegen/issue-79865-llvm-miscompile.rs +++ b/tests/ui/codegen/issue-79865-llvm-miscompile.rs @@ -1,6 +1,6 @@ -// run-pass -// only-x86_64 -// compile-flags: -C opt-level=3 +//@ run-pass +//@ only-x86_64 +//@ compile-flags: -C opt-level=3 // Regression test for issue #79865. // The assertion will fail when compiled with Rust 1.56..=1.59 diff --git a/tests/ui/codegen/issue-82833-slice-miscompile.rs b/tests/ui/codegen/issue-82833-slice-miscompile.rs index 8cf6a3137e2..7723679dab1 100644 --- a/tests/ui/codegen/issue-82833-slice-miscompile.rs +++ b/tests/ui/codegen/issue-82833-slice-miscompile.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Copt-level=0 -Cdebuginfo=2 +//@ run-pass +//@ compile-flags: -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Copt-level=0 -Cdebuginfo=2 // Make sure LLVM does not miscompile this. diff --git a/tests/ui/codegen/issue-82859-slice-miscompile.rs b/tests/ui/codegen/issue-82859-slice-miscompile.rs index b64eb499071..542eea0169b 100644 --- a/tests/ui/codegen/issue-82859-slice-miscompile.rs +++ b/tests/ui/codegen/issue-82859-slice-miscompile.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -Copt-level=0 -Cdebuginfo=2 +//@ run-pass +//@ compile-flags: -Copt-level=0 -Cdebuginfo=2 // Make sure LLVM does not miscompile this. diff --git a/tests/ui/codegen/issue-88043-bb-does-not-have-terminator.rs b/tests/ui/codegen/issue-88043-bb-does-not-have-terminator.rs index 38dfca347c8..03ba826b186 100644 --- a/tests/ui/codegen/issue-88043-bb-does-not-have-terminator.rs +++ b/tests/ui/codegen/issue-88043-bb-does-not-have-terminator.rs @@ -1,5 +1,5 @@ -// build-pass -// compile-flags: -Copt-level=0 +//@ build-pass +//@ compile-flags: -Copt-level=0 // Regression test for #88043: LLVM crash when the RemoveZsts mir-opt pass is enabled. // We should not see the error: diff --git a/tests/ui/codegen/issue-97708.rs b/tests/ui/codegen/issue-97708.rs index 8cb28e9f1f6..bc44e579030 100644 --- a/tests/ui/codegen/issue-97708.rs +++ b/tests/ui/codegen/issue-97708.rs @@ -1,5 +1,5 @@ -// build-pass -// aux-build:issue-97708-aux.rs +//@ build-pass +//@ aux-build:issue-97708-aux.rs extern crate issue_97708_aux; use issue_97708_aux::TaskStub; diff --git a/tests/ui/codegen/issue-99551.rs b/tests/ui/codegen/issue-99551.rs index b223aff4e94..9bacbaa6edc 100644 --- a/tests/ui/codegen/issue-99551.rs +++ b/tests/ui/codegen/issue-99551.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass #![feature(trait_upcasting)] pub trait A {} diff --git a/tests/ui/codegen/llvm-pr32379.rs b/tests/ui/codegen/llvm-pr32379.rs index 8a1f03241b1..304a84255e2 100644 --- a/tests/ui/codegen/llvm-pr32379.rs +++ b/tests/ui/codegen/llvm-pr32379.rs @@ -1,5 +1,5 @@ -// run-pass -// aux-build:llvm_pr32379.rs +//@ run-pass +//@ aux-build:llvm_pr32379.rs // LLVM PR #32379 (https://bugs.llvm.org/show_bug.cgi?id=32379), which // applies to upstream LLVM 3.9.1, is known to cause rustc itself to be diff --git a/tests/ui/codegen/mismatched-data-layouts.rs b/tests/ui/codegen/mismatched-data-layouts.rs index 047ec155fdc..7d63895c65b 100644 --- a/tests/ui/codegen/mismatched-data-layouts.rs +++ b/tests/ui/codegen/mismatched-data-layouts.rs @@ -1,11 +1,11 @@ // This test checks that data layout mismatches emit an error. // -// build-fail -// needs-llvm-components: x86 -// compile-flags: --crate-type=lib --target={{src-base}}/codegen/mismatched-data-layout.json -Z unstable-options -// error-pattern: differs from LLVM target's -// normalize-stderr-test: "`, `[A-Za-z0-9-:]*`" -> "`, `normalized data layout`" -// normalize-stderr-test: "layout, `[A-Za-z0-9-:]*`" -> "layout, `normalized data layout`" +//@ build-fail +//@ needs-llvm-components: x86 +//@ compile-flags: --crate-type=lib --target={{src-base}}/codegen/mismatched-data-layout.json -Z unstable-options +//@ error-pattern: differs from LLVM target's +//@ normalize-stderr-test: "`, `[A-Za-z0-9-:]*`" -> "`, `normalized data layout`" +//@ normalize-stderr-test: "layout, `[A-Za-z0-9-:]*`" -> "layout, `normalized data layout`" #![feature(lang_items, no_core, auto_traits)] #![no_core] diff --git a/tests/ui/codegen/mono-impossible-2.rs b/tests/ui/codegen/mono-impossible-2.rs index 21eb2c9b2f2..d00bc1ddd5f 100644 --- a/tests/ui/codegen/mono-impossible-2.rs +++ b/tests/ui/codegen/mono-impossible-2.rs @@ -1,5 +1,5 @@ -//compile-flags: --crate-type=lib -Clink-dead-code=on -// build-pass +//@compile-flags: --crate-type=lib -Clink-dead-code=on +//@ build-pass // Make sure that we don't monomorphize the impossible method `<() as Visit>::visit`, // which does not hold under a reveal-all param env. diff --git a/tests/ui/codegen/mono-impossible.rs b/tests/ui/codegen/mono-impossible.rs index 1ea32ed2c4f..6e3c14bc7ad 100644 --- a/tests/ui/codegen/mono-impossible.rs +++ b/tests/ui/codegen/mono-impossible.rs @@ -1,5 +1,5 @@ -// compile-flags: -Clink-dead-code=on --crate-type=lib -// build-pass +//@ compile-flags: -Clink-dead-code=on --crate-type=lib +//@ build-pass // Make sure that we don't monomorphize the impossible method `<() as Visit>::visit`, // which does not hold under a reveal-all param env. diff --git a/tests/ui/codegen/overflow-during-mono.rs b/tests/ui/codegen/overflow-during-mono.rs index e45db18e407..919f1a8120e 100644 --- a/tests/ui/codegen/overflow-during-mono.rs +++ b/tests/ui/codegen/overflow-during-mono.rs @@ -1,4 +1,4 @@ -// build-fail +//@ build-fail //~^ ERROR overflow evaluating the requirement #![recursion_limit = "32"] diff --git a/tests/ui/codegen/subtyping-enforces-type-equality.rs b/tests/ui/codegen/subtyping-enforces-type-equality.rs index a5ffcb3f854..7d5228f5170 100644 --- a/tests/ui/codegen/subtyping-enforces-type-equality.rs +++ b/tests/ui/codegen/subtyping-enforces-type-equality.rs @@ -1,6 +1,6 @@ -// ignore-pass -// build-pass -// edition:2021 +//@ ignore-pass +//@ build-pass +//@ edition:2021 use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/codegen/subtyping-impacts-selection-1.rs b/tests/ui/codegen/subtyping-impacts-selection-1.rs index 09e06f6d684..abce5f3783c 100644 --- a/tests/ui/codegen/subtyping-impacts-selection-1.rs +++ b/tests/ui/codegen/subtyping-impacts-selection-1.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: mir codegen -//[mir] compile-flags: -Zmir-opt-level=3 -//[codegen] compile-flags: -Zmir-opt-level=0 +//@ run-pass +//@ revisions: mir codegen +//@[mir] compile-flags: -Zmir-opt-level=3 +//@[codegen] compile-flags: -Zmir-opt-level=0 // A regression test for #107205 #![allow(coherence_leak_check)] diff --git a/tests/ui/codegen/subtyping-impacts-selection-2.rs b/tests/ui/codegen/subtyping-impacts-selection-2.rs index 921136775b7..8f87727d7f7 100644 --- a/tests/ui/codegen/subtyping-impacts-selection-2.rs +++ b/tests/ui/codegen/subtyping-impacts-selection-2.rs @@ -1,7 +1,7 @@ -// run-pass -// revisions: mir codegen -//[mir] compile-flags: -Zmir-opt-level=3 -//[codegen] compile-flags: -Zmir-opt-level=0 +//@ run-pass +//@ revisions: mir codegen +//@[mir] compile-flags: -Zmir-opt-level=3 +//@[codegen] compile-flags: -Zmir-opt-level=0 // A regression test for #107205 diff --git a/tests/ui/codegen/target-cpus.rs b/tests/ui/codegen/target-cpus.rs index 1dff3ee6011..85a940f9f74 100644 --- a/tests/ui/codegen/target-cpus.rs +++ b/tests/ui/codegen/target-cpus.rs @@ -1,4 +1,4 @@ -// needs-llvm-components: webassembly -// min-llvm-version: 17 -// compile-flags: --print=target-cpus --target=wasm32-unknown-unknown -// check-pass +//@ needs-llvm-components: webassembly +//@ min-llvm-version: 17 +//@ compile-flags: --print=target-cpus --target=wasm32-unknown-unknown +//@ check-pass |
