Skip to content

Commit cd371b9

Browse files
committed
replace //@ compile-flags: --edition with //@ edition
1 parent 97c966b commit cd371b9

File tree

108 files changed

+181
-135
lines changed

Some content is hidden

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

108 files changed

+181
-135
lines changed

Diff for: tests/assembly/cstring-merging.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ only-linux
22
//@ assembly-output: emit-asm
3-
//@ compile-flags: --crate-type=lib -Copt-level=3 --edition 2024
3+
//@ compile-flags: --crate-type=lib -Copt-level=3
4+
//@ edition: 2024
45

56
use std::ffi::CStr;
67

Diff for: tests/codegen/async-closure-debug.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Just make sure that async closures don't ICE.
22
//
3-
//@ compile-flags: -C debuginfo=2 --edition=2018
3+
//@ compile-flags: -C debuginfo=2
4+
//@ edition: 2018
45
//@ ignore-msvc
56

67
// CHECK-DAG: [[GEN_FN:!.*]] = !DINamespace(name: "async_closure_test"

Diff for: tests/codegen/async-fn-debug-awaitee-field.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
//@[MSVC] only-msvc
88
//@[NONMSVC] ignore-msvc
99

10-
//@ compile-flags: -C debuginfo=2 --edition=2018 -Copt-level=0
10+
//@ compile-flags: -C debuginfo=2 -Copt-level=0
11+
//@ edition: 2018
1112

1213
#![crate_type = "lib"]
1314

Diff for: tests/codegen/async-fn-debug-msvc.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
// - Other fields are not marked artificial
55
//
66
//
7-
//@ compile-flags: -C debuginfo=2 --edition=2018
7+
//@ compile-flags: -C debuginfo=2
8+
//@ edition: 2018
89
//@ only-msvc
910

1011
async fn foo() {}

Diff for: tests/codegen/async-fn-debug.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
// - Other fields are not marked artificial
55
//
66
//
7-
//@ compile-flags: -C debuginfo=2 --edition=2018
7+
//@ compile-flags: -C debuginfo=2
8+
//@ edition: 2018
89
//@ ignore-msvc
910

