Skip to content

Commit 2da6e66

Browse files
committed
Support incremental in compiletest for non-incremental modes.
1 parent 0132f82 commit 2da6e66

38 files changed

+166
-119
lines changed

Diff for: src/test/codegen-units/partitioning/extern-drop-glue.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
//
22

3-
// We specify -C incremental here because we want to test the partitioning for
3+
// We specify incremental here because we want to test the partitioning for
44
// incremental compilation
55
// We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing
6-
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/extern-drop-glue
6+
// incremental
7+
// compile-flags:-Zprint-mono-items=lazy
78
// compile-flags:-Zinline-in-all-cgus -Copt-level=0
89

910
#![allow(dead_code)]

Diff for: src/test/codegen-units/partitioning/extern-generic.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
//
2-
// We specify -C incremental here because we want to test the partitioning for
2+
// We specify incremental here because we want to test the partitioning for
33
// incremental compilation
4-
// compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/extern-generic -Zshare-generics=y
4+
// incremental
5+
// compile-flags:-Zprint-mono-items=eager -Zshare-generics=y
56

67
#![allow(dead_code)]
78
#![crate_type="lib"]

Diff for: src/test/codegen-units/partitioning/incremental-merging.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
// We specify -C incremental here because we want to test the partitioning for
1+
// We specify incremental here because we want to test the partitioning for
22
// incremental compilation
3-
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/incremental-merging
3+
// incremental
4+
// compile-flags:-Zprint-mono-items=lazy
45
// compile-flags:-Ccodegen-units=3
56

67
#![crate_type = "rlib"]

Diff for: src/test/codegen-units/partitioning/inlining-from-extern-crate.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
//
2-
// We specify -C incremental here because we want to test the partitioning for
2+
// We specify incremental here because we want to test the partitioning for
33
// incremental compilation
4-
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/inlining-from-extern-crate
4+
// incremental
5+
// compile-flags:-Zprint-mono-items=lazy
56
// compile-flags:-Zinline-in-all-cgus
67

78
#![crate_type="lib"]

Diff for: src/test/codegen-units/partitioning/local-drop-glue.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
//
2-
// We specify -C incremental here because we want to test the partitioning for
2+
// We specify incremental here because we want to test the partitioning for
33
// incremental compilation
44
// We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing
5-
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-drop-glue
5+
// incremental
6+
// compile-flags:-Zprint-mono-items=lazy
67
// compile-flags:-Zinline-in-all-cgus -Copt-level=0
78

89
#![allow(dead_code)]

Diff for: src/test/codegen-units/partitioning/local-generic.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
// We specify -C incremental here because we want to test the partitioning for
1+
// We specify incremental here because we want to test the partitioning for
22
// incremental compilation
3-
// compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/local-generic
3+
// incremental
4+
// compile-flags:-Zprint-mono-items=eager
45

56
#![allow(dead_code)]
67
#![crate_type="lib"]

Diff for: src/test/codegen-units/partitioning/local-inlining-but-not-all.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
//
2-
// We specify -C incremental here because we want to test the partitioning for
2+
// We specify incremental here because we want to test the partitioning for
33
// incremental compilation
4-
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-inlining-but-not-all
4+
// incremental
5+
// compile-flags:-Zprint-mono-items=lazy
56
// compile-flags:-Zinline-in-all-cgus=no
67

78
#![allow(dead_code)]

Diff for: src/test/codegen-units/partitioning/local-inlining.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
//
2-
// We specify -C incremental here because we want to test the partitioning for
2+
// We specify incremental here because we want to test the partitioning for
33
// incremental compilation
4-
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-inlining
4+
// incremental
5+
// compile-flags:-Zprint-mono-items=lazy
56
// compile-flags:-Zinline-in-all-cgus
67

78
#![allow(dead_code)]

Diff for: src/test/codegen-units/partitioning/local-transitive-inlining.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
//
2-
// We specify -C incremental here because we want to test the partitioning for
2+
// We specify incremental here because we want to test the partitioning for
33
// incremental compilation
4-
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/local-transitive-inlining
4+
// incremental
5+
// compile-flags:-Zprint-mono-items=lazy
56
// compile-flags:-Zinline-in-all-cgus
67

