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

tests/assembly/cstring-merging.rs

Lines changed: 2 additions & 1 deletion
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

tests/codegen/async-closure-debug.rs

Lines changed: 2 additions & 1 deletion
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"

tests/codegen/async-fn-debug-awaitee-field.rs

Lines changed: 2 additions & 1 deletion
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

tests/codegen/async-fn-debug-msvc.rs

Lines changed: 2 additions & 1 deletion
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() {}

tests/codegen/async-fn-debug.rs

Lines changed: 7 additions & 6 deletions
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]],

tests/codegen/coroutine-debug.rs

Lines changed: 7 additions & 6 deletions
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]],

tests/codegen/debuginfo-generic-closure-env-names.rs

Lines changed: 2 additions & 1 deletion
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]+]],

tests/codegen/infallible-unwrap-in-opt-z.rs

Lines changed: 2 additions & 1 deletion
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

tests/codegen/inline-function-args-debug-info.rs

Lines changed: 4 additions & 3 deletions
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
}

tests/codegen/issues/issue-119422.rs

Lines changed: 2 additions & 1 deletion
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

0 commit comments

Comments
 (0)