Skip to content

Commit 59582fb

Browse files
authored
Rollup merge of #132707 - zmodem:tests_vs_diagnostic_width, r=jieyouxu
Add --diagnostic-width to some tests failing after 1a0c502 Otherwise the tests would fail depending on the execution environment.
2 parents 7044cc7 + 029add2 commit 59582fb

9 files changed

+58
-54
lines changed

tests/ui/coroutine/clone-impl-async.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ edition:2021
2+
//@compile-flags: --diagnostic-width=300
23
// gate-test-coroutine_clone
34
// Verifies that feature(coroutine_clone) doesn't allow async blocks to be cloned/copied.
45

tests/ui/coroutine/clone-impl-async.stderr

+36-36
Original file line numberDiff line numberDiff line change
@@ -1,167 +1,167 @@
1-
error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:12:27: 12:32}: Copy` is not satisfied
2-
--> $DIR/clone-impl-async.rs:17:16
1+
error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:13:27: 13:32}: Copy` is not satisfied
2+
--> $DIR/clone-impl-async.rs:18:16
33
|
44
LL | check_copy(&inner_non_clone);
5-
| ---------- ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:12:27: 12:32}`
5+
| ---------- ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:13:27: 13:32}`
66
| |
77
| required by a bound introduced by this call
88
|
99
note: required by a bound in `check_copy`
10-
--> $DIR/clone-impl-async.rs:69:18
10+
--> $DIR/clone-impl-async.rs:70:18
1111
|
1212
LL | fn check_copy<T: Copy>(_x: &T) {}
1313
| ^^^^ required by this bound in `check_copy`
1414

15-
error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:12:27: 12:32}: Clone` is not satisfied
16-
--> $DIR/clone-impl-async.rs:19:17
15+
error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:13:27: 13:32}: Clone` is not satisfied
16+
--> $DIR/clone-impl-async.rs:20:17
1717
|
1818
LL | check_clone(&inner_non_clone);
19-
| ----------- ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:12:27: 12:32}`
19+
| ----------- ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:13:27: 13:32}`
2020
| |
2121
| required by a bound introduced by this call
2222
|
2323
note: required by a bound in `check_clone`
24-
--> $DIR/clone-impl-async.rs:70:19
24+
--> $DIR/clone-impl-async.rs:71:19
2525
|
2626
LL | fn check_clone<T: Clone>(_x: &T) {}
2727
| ^^^^^ required by this bound in `check_clone`
2828

29-
error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:23:27: 23:37}: Copy` is not satisfied
30-
--> $DIR/clone-impl-async.rs:26:16
29+
error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:24:27: 24:37}: Copy` is not satisfied
30+
--> $DIR/clone-impl-async.rs:27:16
3131
|
3232
LL | check_copy(&outer_non_clone);
33-
| ---------- ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:23:27: 23:37}`
33+
| ---------- ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:24:27: 24:37}`
3434
| |
3535
| required by a bound introduced by this call
3636
|
3737
note: required by a bound in `check_copy`
38-
--> $DIR/clone-impl-async.rs:69:18
38+
--> $DIR/clone-impl-async.rs:70:18
3939
|
4040
LL | fn check_copy<T: Copy>(_x: &T) {}
4141
| ^^^^ required by this bound in `check_copy`
4242

43-
error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:23:27: 23:37}: Clone` is not satisfied
44-
--> $DIR/clone-impl-async.rs:28:17
43+
error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:24:27: 24:37}: Clone` is not satisfied
44+
--> $DIR/clone-impl-async.rs:29:17
4545
|
4646
LL | check_clone(&outer_non_clone);
47-
| ----------- ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:23:27: 23:37}`
47+
| ----------- ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:24:27: 24:37}`
4848
| |
4949
| required by a bound introduced by this call
5050
|
5151
note: required by a bound in `check_clone`
52-
--> $DIR/clone-impl-async.rs:70:19
52+
--> $DIR/clone-impl-async.rs:71:19
5353
|
5454
LL | fn check_clone<T: Clone>(_x: &T) {}
5555
| ^^^^^ required by this bound in `check_clone`
5656