78
#![allow(dead_code)]

Diff for: src/test/codegen-units/partitioning/methods-are-with-self-type.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
// ignore-test
55

66
//
7-
// We specify -C incremental here because we want to test the partitioning for
7+
// We specify incremental here because we want to test the partitioning for
88
// incremental compilation
9-
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/methods-are-with-self-type
9+
// incremental
10+
// compile-flags:-Zprint-mono-items=lazy
1011

1112
#![allow(dead_code)]
1213
#![feature(start)]

Diff for: src/test/codegen-units/partitioning/regular-modules.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
// We specify -C incremental here because we want to test the partitioning for
1+
// We specify incremental here because we want to test the partitioning for
22
// incremental compilation
3-
// compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/regular-modules
3+
// incremental
4+
// compile-flags:-Zprint-mono-items=eager
45

56
#![allow(dead_code)]
67
#![crate_type="lib"]

Diff for: src/test/codegen-units/partitioning/shared-generics.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// no-prefer-dynamic
33
// NOTE: We always compile this test with -Copt-level=0 because higher opt-levels
44
// prevent drop-glue from participating in share-generics.
5-
// compile-flags:-Zprint-mono-items=eager -Zshare-generics=yes -Cincremental=tmp/partitioning-tests/shared-generics-exe -Copt-level=0
5+
// incremental
6+
// compile-flags:-Zprint-mono-items=eager -Zshare-generics=yes -Copt-level=0
67

78
#![crate_type="rlib"]
89

Diff for: src/test/codegen-units/partitioning/statics.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
// We specify -C incremental here because we want to test the partitioning for
1+
// We specify incremental here because we want to test the partitioning for
22
// incremental compilation
3-
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/statics
3+
// incremental
4+
// compile-flags:-Zprint-mono-items=lazy
45

56
#![crate_type="rlib"]
67

Diff for: src/test/codegen-units/partitioning/vtable-through-const.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
//
22

3-
// We specify -C incremental here because we want to test the partitioning for
3+
// We specify incremental here because we want to test the partitioning for
44
// incremental compilation
5-
// compile-flags:-Zprint-mono-items=lazy -Cincremental=tmp/partitioning-tests/vtable-through-const
5+
// incremental
6+
// compile-flags:-Zprint-mono-items=lazy
67
// compile-flags:-Zinline-in-all-cgus
78

89
// This test case makes sure, that references made through constants are

Diff for: src/test/ui/associated-type-bounds/traits-assoc-type-macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// check-pass
2-
// compile-flags:-Cincremental=tmp/traits-assoc-type-macros
2+
// incremental
33

44
// This test case makes sure that we can compile with incremental compilation
55
// enabled when there are macros, traits, inheritance and associated types involved.

Diff for: src/test/ui/async-await/issue-72442.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// edition:2018
2-
// compile-flags:-Cincremental=tmp/issue-72442
2+
// incremental
33

44
use std::fs::File;
55
use std::future::Future;

Diff for: src/test/ui/async-await/issues/issue-64964.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// check-pass
2-
// compile-flags: -Z query-dep-graph -C incremental=tmp/issue-64964
2+
// incremental
3+
// compile-flags: -Z query-dep-graph
34
// edition:2018
45

56
// Regression test for ICE related to `await`ing in a method + incr. comp. (#64964)

Diff for: src/test/ui/dep-graph/dep-graph-assoc-type-codegen.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// Test that when a trait impl changes, fns whose body uses that trait
22
// must also be recompiled.
33

4-
// compile-flags: -Z query-dep-graph -C incremental=tmp/dep-graph-assoc-type-codegen
4+
// incremental
5+
// compile-flags: -Z query-dep-graph
56

67
#![feature(rustc_attrs)]
78
#![allow(warnings)]

