Skip to content

Commit ae43f27

Browse files
authored
Rollup merge of rust-lang#130730 - veera-sivarajan:clean-test-headers, r=compiler-errors
Reorganize Test Headers This PR moves the test headers to the top in a couple of test files to maintain consistent style. Based on this comment: rust-lang#130665 (comment)
2 parents 65196ca + 8cf861d commit ae43f27

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

Diff for: tests/ui/consts/const-eval/stable-metric/ctfe-simple-loop.allow.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: constant evaluation is taking a long time
2-
--> $DIR/ctfe-simple-loop.rs:9:5
2+
--> $DIR/ctfe-simple-loop.rs:10:5
33
|
44
LL | / while index < n {
55
LL | |
@@ -10,7 +10,7 @@ LL | | }
1010
| |_____^ the const evaluator is currently interpreting this expression
1111
|
1212
help: the constant being evaluated
13-
--> $DIR/ctfe-simple-loop.rs:19:1
13+
--> $DIR/ctfe-simple-loop.rs:20:1
1414
|
1515
LL | const Y: u32 = simple_loop(35);
1616
| ^^^^^^^^^^^^

Diff for: tests/ui/consts/const-eval/stable-metric/ctfe-simple-loop.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
//@ check-pass
22
//@ revisions: warn allow
3+
//@ compile-flags: -Z tiny-const-eval-limit
4+
35
#![cfg_attr(warn, warn(long_running_const_eval))]
46
#![cfg_attr(allow, allow(long_running_const_eval))]
57

6-
//@ compile-flags: -Z tiny-const-eval-limit
78
const fn simple_loop(n: u32) -> u32 {
89
let mut index = 0;
910
while index < n {

Diff for: tests/ui/consts/const-eval/stable-metric/ctfe-simple-loop.warn.stderr

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: constant evaluation is taking a long time
2-
--> $DIR/ctfe-simple-loop.rs:9:5
2+
--> $DIR/ctfe-simple-loop.rs:10:5
33
|
44
LL | / while index < n {
55
LL | |
@@ -12,18 +12,18 @@ LL | | }
1212
= note: this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval.
1313
If your compilation actually takes a long time, you can safely allow the lint.
1414
help: the constant being evaluated
15-
--> $DIR/ctfe-simple-loop.rs:18:1
15+
--> $DIR/ctfe-simple-loop.rs:19:1
1616
|
1717
LL | const X: u32 = simple_loop(19);
1818
| ^^^^^^^^^^^^
1919
note: the lint level is defined here
20-
--> $DIR/ctfe-simple-loop.rs:3:24
20+
--> $DIR/ctfe-simple-loop.rs:5:24
2121
|
2222
LL | #![cfg_attr(warn, warn(long_running_const_eval))]
2323
| ^^^^^^^^^^^^^^^^^^^^^^^
2424

2525
warning: constant evaluation is taking a long time
26-
--> $DIR/ctfe-simple-loop.rs:9:5
26+
--> $DIR/ctfe-simple-loop.rs:10:5
2727
|
2828
LL | / while index < n {
2929
LL | |
@@ -36,13 +36,13 @@ LL | | }
3636
= note: this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval.
3737
If your compilation actually takes a long time, you can safely allow the lint.
3838
help: the constant being evaluated
39-
--> $DIR/ctfe-simple-loop.rs:19:1
39+
--> $DIR/ctfe-simple-loop.rs:20:1
4040
|
4141
LL | const Y: u32 = simple_loop(35);
4242
| ^^^^^^^^^^^^
4343

4444
warning: constant evaluation is taking a long time
45-
--> $DIR/ctfe-simple-loop.rs:9:5
45+
--> $DIR/ctfe-simple-loop.rs:10:5
4646
|
4747
LL | / while index < n {
4848
LL | |
@@ -53,7 +53,7 @@ LL | | }
5353
| |_____^ the const evaluator is currently interpreting this expression
5454
|
5555
help: the constant being evaluated
56-
--> $DIR/ctfe-simple-loop.rs:19:1
56+
--> $DIR/ctfe-simple-loop.rs:20:1
5757
|
5858
LL | const Y: u32 = simple_loop(35);
5959
| ^^^^^^^^^^^^

Diff for: tests/ui/consts/const-eval/stable-metric/evade-deduplication-issue-118612.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//@ check-pass
2+
//@ compile-flags: -Z tiny-const-eval-limit -Z deduplicate-diagnostics=yes
23

34
#![allow(long_running_const_eval)]
45

5-
//@ compile-flags: -Z tiny-const-eval-limit -Z deduplicate-diagnostics=yes
66
const FOO: () = {
77
let mut i = 0;
88
loop {

0 commit comments

Comments
 (0)