57-
error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:31:28: 31:38}: Copy` is not satisfied
58-
--> $DIR/clone-impl-async.rs:32:16
57+
error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:32:28: 32:38}: Copy` is not satisfied
58+
--> $DIR/clone-impl-async.rs:33:16
5959
|
6060
LL | check_copy(&maybe_copy_clone);
61-
| ---------- ^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:31:28: 31:38}`
61+
| ---------- ^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:32:28: 32:38}`
6262
| |
6363
| required by a bound introduced by this call
6464
|
6565
note: required by a bound in `check_copy`
66-
--> $DIR/clone-impl-async.rs:69:18
66+
--> $DIR/clone-impl-async.rs:70:18
6767
|
6868
LL | fn check_copy<T: Copy>(_x: &T) {}
6969
| ^^^^ required by this bound in `check_copy`
7070

71-
error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:31:28: 31:38}: Clone` is not satisfied
72-
--> $DIR/clone-impl-async.rs:34:17
71+
error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:32:28: 32:38}: Clone` is not satisfied
72+
--> $DIR/clone-impl-async.rs:35:17
7373
|
7474
LL | check_clone(&maybe_copy_clone);
75-
| ----------- ^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:31:28: 31:38}`
75+
| ----------- ^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:32:28: 32:38}`
7676
| |
7777
| required by a bound introduced by this call
7878
|
7979
note: required by a bound in `check_clone`
80-
--> $DIR/clone-impl-async.rs:70:19
80+
--> $DIR/clone-impl-async.rs:71:19
8181
|
8282
LL | fn check_clone<T: Clone>(_x: &T) {}
8383
| ^^^^^ required by this bound in `check_clone`
8484

8585
error[E0277]: the trait bound `impl Future<Output = ()>: Copy` is not satisfied
86-
--> $DIR/clone-impl-async.rs:38:16
86+
--> $DIR/clone-impl-async.rs:39:16
8787
|
8888
LL | check_copy(&inner_non_clone_fn);
8989
| ---------- ^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = ()>`
9090
| |
9191
| required by a bound introduced by this call
9292
|
9393
note: required by a bound in `check_copy`
94-
--> $DIR/clone-impl-async.rs:69:18
94+
--> $DIR/clone-impl-async.rs:70:18
9595
|
9696
LL | fn check_copy<T: Copy>(_x: &T) {}
9797
| ^^^^ required by this bound in `check_copy`
9898

9999
error[E0277]: the trait bound `impl Future<Output = ()>: Clone` is not satisfied
100-
--> $DIR/clone-impl-async.rs:40:17
100+
--> $DIR/clone-impl-async.rs:41:17
101101
|
102102
LL | check_clone(&inner_non_clone_fn);
103103
| ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = ()>`
104104
| |
105105
| required by a bound introduced by this call
106106
|
107107
note: required by a bound in `check_clone`
108-
--> $DIR/clone-impl-async.rs:70:19
108+
--> $DIR/clone-impl-async.rs:71:19
109109
|
110110
LL | fn check_clone<T: Clone>(_x: &T) {}
111111
| ^^^^^ required by this bound in `check_clone`
112112