Diff for: src/test/ui/dep-graph/dep-graph-assoc-type-codegen.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: OK
2-
--> $DIR/dep-graph-assoc-type-codegen.rs:28:5
2+
--> $DIR/dep-graph-assoc-type-codegen.rs:29:5
33
|
44
LL | #[rustc_then_this_would_need(typeck)]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Diff for: src/test/ui/dep-graph/dep-graph-caller-callee.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// Test that immediate callers have to change when callee changes, but
22
// not callers' callers.
33

4-
// compile-flags: -Z query-dep-graph -C incremental=tmp/dep-graph-caller-callee
4+
// incremental
5+
// compile-flags: -Z query-dep-graph
56

67
#![feature(rustc_attrs)]
78
#![allow(dead_code)]

Diff for: src/test/ui/dep-graph/dep-graph-caller-callee.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: OK
2-
--> $DIR/dep-graph-caller-callee.rs:20:5
2+
--> $DIR/dep-graph-caller-callee.rs:21:5
33
|
44
LL | #[rustc_then_this_would_need(typeck)]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: no path from `x` to `typeck`
8-
--> $DIR/dep-graph-caller-callee.rs:31:5
8+
--> $DIR/dep-graph-caller-callee.rs:32:5
99
|
1010
LL | #[rustc_then_this_would_need(typeck)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Diff for: src/test/ui/dep-graph/dep-graph-struct-signature.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// Test cases where a changing struct appears in the signature of fns
22
// and methods.
33

4-
// compile-flags: -Z query-dep-graph -C incremental=tmp/dep-graph-struct-signature
4+
// incremental
5+
// compile-flags: -Z query-dep-graph
56

67
#![feature(rustc_attrs)]
78
#![allow(dead_code)]

Diff for: src/test/ui/dep-graph/dep-graph-struct-signature.stderr

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,131 @@
11
error: no path from `WillChange` to `type_of`
2-
--> $DIR/dep-graph-struct-signature.rs:27:5
2+
--> $DIR/dep-graph-struct-signature.rs:28:5
33
|
44
LL | #[rustc_then_this_would_need(type_of)]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: no path from `WillChange` to `associated_item`
8-
--> $DIR/dep-graph-struct-signature.rs:28:5
8+
--> $DIR/dep-graph-struct-signature.rs:29:5
99
|
1010
LL | #[rustc_then_this_would_need(associated_item)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212

1313
error: no path from `WillChange` to `trait_def`
14-
--> $DIR/dep-graph-struct-signature.rs:29:5
14+
--> $DIR/dep-graph-struct-signature.rs:30:5
1515
|
1616
LL | #[rustc_then_this_would_need(trait_def)]
1717
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1818

1919
error: OK
20-
--> $DIR/dep-graph-struct-signature.rs:31:9
20+
--> $DIR/dep-graph-struct-signature.rs:32:9
2121
|
2222
LL | #[rustc_then_this_would_need(fn_sig)]
2323
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2424

2525
error: OK
26-
--> $DIR/dep-graph-struct-signature.rs:35:5
26+
--> $DIR/dep-graph-struct-signature.rs:36:5
2727
|
2828
LL | #[rustc_then_this_would_need(fn_sig)]
2929
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3030

3131
error: OK
32-
--> $DIR/dep-graph-struct-signature.rs:36:5
32+
--> $DIR/dep-graph-struct-signature.rs:37:5
3333
|
3434
LL | #[rustc_then_this_would_need(typeck)]
3535
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3636

3737
error: OK
38-
--> $DIR/dep-graph-struct-signature.rs:39:5
38+
--> $DIR/dep-graph-struct-signature.rs:40:5
3939
|
4040
LL | #[rustc_then_this_would_need(fn_sig)]
4141
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4242

4343
error: OK
44-
--> $DIR/dep-graph-struct-signature.rs:40:5
44+
--> $DIR/dep-graph-struct-signature.rs:41:5
4545
|
4646
LL | #[rustc_then_this_would_need(typeck)]
4747
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4848

4949
error: OK
50-
--> $DIR/dep-graph-struct-signature.rs:45:5
50+
--> $DIR/dep-graph-struct-signature.rs:46:5
5151
|
5252
LL | #[rustc_then_this_would_need(type_of)]
5353
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5454