1011
async fn foo() {}
@@ -22,26 +23,26 @@ async fn async_fn_test() {
2223
// CHECK-NOT: flags: DIFlagArtificial
2324
// CHECK-SAME: discriminator: [[DISC:![0-9]*]]
2425
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "0", scope: [[VARIANT]],
25-
// CHECK-SAME: file: [[FILE:![0-9]*]], line: 11,
26+
// CHECK-SAME: file: [[FILE:![0-9]*]], line: 12,
2627
// CHECK-NOT: flags: DIFlagArtificial
2728
// CHECK-SAME: )
2829
// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "Unresumed", scope: [[GEN]],
2930
// CHECK-NOT: flags: DIFlagArtificial
3031
// CHECK-SAME: )
3132
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "1", scope: [[VARIANT]],
32-
// CHECK-SAME: file: [[FILE]], line: 15,
33+
// CHECK-SAME: file: [[FILE]], line: 16,
3334
// CHECK-NOT: flags: DIFlagArtificial
3435
// CHECK-SAME: )
3536
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "2", scope: [[VARIANT]],
36-
// CHECK-SAME: file: [[FILE]], line: 15,
37+
// CHECK-SAME: file: [[FILE]], line: 16,
3738
// CHECK-NOT: flags: DIFlagArtificial
3839
// CHECK-SAME: )
3940
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "3", scope: [[VARIANT]],
40-
// CHECK-SAME: file: [[FILE]], line: 12,
41+
// CHECK-SAME: file: [[FILE]], line: 13,
4142
// CHECK-NOT: flags: DIFlagArtificial
4243
// CHECK-SAME: )
4344
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "4", scope: [[VARIANT]],
44-
// CHECK-SAME: file: [[FILE]], line: 14,
45+
// CHECK-SAME: file: [[FILE]], line: 15,
4546
// CHECK-NOT: flags: DIFlagArtificial
4647
// CHECK-SAME: )
4748
// CHECK: [[S1:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "Suspend1", scope: [[GEN]],

Diff for: tests/codegen/coroutine-debug.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
// - Other fields are not marked artificial
55
//
66
//
7-
//@ compile-flags: -C debuginfo=2 --edition=2018
7+
//@ compile-flags: -C debuginfo=2
8+
//@ edition: 2018
89
//@ ignore-msvc
910

1011
#![feature(coroutines, coroutine_trait)]
@@ -27,26 +28,26 @@ fn coroutine_test() -> impl Coroutine<Yield = i32, Return = ()> {
2728
// CHECK-NOT: flags: DIFlagArtificial
2829
// CHECK-SAME: discriminator: [[DISC:![0-9]*]]
2930
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "0", scope: [[VARIANT]],
30-
// CHECK-SAME: file: [[FILE:![0-9]*]], line: 15,
31+
// CHECK-SAME: file: [[FILE:![0-9]*]], line: 16,
3132
// CHECK-NOT: flags: DIFlagArtificial
3233
// CHECK-SAME: )
3334
// CHECK: {{!.*}} = !DICompositeType(tag: DW_TAG_structure_type, name: "Unresumed", scope: [[GEN]],
3435
// CHECK-NOT: flags: DIFlagArtificial
3536
// CHECK-SAME: )
3637
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "1", scope: [[VARIANT]],
37-
// CHECK-SAME: file: [[FILE]], line: 19,
38+
// CHECK-SAME: file: [[FILE]], line: 20,
3839
// CHECK-NOT: flags: DIFlagArtificial
3940
// CHECK-SAME: )
4041
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "2", scope: [[VARIANT]],
41-
// CHECK-SAME: file: [[FILE]], line: 19,
42+
// CHECK-SAME: file: [[FILE]], line: 20,
4243
// CHECK-NOT: flags: DIFlagArtificial
4344
// CHECK-SAME: )
4445
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "3", scope: [[VARIANT]],
45-
// CHECK-SAME: file: [[FILE]], line: 16,
46+
// CHECK-SAME: file: [[FILE]], line: 17,
4647
// CHECK-NOT: flags: DIFlagArtificial
4748
// CHECK-SAME: )
4849
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "4", scope: [[VARIANT]],
49-
// CHECK-SAME: file: [[FILE]], line: 18,
50+
// CHECK-SAME: file: [[FILE]], line: 19,
5051
// CHECK-NOT: flags: DIFlagArtificial
5152
// CHECK-SAME: )
5253
// CHECK: [[S1:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "Suspend1", scope: [[GEN]],

Diff for: tests/codegen/debuginfo-generic-closure-env-names.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
// legacy mangling scheme rustc version and generic parameters are both hashed into a single part
1919
// of the name, thus randomizing item order with respect to rustc version.
2020

21-
//@ compile-flags: -Cdebuginfo=2 --edition 2021 -Copt-level=0 -Csymbol-mangling-version=v0
21+
//@ compile-flags: -Cdebuginfo=2 -Copt-level=0 -Csymbol-mangling-version=v0
22+
//@ edition: 2021
2223

2324
// non_generic_closure()
2425
// NONMSVC: !DICompositeType(tag: DW_TAG_structure_type, name: "{closure_env#0}", scope: ![[non_generic_closure_NAMESPACE:[0-9]+]],

Diff for: tests/codegen/infallible-unwrap-in-opt-z.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//@ compile-flags: -C opt-level=z --edition=2021
1+
//@ compile-flags: -C opt-level=z
2+
//@ edition: 2021
23

34
#![crate_type = "lib"]
45

Diff for: tests/codegen/inline-function-args-debug-info.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// gets inlined by MIR inlining. Without function argument indexes, `info args` in gdb won't show
33
// arguments and their values for the current function.
44

5-
//@ compile-flags: -Zinline-mir=yes -Cdebuginfo=2 --edition=2021
5+
//@ compile-flags: -Zinline-mir=yes -Cdebuginfo=2
6+
//@ edition: 2021
67

78
#![crate_type = "lib"]
89

@@ -14,9 +15,9 @@ pub fn outer_function(x: usize, y: usize) -> usize {
1415
#[inline]
1516
fn inner_function(aaaa: usize, bbbb: usize) -> usize {
1617
// CHECK: !DILocalVariable(name: "aaaa", arg: 1
17-
// CHECK-SAME: line: 15
18+
// CHECK-SAME: line: 16
1819
// CHECK-NOT: !DILexicalBlock(
1920
// CHECK: !DILocalVariable(name: "bbbb", arg: 2
20-
// CHECK-SAME: line: 15
21+
// CHECK-SAME: line: 16
2122
aaaa + bbbb
2223
}

Diff for: tests/codegen/issues/issue-119422.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
//! This test checks that compiler don't generate useless compares to zeros
22
//! for `NonZero` integer types.
33
//!
4-
//@ compile-flags: -Copt-level=3 --edition=2021 -Zmerge-functions=disabled
4+
//@ compile-flags: -Copt-level=3 -Zmerge-functions=disabled
5+
//@ edition: 2021
56
//@ only-64bit (because the LLVM type of i64 for usize shows up)
67
#![crate_type = "lib"]
78

Diff for: tests/codegen/simd/simd-wide-sum.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ revisions: llvm mir-opt3
2-
//@ compile-flags: -C opt-level=3 -Z merge-functions=disabled --edition=2021
2+
//@ compile-flags: -C opt-level=3 -Z merge-functions=disabled
3+
//@ edition: 2021
34
//@ only-x86_64
45
//@ [mir-opt3]compile-flags: -Zmir-opt-level=3
56
//@ [mir-opt3]build-pass

Diff for: tests/codegen/try_question_mark_nop.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//@ compile-flags: -Copt-level=3 -Z merge-functions=disabled --edition=2021
1+
//@ compile-flags: -Copt-level=3 -Z merge-functions=disabled
2+
//@ edition: 2021
23
//@ only-x86_64
34
//@ revisions: NINETEEN TWENTY
45
//@[NINETEEN] exact-llvm-major-version: 19

Diff for: tests/crashes/119095.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ known-bug: #119095
2-
//@ compile-flags: --edition=2021
2+
//@ edition: 2021
33

44
fn any<T>() -> T {
55
loop {}

Diff for: tests/crashes/120016.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ known-bug: #120016
2-
//@ compile-flags: -Zcrate-attr=feature(const_async_blocks) --edition=2021
2+
//@ compile-flags: -Zcrate-attr=feature(const_async_blocks)
3+
//@ edition: 2021
34

45
#![feature(type_alias_impl_trait, const_async_blocks)]
56

Diff for: tests/crashes/127033.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ known-bug: #127033
2-
//@ compile-flags: --edition=2021
2+
//@ edition: 2021
33

44
pub trait RaftLogStorage {
55
fn save_vote(vote: ()) -> impl std::future::Future + Send;

Diff for: tests/crashes/128094.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ known-bug: rust-lang/rust#128094
2-
//@ compile-flags: -Zmir-enable-passes=+GVN --edition=2018
2+
//@ compile-flags: -Zmir-enable-passes=+GVN
3+
//@ edition: 2018
34

45
pub enum Request {
56
TestSome(T),

Diff for: tests/crashes/132103.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ known-bug: #132103
2-
//@compile-flags: -Zvalidate-mir --edition=2018 -Zinline-mir=yes
2+
//@ compile-flags: -Zvalidate-mir -Zinline-mir=yes
3+
//@ edition: 2018
34
use core::future::{async_drop_in_place, Future};
45
use core::mem::{self};
56
use core::pin::pin;

Diff for: tests/crashes/132430.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ known-bug: #132430
22

3-
//@compile-flags: --edition=2018 --crate-type=lib
3+
//@ compile-flags: --crate-type=lib
4+
//@ edition: 2018
45
#![feature(cmse_nonsecure_entry)]
56
struct Test;
67

Diff for: tests/crashes/135128.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ known-bug: #135128
2-
//@ compile-flags: -Copt-level=1 --edition=2021
2+
//@ compile-flags: -Copt-level=1
3+
//@ edition: 2021
34

45
#![feature(trivial_bounds)]
56

Diff for: tests/crashes/135470.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ known-bug: #135470
2-
//@ compile-flags: --edition=2021 -Copt-level=0
2+
//@ compile-flags: -Copt-level=0
3+
//@ edition: 2021
34

45
use std::future::Future;
56
trait Access {

Diff for: tests/crashes/135646.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//@ known-bug: #135646
2-
//@ compile-flags: --edition=2024 -Zpolonius=next
2+
//@ compile-flags: -Zpolonius=next
3+
//@ edition: 2024
4+
35
fn main() {
46
&{ [1, 2, 3][4] };
57
}

Diff for: tests/crashes/135668.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ known-bug: #135668
2-
//@ compile-flags: --edition=2021
2+
//@ edition: 2021
33
use std::future::Future;
44

55
pub async fn foo() {

Diff for: tests/crashes/137467-1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ known-bug: #137467
2-
//@ compile-flags: --edition=2021
2+
//@ edition: 2021
33
enum Camera {
44
Normal { base_transform: i32 },
55
Volume { transform: i32 },

Diff for: tests/crashes/137467-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ known-bug: #137467
2-
//@ compile-flags: --edition=2021
2+
//@ edition: 2021
33

44
enum Camera {
55
Normal { base_transform: i32 },

Diff for: tests/crashes/137467-3.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ known-bug: #137467
2-
//@ compile-flags: --edition=2021
2+
//@ edition: 2021
33

44
fn meow(x: (u32, u32, u32)) {
55
let f = || {

Diff for: tests/crashes/137916.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ known-bug: #137916
2-
//@ compile-flags: --edition=2021
2+
//@ edition: 2021
33
use std::ptr::null;
44

55
async fn a() -> Box<dyn Send> {

Diff for: tests/debuginfo/coroutine-closure.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![feature(async_closure)]
22
//@ only-cdb
3-
//@ compile-flags:-g --edition=2021
3+
//@ compile-flags: -g
4+
//@ edition: 2021
45

56
// === CDB TESTS ==================================================================================
67

Diff for: tests/incremental/issue-85360-eval-obligation-ice.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ revisions:cfail1 cfail2
2-
//@[cfail1] compile-flags: --crate-type=lib --edition=2021 -Zassert-incr-state=not-loaded
3-
//@[cfail2] compile-flags: --crate-type=lib --edition=2021 -Zassert-incr-state=loaded
2+
//@[cfail1] compile-flags: --crate-type=lib -Zassert-incr-state=not-loaded
3+
//@[cfail2] compile-flags: --crate-type=lib -Zassert-incr-state=loaded
4+
//@ edition: 2021
45
//@ build-pass
56

67
use core::any::Any;

Diff for: tests/rustdoc-ui/doctest/failed-doctest-should-panic-2021.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// FIXME: if/when the output of the test harness can be tested on its own, this test should be
22
// adapted to use that, and that normalize line can go away
33

4-
//@ compile-flags:--test --edition 2021
4+
//@ compile-flags: --test
5+
//@ edition: 2021
56
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
67
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
78
//@ failure-status: 101
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

22
running 1 test
3-
test $DIR/failed-doctest-should-panic-2021.rs - Foo (line 9) ... FAILED
3+
test $DIR/failed-doctest-should-panic-2021.rs - Foo (line 10) ... FAILED
44

55
failures:
66

7-
---- $DIR/failed-doctest-should-panic-2021.rs - Foo (line 9) stdout ----
7+
---- $DIR/failed-doctest-should-panic-2021.rs - Foo (line 10) stdout ----
88
Test executable succeeded, but it's marked `should_panic`.
99

1010
failures:
11-
$DIR/failed-doctest-should-panic-2021.rs - Foo (line 9)
11+
$DIR/failed-doctest-should-panic-2021.rs - Foo (line 10)
1212

1313
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
1414

Diff for: tests/rustdoc-ui/intra-doc/import-inline-merge-module.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
//@ check-pass
55
//@ aux-build: inner-crate-doc.rs
6-
//@ compile-flags: --extern inner_crate_doc --edition 2018
6+
//@ compile-flags: --extern inner_crate_doc
7+
//@ edition: 2018
78

89
/// Import doc comment [inner_crate_doc]
910
#[doc(inline)]

Diff for: tests/rustdoc/auxiliary/primitive-doc.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//@ compile-flags: --crate-type lib --edition 2018
1+
//@ compile-flags: --crate-type lib
2+
//@ edition: 2018
23

34
#![feature(rustc_attrs)]
45
#![feature(no_core)]

Diff for: tests/rustdoc/auxiliary/primitive-reexport.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//@ compile-flags: --emit metadata --crate-type lib --edition 2018
1+
//@ compile-flags: --emit metadata --crate-type lib
2+
//@ edition: 2018
23

34
#![crate_name = "foo"]
45

Diff for: tests/rustdoc/intra-doc/extern-crate-only-used-in-link.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
//@ aux-build:empty2.rs
77
//@ aux-crate:priv:empty2=empty2.rs
88
//@ build-aux-docs
9-
//@ compile-flags:-Z unstable-options --edition 2018
9+
//@ compile-flags:-Z unstable-options
10+
//@ edition: 2018
1011

1112
//@ has extern_crate_only_used_in_link/index.html
1213
//@ has - '//a[@href="../issue_66159_1/struct.Something.html"]' 'issue_66159_1::Something'

Diff for: tests/rustdoc/primitive-reexport.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ aux-build: primitive-reexport.rs
2-
//@ compile-flags:--extern foo --edition 2018
2+
//@ compile-flags: --extern foo
3+
//@ edition: 2018
34

45
#![crate_name = "bar"]
56

Diff for: tests/rustdoc/primitive-slice-auto-trait.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//@ compile-flags: --crate-type lib --edition 2018
1+
//@ compile-flags: --crate-type lib
2+
//@ edition: 2018
23

34
#![crate_name = "foo"]
45
#![feature(rustc_attrs)]

Diff for: tests/rustdoc/primitive-tuple-auto-trait.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//@ compile-flags: --crate-type lib --edition 2018
1+
//@ compile-flags: --crate-type lib
2+
//@ edition: 2018
23

34
#![crate_name = "foo"]
45
#![feature(rustc_attrs)]

0 commit comments

Comments
 (0)