113113
error[E0277]: the trait bound `impl Future<Output = ()>: Copy` is not satisfied
114-
--> $DIR/clone-impl-async.rs:44:16
114+
--> $DIR/clone-impl-async.rs:45:16
115115
|
116116
LL | check_copy(&outer_non_clone_fn);
117117
| ---------- ^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = ()>`
118118
| |
119119
| required by a bound introduced by this call
120120
|
121121
note: required by a bound in `check_copy`
122-
--> $DIR/clone-impl-async.rs:69:18
122+
--> $DIR/clone-impl-async.rs:70:18
123123
|
124124
LL | fn check_copy<T: Copy>(_x: &T) {}
125125
| ^^^^ required by this bound in `check_copy`
126126

127127
error[E0277]: the trait bound `impl Future<Output = ()>: Clone` is not satisfied
128-
--> $DIR/clone-impl-async.rs:46:17
128+
--> $DIR/clone-impl-async.rs:47:17
129129
|
130130
LL | check_clone(&outer_non_clone_fn);
131131
| ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = ()>`
132132
| |
133133
| required by a bound introduced by this call
134134
|
135135
note: required by a bound in `check_clone`
136-
--> $DIR/clone-impl-async.rs:70:19
136+
--> $DIR/clone-impl-async.rs:71:19
137137
|
138138
LL | fn check_clone<T: Clone>(_x: &T) {}
139139
| ^^^^^ required by this bound in `check_clone`
140140

141141
error[E0277]: the trait bound `impl Future<Output = ()>: Copy` is not satisfied
142-
--> $DIR/clone-impl-async.rs:50:16
142+
--> $DIR/clone-impl-async.rs:51:16
143143
|
144144
LL | check_copy(&maybe_copy_clone_fn);
145145
| ---------- ^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = ()>`
146146
| |
147147
| required by a bound introduced by this call
148148
|
149149
note: required by a bound in `check_copy`
150-
--> $DIR/clone-impl-async.rs:69:18
150+
--> $DIR/clone-impl-async.rs:70:18
151151
|
152152
LL | fn check_copy<T: Copy>(_x: &T) {}
153153
| ^^^^ required by this bound in `check_copy`
154154

155155
error[E0277]: the trait bound `impl Future<Output = ()>: Clone` is not satisfied
156-
--> $DIR/clone-impl-async.rs:52:17
156+
--> $DIR/clone-impl-async.rs:53:17
157157
|
158158
LL | check_clone(&maybe_copy_clone_fn);
159159
| ----------- ^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = ()>`
160160
| |
161161
| required by a bound introduced by this call
162162
|
163163
note: required by a bound in `check_clone`
164-
--> $DIR/clone-impl-async.rs:70:19
164+
--> $DIR/clone-impl-async.rs:71:19
165165
|
166166
LL | fn check_clone<T: Clone>(_x: &T) {}
167167
| ^^^^^ required by this bound in `check_clone`

tests/ui/coroutine/clone-impl-static.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@compile-flags: --diagnostic-width=300
12
// gate-test-coroutine_clone
23
// Verifies that static coroutines cannot be cloned/copied.
34

tests/ui/coroutine/clone-impl-static.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
error[E0277]: the trait bound `{static coroutine@$DIR/clone-impl-static.rs:8:5: 8:19}: Copy` is not satisfied
2-
--> $DIR/clone-impl-static.rs:11:16
1+
error[E0277]: the trait bound `{static coroutine@$DIR/clone-impl-static.rs:9:5: 9:19}: Copy` is not satisfied
2+
--> $DIR/clone-impl-static.rs:12:16
33
|
44
LL | check_copy(&gen);
5-
| ---------- ^^^^ the trait `Copy` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:8:5: 8:19}`
5+
| ---------- ^^^^ the trait `Copy` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:9:5: 9:19}`
66
| |
77
| required by a bound introduced by this call
88
|
99
note: required by a bound in `check_copy`
10-
--> $DIR/clone-impl-static.rs:17:18
10+
--> $DIR/clone-impl-static.rs:18:18
1111
|
1212
LL | fn check_copy<T: Copy>(_x: &T) {}
1313
| ^^^^ required by this bound in `check_copy`
1414

