Skip to content

Commit 2bc0875

Browse files
committed
bless tests
1 parent 0fb7794 commit 2bc0875

5 files changed

+13
-39
lines changed

tests/ui/async-await/async-fn-nonsend.drop_tracking_mir.stderr

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,5 @@ note: required by a bound in `assert_send`
1818
LL | fn assert_send(_: impl Send) {}
1919
| ^^^^ required by this bound in `assert_send`
2020

21-
error: future cannot be sent between threads safely
22-
--> $DIR/async-fn-nonsend.rs:74:17
23-
|
24-
LL | assert_send(non_sync_with_method_call());
25-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
26-
|
27-
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
28-
note: future is not `Send` as this value is used across an await
29-
--> $DIR/async-fn-nonsend.rs:49:15
30-
|
31-
LL | let f: &mut std::fmt::Formatter = &mut get_formatter();
32-
| --------------- has type `Formatter<'_>` which is not `Send`
33-
...
34-
LL | fut().await;
35-
| ^^^^^ await occurs here, with `get_formatter()` maybe used later
36-
note: required by a bound in `assert_send`
37-
--> $DIR/async-fn-nonsend.rs:67:24
38-
|
39-
LL | fn assert_send(_: impl Send) {}
40-
| ^^^^ required by this bound in `assert_send`
41-
42-
error: aborting due to 2 previous errors
21+
error: aborting due to previous error
4322

tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ LL | fn assert_send(_: impl Send) {}
6969
| ^^^^ required by this bound in `assert_send`
7070

7171
error: future cannot be sent between threads safely
72-
--> $DIR/async-fn-nonsend.rs:76:17
72+
--> $DIR/async-fn-nonsend.rs:77:17
7373
|
7474
LL | assert_send(non_sync_with_method_call_panic());
7575
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call_panic` is not `Send`
@@ -93,7 +93,7 @@ LL | fn assert_send(_: impl Send) {}
9393
| ^^^^ required by this bound in `assert_send`
9494

9595
error: future cannot be sent between threads safely
96-
--> $DIR/async-fn-nonsend.rs:78:17
96+
--> $DIR/async-fn-nonsend.rs:79:17
9797
|
9898
LL | assert_send(non_sync_with_method_call_infinite_loop());
9999
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call_infinite_loop` is not `Send`

tests/ui/async-await/async-fn-nonsend.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ pub fn pass_assert() {
7272
assert_send(non_send_temporary_in_match());
7373
//~^ ERROR future cannot be sent between threads safely
7474
assert_send(non_sync_with_method_call());
75-
//~^ ERROR future cannot be sent between threads safely
75+
//[no_drop_tracking]~^ ERROR future cannot be sent between threads safely
76+
//[drop_tracking]~^^ ERROR future cannot be sent between threads safely
7677
assert_send(non_sync_with_method_call_panic());
7778
//[no_drop_tracking]~^ ERROR future cannot be sent between threads safely
7879
assert_send(non_sync_with_method_call_infinite_loop());

tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking_mir.stderr

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ LL | assert_send(agent.handle());
55
| ^^^^^^^^^^^^^^ future returned by `handle` is not `Send`
66
|
77
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
8-
note: future is not `Send` as this value is used across an await
9-
--> $DIR/drop-track-field-assign-nonsend.rs:23:39
8+
note: captured value is not `Send` because `&mut` references cannot be sent unless their referent is `Send`
9+
--> $DIR/drop-track-field-assign-nonsend.rs:19:21
1010
|
11-
LL | let mut info = self.info_result.clone();
12-
| -------- has type `InfoResult` which is not `Send`
13-
...
14-
LL | let _ = send_element(element).await;
15-
| ^^^^^ await occurs here, with `mut info` maybe used later
11+
LL | async fn handle(&mut self) {
12+
| ^^^^^^^^^ has type `&mut Agent` which is not `Send`, because `Agent` is not `Send`
1613
note: required by a bound in `assert_send`
1714
--> $DIR/drop-track-field-assign-nonsend.rs:40:19
1815
|

tests/ui/async-await/field-assign-nonsend.drop_tracking_mir.stderr

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ LL | assert_send(agent.handle());
55
| ^^^^^^^^^^^^^^ future returned by `handle` is not `Send`
66
|
77
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
8-
note: future is not `Send` as this value is used across an await
9-
--> $DIR/field-assign-nonsend.rs:23:39
8+
note: captured value is not `Send` because `&mut` references cannot be sent unless their referent is `Send`
9+
--> $DIR/field-assign-nonsend.rs:19:21
1010
|
11-
LL | let mut info = self.info_result.clone();
12-
| -------- has type `InfoResult` which is not `Send`
13-
...
14-
LL | let _ = send_element(element).await;
15-
| ^^^^^ await occurs here, with `mut info` maybe used later
11+
LL | async fn handle(&mut self) {
12+
| ^^^^^^^^^ has type `&mut Agent` which is not `Send`, because `Agent` is not `Send`
1613
note: required by a bound in `assert_send`
1714
--> $DIR/field-assign-nonsend.rs:40:19
1815
|

0 commit comments

Comments
 (0)