Skip to content

Commit bdb26cc

Browse files
committed
update all the tests
1 parent 6439eae commit bdb26cc

File tree

5,007 files changed

+6759
-6728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,007 files changed

+6759
-6728
lines changed

tests/ui/abi/issue-94223.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// check-pass
1+
//@check-pass
22
#![allow(improper_ctypes_definitions)]
33
#![crate_type = "lib"]
44

tests/ui/abi/lib-defaults.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// ignore-wasm32-bare no libc to test ffi with
55

6-
// compile-flags: -lrust_test_helpers
6+
//@compile-flags: -lrust_test_helpers
77

88
#[link(name = "rust_test_helpers", kind = "static")]
99
extern "C" {

tests/ui/abi/rustcall-generic.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// revisions: normal opt
2-
// check-pass
3-
//[opt] compile-flags: -Zmir-opt-level=3
1+
//@revisions: normal opt
2+
//@check-pass
3+
//@[opt]compile-flags: -Zmir-opt-level=3
44

55
#![feature(unboxed_closures, tuple_trait)]
66

tests/ui/abi/stack-probes-lto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// ignore-sgx no processes
1212
// ignore-musl FIXME #31506
1313
// ignore-fuchsia no exception handler registered for segfault
14-
// compile-flags: -C lto
14+
//@compile-flags: -C lto
1515
// no-prefer-dynamic
1616
// ignore-nto Crash analysis impossible at SIGSEGV in QNX Neutrino
1717

tests/ui/abi/stack-protector.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// run-pass
22
// only-x86_64-unknown-linux-gnu
3-
// revisions: ssp no-ssp
4-
// [ssp] compile-flags: -Z stack-protector=all
5-
// compile-flags: -C opt-level=2
6-
// compile-flags: -g
3+
//@revisions: ssp no-ssp
4+
//@[ssp]compile-flags: -Z stack-protector=all
5+
//@compile-flags: -C opt-level=2
6+
//@compile-flags: -g
77

88
use std::env;
99
use std::process::{Command, ExitStatus};

tests/ui/abi/unsupported.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
// revisions: x64 i686 aarch64 arm
1+
//@revisions: x64 i686 aarch64 arm
22
//
33
// [x64] needs-llvm-components: x86
4-
// [x64] compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib
4+
//@[x64]compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib
55
// [i686] needs-llvm-components: x86
6-
// [i686] compile-flags: --target=i686-unknown-linux-gnu --crate-type=rlib
6+
//@[i686]compile-flags: --target=i686-unknown-linux-gnu --crate-type=rlib
77
// [aarch64] needs-llvm-components: aarch64
8-
// [aarch64] compile-flags: --target=aarch64-unknown-linux-gnu --crate-type=rlib
8+
//@[aarch64]compile-flags: --target=aarch64-unknown-linux-gnu --crate-type=rlib
99
// [arm] needs-llvm-components: arm
10-
// [arm] compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib
10+
//@[arm]compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib
1111
#![no_core]
1212
#![feature(
1313
no_core,

tests/ui/alloc-error/alloc-error-handler-bad-signature-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags:-C panic=abort
1+
//@compile-flags:-C panic=abort
22

33
#![feature(alloc_error_handler)]
44
#![no_std]

tests/ui/alloc-error/alloc-error-handler-bad-signature-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags:-C panic=abort
1+
//@compile-flags:-C panic=abort
22

33
#![feature(alloc_error_handler)]
44
#![no_std]

tests/ui/alloc-error/alloc-error-handler-bad-signature-3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags:-C panic=abort
1+
//@compile-flags:-C panic=abort
22

33
#![feature(alloc_error_handler)]
44
#![no_std]

tests/ui/allocator/no_std-alloc-error-handler-custom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// ignore-sgx no libc
55
// ignore-wasm32 no libc
66
// only-linux
7-
// compile-flags:-C panic=abort
7+
//@compile-flags:-C panic=abort
88
// aux-build:helper.rs
99

1010
#![feature(rustc_private, lang_items)]

tests/ui/allocator/no_std-alloc-error-handler-default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// ignore-sgx no libc
55
// ignore-wasm32 no libc
66
// only-linux
7-
// compile-flags:-C panic=abort
7+
//@compile-flags:-C panic=abort
88
// aux-build:helper.rs
99

1010
#![feature(rustc_private, lang_items)]

tests/ui/allocator/two-allocators2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// aux-build:system-allocator.rs
22
// no-prefer-dynamic
3-
// error-pattern: the `#[global_allocator]` in
3+
//@error-in-other-file: the `#[global_allocator]` in
44

55
extern crate system_allocator;
66

tests/ui/allocator/two-allocators3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// aux-build:system-allocator.rs
22
// aux-build:system-allocator2.rs
33
// no-prefer-dynamic
4-
// error-pattern: the `#[global_allocator]` in
4+
//@error-in-other-file: the `#[global_allocator]` in
55

66

77
extern crate system_allocator;

tests/ui/annotate-snippet/missing-type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --error-format human-annotate-rs -Z unstable-options
1+
//@compile-flags: --error-format human-annotate-rs -Z unstable-options
22

33
pub fn main() {
44
let x: Iter; //~ ERROR cannot find type `Iter` in this scope

tests/ui/annotate-snippet/multispan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// aux-build:multispan.rs
2-
// compile-flags: --error-format human-annotate-rs -Z unstable-options
2+
//@compile-flags: --error-format human-annotate-rs -Z unstable-options
33

44
#![feature(proc_macro_hygiene)]
55

tests/ui/anon-params/anon-params-denied-2018.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Tests that anonymous parameters are a hard error in edition 2018.
22

3-
// edition:2018
3+
//@edition:2018
44

55
trait T {
66
fn foo(i32); //~ expected one of `:`, `@`, or `|`, found `)`

tests/ui/anon-params/anon-params-deprecated.fixed

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#![warn(anonymous_parameters)]
22
// Test for the anonymous_parameters deprecation lint (RFC 1685)
33

4-
// check-pass
5-
// edition:2015
6-
// run-rustfix
4+
//@check-pass
5+
//@edition:2015
6+
//@run-rustfix
77

88
trait T {
99
fn foo(_: i32); //~ WARNING anonymous parameters are deprecated

tests/ui/anon-params/anon-params-deprecated.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#![warn(anonymous_parameters)]
22
// Test for the anonymous_parameters deprecation lint (RFC 1685)
33

4-
// check-pass
5-
// edition:2015
6-
// run-rustfix
4+
//@check-pass
5+
//@edition:2015
6+
//@run-rustfix
77

88
trait T {
99
fn foo(i32); //~ WARNING anonymous parameters are deprecated

tests/ui/anon-params/anon-params-edition-hygiene.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// check-pass
2-
// edition:2018
1+
//@check-pass
2+
//@edition:2018
33
// aux-build:anon-params-edition-hygiene.rs
44

55
// This warning is still surfaced

tests/ui/anon-params/auxiliary/anon-params-edition-hygiene.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// edition:2015
1+
//@edition:2015
22

33
#[macro_export]
44
macro_rules! generate_trait_2015 {

tests/ui/argument-suggestions/issue-109425.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// run-rustfix
1+
//@run-rustfix
22

33
fn f() {}
44
fn i(_: u32) {}

tests/ui/argument-suggestions/issue-109425.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// run-rustfix
1+
//@run-rustfix
22

33
fn f() {}
44
fn i(_: u32) {}

tests/ui/array-slice-vec/bounds-check-no-overflow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-fail
2-
// error-pattern:index out of bounds
2+
//@error-in-other-file:index out of bounds
33
// ignore-emscripten no processes
44

55
use std::mem::size_of;

tests/ui/array-slice-vec/dst-raw-slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Test bounds checking for DST raw slices
22

33
// run-fail
4-
// error-pattern:index out of bounds
4+
//@error-in-other-file:index out of bounds
55
// ignore-emscripten no processes
66

77
#[allow(unconditional_panic)]

tests/ui/array-slice-vec/slice-of-zero-size-elements.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// run-pass
22
#![allow(stable_features)]
33

4-
// compile-flags: -C debug-assertions
4+
//@compile-flags: -C debug-assertions
55

66
#![feature(iter_to_slice)]
77

tests/ui/array-slice-vec/slice_is_sorted_by_borrow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// check-pass
1+
//@check-pass
22
// regression test for https://github.com/rust-lang/rust/issues/53485#issuecomment-885393452
33

44
#![feature(is_sorted)]

tests/ui/array-slice-vec/suggest-array-length.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// run-rustfix
1+
//@run-rustfix
22
#![allow(unused_variables, dead_code, non_upper_case_globals)]
33

44
fn main() {

tests/ui/array-slice-vec/suggest-array-length.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// run-rustfix
1+
//@run-rustfix
22
#![allow(unused_variables, dead_code, non_upper_case_globals)]
33

44
fn main() {

tests/ui/array-slice-vec/vec-overrun.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-fail
2-
// error-pattern:index out of bounds: the len is 1 but the index is 2
2+
//@error-in-other-file:index out of bounds: the len is 1 but the index is 2
33
// ignore-emscripten no processes
44

55
fn main() {

tests/ui/asm/aarch64/bad-reg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// only-aarch64
2-
// compile-flags: -C target-feature=+neon
2+
//@compile-flags: -C target-feature=+neon
33

44
#![feature(asm_const)]
55

tests/ui/asm/aarch64/const.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// only-aarch64
22
// run-pass
33
// needs-asm-support
4-
// revisions: mirunsafeck thirunsafeck
5-
// [thirunsafeck]compile-flags: -Z thir-unsafeck
4+
//@revisions: mirunsafeck thirunsafeck
5+
//@[thirunsafeck]compile-flags: -Z thir-unsafeck
66

77
#![feature(asm_const)]
88

tests/ui/asm/aarch64/duplicate-options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// only-aarch64
22
// needs-asm-support
3-
// run-rustfix
3+
//@run-rustfix
44

55
use std::arch::asm;
66

tests/ui/asm/aarch64/srcloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// only-aarch64
22
// build-fail
33
// needs-asm-support
4-
// compile-flags: -Ccodegen-units=1
4+
//@compile-flags: -Ccodegen-units=1
55

66
use std::arch::asm;
77

tests/ui/asm/aarch64/type-check-3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// only-aarch64
2-
// compile-flags: -C target-feature=+neon
2+
//@compile-flags: -C target-feature=+neon
33

44
#![feature(repr_simd, stdsimd, asm_const)]
55

tests/ui/asm/aarch64/type-check-4.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// only-aarch64
2-
// compile-flags: -C target-feature=+neon
2+
//@compile-flags: -C target-feature=+neon
33

44
#![feature(repr_simd, stdsimd, asm_const)]
55

tests/ui/asm/bad-arch.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// compile-flags: --target sparc-unknown-linux-gnu
1+
//@compile-flags: --target sparc-unknown-linux-gnu
22
// needs-llvm-components: sparc
3-
// revisions: mirunsafeck thirunsafeck
4-
// [thirunsafeck]compile-flags: -Z thir-unsafeck
3+
//@revisions: mirunsafeck thirunsafeck
4+
//@[thirunsafeck]compile-flags: -Z thir-unsafeck
55

66
#![feature(no_core, lang_items, rustc_attrs)]
77
#![no_core]

tests/ui/asm/bad-template.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// revisions: x86_64_mirunsafeck aarch64_mirunsafeck x86_64_thirunsafeck aarch64_thirunsafeck
1+
//@revisions: x86_64_mirunsafeck aarch64_mirunsafeck x86_64_thirunsafeck aarch64_thirunsafeck
22

3-
// [x86_64_thirunsafeck] compile-flags: -Z thir-unsafeck --target x86_64-unknown-linux-gnu
4-
// [aarch64_thirunsafeck] compile-flags: -Z thir-unsafeck --target aarch64-unknown-linux-gnu
5-
// [x86_64_mirunsafeck] compile-flags: --target x86_64-unknown-linux-gnu
6-
// [aarch64_mirunsafeck] compile-flags: --target aarch64-unknown-linux-gnu
3+
//@[x86_64_thirunsafeck]compile-flags: -Z thir-unsafeck --target x86_64-unknown-linux-gnu
4+
//@[aarch64_thirunsafeck]compile-flags: -Z thir-unsafeck --target aarch64-unknown-linux-gnu
5+
//@[x86_64_mirunsafeck]compile-flags: --target x86_64-unknown-linux-gnu
6+
//@[aarch64_mirunsafeck]compile-flags: --target aarch64-unknown-linux-gnu
77

88
// [x86_64_thirunsafeck] needs-llvm-components: x86
99
// [x86_64_mirunsafeck] needs-llvm-components: x86

tests/ui/asm/inline-syntax.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// revisions: x86_64 arm
2-
//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
3-
//[x86_64] check-pass
1+
//@revisions: x86_64 arm
2+
//@[x86_64]compile-flags: --target x86_64-unknown-linux-gnu
3+
//@[x86_64]check-pass
44
//[x86_64] needs-llvm-components: x86
5-
//[x86_64_allowed] compile-flags: --target x86_64-unknown-linux-gnu
6-
//[x86_64_allowed] check-pass
5+
//@[x86_64_allowed]compile-flags: --target x86_64-unknown-linux-gnu
6+
//@[x86_64_allowed]check-pass
77
//[x86_64_allowed] needs-llvm-components: x86
8-
//[arm] compile-flags: --target armv7-unknown-linux-gnueabihf
8+
//@[arm]compile-flags: --target armv7-unknown-linux-gnueabihf
99
//[arm] build-fail
1010
//[arm] needs-llvm-components: arm
1111
// needs-asm-support

tests/ui/asm/issue-85247.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// revisions: ropi rwpi
1+
//@revisions: ropi rwpi
22

3-
// [ropi] compile-flags: --target armv7-unknown-linux-gnueabihf -C relocation-model=ropi
4-
// [rwpi] compile-flags: --target armv7-unknown-linux-gnueabihf -C relocation-model=rwpi
3+
//@[ropi]compile-flags: --target armv7-unknown-linux-gnueabihf -C relocation-model=ropi
4+
//@[rwpi]compile-flags: --target armv7-unknown-linux-gnueabihf -C relocation-model=rwpi
55
// [ropi] needs-llvm-components: arm
66
// [rwpi] needs-llvm-components: arm
77
// [ropi] build-pass

tests/ui/asm/issue-89305.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Regression test for #89305, where a variable was erroneously reported
22
// as both unused and possibly-uninitialized.
33

4-
// check-pass
4+
//@check-pass
55
// needs-asm-support
66

77
#![warn(unused)]

tests/ui/asm/issue-92378.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --target armv5te-unknown-linux-gnueabi
1+
//@compile-flags: --target armv5te-unknown-linux-gnueabi
22
// needs-llvm-components: arm
33
// needs-asm-support
44
// build-pass

tests/ui/asm/issue-97490.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// check-pass
1+
//@check-pass
22
// only-x86_64
33
// needs-asm-support
44

tests/ui/asm/issue-99071.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --target thumbv6m-none-eabi
1+
//@compile-flags: --target thumbv6m-none-eabi
22
// needs-llvm-components: arm
33
// needs-asm-support
44

tests/ui/asm/issue-99122-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// check-pass
1+
//@check-pass
22
// needs-asm-support
33
// only-x86_64
44

tests/ui/asm/naked-functions-ffi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// check-pass
1+
//@check-pass
22
// needs-asm-support
33
#![feature(naked_functions)]
44
#![crate_type = "lib"]

tests/ui/asm/naked-functions-unused.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// revisions: x86_64 aarch64
1+
//@revisions: x86_64 aarch64
22
// needs-asm-support
33
//[x86_64] only-x86_64
44
//[aarch64] only-aarch64

tests/ui/asm/noreturn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// needs-asm-support
2-
// check-pass
2+
//@check-pass
33

44
#![feature(never_type)]
55
#![crate_type = "rlib"]

0 commit comments

Comments
 (0)