15-
error[E0277]: the trait bound `{static coroutine@$DIR/clone-impl-static.rs:8:5: 8:19}: Clone` is not satisfied
16-
--> $DIR/clone-impl-static.rs:13:17
15+
error[E0277]: the trait bound `{static coroutine@$DIR/clone-impl-static.rs:9:5: 9:19}: Clone` is not satisfied
16+
--> $DIR/clone-impl-static.rs:14:17
1717
|
1818
LL | check_clone(&gen);
19-
| ----------- ^^^^ the trait `Clone` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:8:5: 8:19}`
19+
| ----------- ^^^^ the trait `Clone` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:9:5: 9:19}`
2020
| |
2121
| required by a bound introduced by this call
2222
|
2323
note: required by a bound in `check_clone`
24-
--> $DIR/clone-impl-static.rs:18:19
24+
--> $DIR/clone-impl-static.rs:19:19
2525
|
2626
LL | fn check_clone<T: Clone>(_x: &T) {}
2727
| ^^^^^ required by this bound in `check_clone`

tests/ui/coroutine/gen_block_is_coro.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@compile-flags: --edition 2024 -Zunstable-options
1+
//@compile-flags: --edition 2024 -Zunstable-options --diagnostic-width=300
22
#![feature(coroutines, coroutine_trait, gen_blocks)]
33

44
use std::ops::Coroutine;

tests/ui/impl-trait/issue-55872-3.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ edition:2018
2+
//@compile-flags: --diagnostic-width=300
23

34
#![feature(impl_trait_in_assoc_type)]
45

tests/ui/impl-trait/issue-55872-3.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
error[E0277]: the trait bound `{async block@$DIR/issue-55872-3.rs:15:9: 15:14}: Copy` is not satisfied
2-
--> $DIR/issue-55872-3.rs:13:20
1+
error[E0277]: the trait bound `{async block@$DIR/issue-55872-3.rs:16:9: 16:14}: Copy` is not satisfied
2+
--> $DIR/issue-55872-3.rs:14:20
33
|
44
LL | fn foo<T>() -> Self::E {
5-
| ^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/issue-55872-3.rs:15:9: 15:14}`
5+
| ^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/issue-55872-3.rs:16:9: 16:14}`
66
LL |
77
LL | async {}
8-
| -------- return type was inferred to be `{async block@$DIR/issue-55872-3.rs:15:9: 15:14}` here
8+
| -------- return type was inferred to be `{async block@$DIR/issue-55872-3.rs:16:9: 16:14}` here
99

1010
error: aborting due to 1 previous error
1111

tests/ui/not-clone-closure.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@compile-flags: --diagnostic-width=300
12
// Check that closures do not implement `Clone` if their environment is not `Clone`.
23

34
struct S(i32);

tests/ui/not-clone-closure.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
error[E0277]: the trait bound `S: Clone` is not satisfied in `{closure@$DIR/not-clone-closure.rs:7:17: 7:24}`
2-
--> $DIR/not-clone-closure.rs:11:23
1+
error[E0277]: the trait bound `S: Clone` is not satisfied in `{closure@$DIR/not-clone-closure.rs:8:17: 8:24}`
2+
--> $DIR/not-clone-closure.rs:12:23
33
|
44
LL | let hello = move || {
5-
| ------- within this `{closure@$DIR/not-clone-closure.rs:7:17: 7:24}`
5+
| ------- within this `{closure@$DIR/not-clone-closure.rs:8:17: 8:24}`
66
...
77
LL | let hello = hello.clone();
8-
| ^^^^^ within `{closure@$DIR/not-clone-closure.rs:7:17: 7:24}`, the trait `Clone` is not implemented for `S`
8+
| ^^^^^ within `{closure@$DIR/not-clone-closure.rs:8:17: 8:24}`, the trait `Clone` is not implemented for `S`
99
|
1010
note: required because it's used within this closure
11-
--> $DIR/not-clone-closure.rs:7:17
11+
--> $DIR/not-clone-closure.rs:8:17
1212
|
1313
LL | let hello = move || {
1414
| ^^^^^^^

0 commit comments

Comments
 (0)