5555
error: OK
56-
--> $DIR/dep-graph-struct-signature.rs:47:9
56+
--> $DIR/dep-graph-struct-signature.rs:48:9
5757
|
5858
LL | #[rustc_then_this_would_need(fn_sig)]
5959
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6060

6161
error: OK
62-
--> $DIR/dep-graph-struct-signature.rs:48:9
62+
--> $DIR/dep-graph-struct-signature.rs:49:9
6363
|
6464
LL | #[rustc_then_this_would_need(typeck)]
6565
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6666

6767
error: OK
68-
--> $DIR/dep-graph-struct-signature.rs:52:5
68+
--> $DIR/dep-graph-struct-signature.rs:53:5
6969
|
7070
LL | #[rustc_then_this_would_need(type_of)]
7171
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7272

7373
error: OK
74-
--> $DIR/dep-graph-struct-signature.rs:54:9
74+
--> $DIR/dep-graph-struct-signature.rs:55:9
7575
|
7676
LL | #[rustc_then_this_would_need(fn_sig)]
7777
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7878

7979
error: OK
80-
--> $DIR/dep-graph-struct-signature.rs:55:9
80+
--> $DIR/dep-graph-struct-signature.rs:56:9
8181
|
8282
LL | #[rustc_then_this_would_need(typeck)]
8383
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8484

8585
error: OK
86-
--> $DIR/dep-graph-struct-signature.rs:60:9
86+
--> $DIR/dep-graph-struct-signature.rs:61:9
8787
|
8888
LL | #[rustc_then_this_would_need(type_of)]
8989
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9090

9191
error: OK
92-
--> $DIR/dep-graph-struct-signature.rs:62:9
92+
--> $DIR/dep-graph-struct-signature.rs:63:9
9393
|
9494
LL | #[rustc_then_this_would_need(type_of)]
9595
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9696

9797
error: no path from `WillChange` to `type_of`
98-
--> $DIR/dep-graph-struct-signature.rs:67:5
98+
--> $DIR/dep-graph-struct-signature.rs:68:5
9999
|
100100
LL | #[rustc_then_this_would_need(type_of)]
101101
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102102

103103
error: no path from `WillChange` to `type_of`
104-
--> $DIR/dep-graph-struct-signature.rs:74:5
104+
--> $DIR/dep-graph-struct-signature.rs:75:5
105105
|
106106
LL | #[rustc_then_this_would_need(type_of)]
107107
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108108

109109
error: no path from `WillChange` to `fn_sig`
110-
--> $DIR/dep-graph-struct-signature.rs:76:9
110+
--> $DIR/dep-graph-struct-signature.rs:77:9
111111
|
112112
LL | #[rustc_then_this_would_need(fn_sig)]
113113
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114114

115115
error: no path from `WillChange` to `fn_sig`
116-
--> $DIR/dep-graph-struct-signature.rs:80:5
116+
--> $DIR/dep-graph-struct-signature.rs:81:5
117117
|
118118
LL | #[rustc_then_this_would_need(fn_sig)]
119119
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120120

121121
error: no path from `WillChange` to `fn_sig`
122-
--> $DIR/dep-graph-struct-signature.rs:83:5
122+
--> $DIR/dep-graph-struct-signature.rs:84:5
123123
|
124124
LL | #[rustc_then_this_would_need(fn_sig)]
125125
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126126

127127
error: no path from `WillChange` to `typeck`
128-
--> $DIR/dep-graph-struct-signature.rs:84:5
128+
--> $DIR/dep-graph-struct-signature.rs:85:5
129129
|
130130
LL | #[rustc_then_this_would_need(typeck)]
131131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Diff for: src/test/ui/dep-graph/dep-graph-trait-impl-two-traits-same-method.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// Test that adding an impl to a trait `Foo` DOES affect functions
22
// that only use `Bar` if they have methods in common.
33

4-
// compile-flags: -Z query-dep-graph -C incremental=tmp/dep-graph-trait-impl-two-traits-same-method
4+
// incremental
5+
// compile-flags: -Z query-dep-graph
56

67
#![feature(rustc_attrs)]
78
#![allow(dead_code)]

0 commit comments

Comments
 (0)