Skip to content

Commit 21476e7

Browse files
committed
--bless post no async_await gates in tests.
1 parent 228015a commit 21476e7

File tree

54 files changed

+248
-250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+248
-250
lines changed

src/test/ui/async-await/async-block-control-flow-static-semantics.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
error[E0267]: `break` inside of an async block
2-
--> $DIR/async-block-control-flow-static-semantics.rs:35:9
2+
--> $DIR/async-block-control-flow-static-semantics.rs:33:9
33
|
44
LL | break 0u8;
55
| ^^^^^^^^^ cannot break inside of an async block
66

77
error[E0267]: `break` inside of an async block
8-
--> $DIR/async-block-control-flow-static-semantics.rs:42:13
8+
--> $DIR/async-block-control-flow-static-semantics.rs:40:13
99
|
1010
LL | break 0u8;
1111
| ^^^^^^^^^ cannot break inside of an async block
1212

1313
error[E0308]: mismatched types
14-
--> $DIR/async-block-control-flow-static-semantics.rs:15:43
14+
--> $DIR/async-block-control-flow-static-semantics.rs:13:43
1515
|
1616
LL | fn return_targets_async_block_not_fn() -> u8 {
1717
| --------------------------------- ^^ expected u8, found ()
@@ -22,7 +22,7 @@ LL | fn return_targets_async_block_not_fn() -> u8 {
2222
found type `()`
2323

2424
error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == ()`
25-
--> $DIR/async-block-control-flow-static-semantics.rs:20:39
25+
--> $DIR/async-block-control-flow-static-semantics.rs:18:39
2626
|
2727
LL | let _: &dyn Future<Output = ()> = &block;
2828
| ^^^^^^ expected u8, found ()
@@ -32,7 +32,7 @@ LL | let _: &dyn Future<Output = ()> = &block;
3232
= note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
3333

3434
error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == ()`
35-
--> $DIR/async-block-control-flow-static-semantics.rs:29:39
35+
--> $DIR/async-block-control-flow-static-semantics.rs:27:39
3636
|
3737
LL | let _: &dyn Future<Output = ()> = &block;
3838
| ^^^^^^ expected u8, found ()
@@ -42,7 +42,7 @@ LL | let _: &dyn Future<Output = ()> = &block;
4242
= note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
4343

4444
error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == u8`
45-
--> $DIR/async-block-control-flow-static-semantics.rs:24:55
45+
--> $DIR/async-block-control-flow-static-semantics.rs:22:55
4646
|
4747
LL | async fn return_targets_async_block_not_async_fn() -> u8 {
4848
| ^^ expected (), found u8
@@ -52,7 +52,7 @@ LL | async fn return_targets_async_block_not_async_fn() -> u8 {
5252
= note: the return type of a function must have a statically known size
5353

5454
error[E0308]: mismatched types
55-
--> $DIR/async-block-control-flow-static-semantics.rs:50:44
55+
--> $DIR/async-block-control-flow-static-semantics.rs:48:44
5656
|
5757
LL | fn rethrow_targets_async_block_not_fn() -> Result<u8, MyErr> {
5858
| ---------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found ()
@@ -63,7 +63,7 @@ LL | fn rethrow_targets_async_block_not_fn() -> Result<u8, MyErr> {
6363
found type `()`
6464

6565
error[E0308]: mismatched types
66-
--> $DIR/async-block-control-flow-static-semantics.rs:59:50
66+
--> $DIR/async-block-control-flow-static-semantics.rs:57:50
6767
|
6868
LL | fn rethrow_targets_async_block_not_async_fn() -> Result<u8, MyErr> {
6969
| ---------------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found ()

src/test/ui/async-await/async-error-span.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0698]: type inside `async` object must be known in this context
2-
--> $DIR/async-error-span.rs:13:9
2+
--> $DIR/async-error-span.rs:12:9
33
|
44
LL | let a;
55
| ^ cannot infer type
66
|
77
note: the type is part of the `async` object because of this `await`
8-
--> $DIR/async-error-span.rs:14:5
8+
--> $DIR/async-error-span.rs:13:5
99
|
1010
LL | get_future().await;
1111
| ^^^^^^^^^^^^^^^^^^

src/test/ui/async-await/async-fn-nonsend.stderr

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely
2-
--> $DIR/async-fn-nonsend.rs:52:5
2+
--> $DIR/async-fn-nonsend.rs:50:5
33
|
44
LL | assert_send(local_dropped_before_await());
55
| ^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely
66
|
77
= help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
88
= note: required because it appears within the type `impl std::fmt::Debug`
99
= note: required because it appears within the type `{impl std::fmt::Debug, impl std::future::Future, ()}`
10-
= note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:23:39: 28:2 {impl std::fmt::Debug, impl std::future::Future, ()}]`
11-
= note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:23:39: 28:2 {impl std::fmt::Debug, impl std::future::Future, ()}]>`
10+
= note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:21:39: 26:2 {impl std::fmt::Debug, impl std::future::Future, ()}]`
11+
= note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:21:39: 26:2 {impl std::fmt::Debug, impl std::future::Future, ()}]>`
1212
= note: required because it appears within the type `impl std::future::Future`
1313
= note: required because it appears within the type `impl std::future::Future`
1414
note: required by `assert_send`
15-
--> $DIR/async-fn-nonsend.rs:49:1
15+
--> $DIR/async-fn-nonsend.rs:47:1
1616
|
1717
LL | fn assert_send(_: impl Send) {}
1818
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1919

2020
error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely
21-
--> $DIR/async-fn-nonsend.rs:54:5
21+
--> $DIR/async-fn-nonsend.rs:52:5
2222
|
2323
LL | assert_send(non_send_temporary_in_match());
2424
| ^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely
2525
|
2626
= help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
2727
= note: required because it appears within the type `impl std::fmt::Debug`
2828
= note: required because it appears within the type `{fn(impl std::fmt::Debug) -> std::option::Option<impl std::fmt::Debug> {std::option::Option::<impl std::fmt::Debug>::Some}, fn() -> impl std::fmt::Debug {non_send}, impl std::fmt::Debug, std::option::Option<impl std::fmt::Debug>, impl std::future::Future, ()}`
29-
= note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:30:40: 39:2 {fn(impl std::fmt::Debug) -> std::option::Option<impl std::fmt::Debug> {std::option::Option::<impl std::fmt::Debug>::Some}, fn() -> impl std::fmt::Debug {non_send}, impl std::fmt::Debug, std::option::Option<impl std::fmt::Debug>, impl std::future::Future, ()}]`
30-
= note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:30:40: 39:2 {fn(impl std::fmt::Debug) -> std::option::Option<impl std::fmt::Debug> {std::option::Option::<impl std::fmt::Debug>::Some}, fn() -> impl std::fmt::Debug {non_send}, impl std::fmt::Debug, std::option::Option<impl std::fmt::Debug>, impl std::future::Future, ()}]>`
29+
= note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:28:40: 37:2 {fn(impl std::fmt::Debug) -> std::option::Option<impl std::fmt::Debug> {std::option::Option::<impl std::fmt::Debug>::Some}, fn() -> impl std::fmt::Debug {non_send}, impl std::fmt::Debug, std::option::Option<impl std::fmt::Debug>, impl std::future::Future, ()}]`
30+
= note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:28:40: 37:2 {fn(impl std::fmt::Debug) -> std::option::Option<impl std::fmt::Debug> {std::option::Option::<impl std::fmt::Debug>::Some}, fn() -> impl std::fmt::Debug {non_send}, impl std::fmt::Debug, std::option::Option<impl std::fmt::Debug>, impl std::future::Future, ()}]>`
3131
= note: required because it appears within the type `impl std::future::Future`
3232
= note: required because it appears within the type `impl std::future::Future`
3333
note: required by `assert_send`
34-
--> $DIR/async-fn-nonsend.rs:49:1
34+
--> $DIR/async-fn-nonsend.rs:47:1
3535
|
3636
LL | fn assert_send(_: impl Send) {}
3737
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3838

3939
error[E0277]: `dyn std::fmt::Write` cannot be sent between threads safely
40-
--> $DIR/async-fn-nonsend.rs:56:5
40+
--> $DIR/async-fn-nonsend.rs:54:5
4141
|
4242
LL | assert_send(non_sync_with_method_call());
4343
| ^^^^^^^^^^^ `dyn std::fmt::Write` cannot be sent between threads safely
@@ -47,18 +47,18 @@ LL | assert_send(non_sync_with_method_call());
4747
= note: required because it appears within the type `std::fmt::Formatter<'_>`
4848
= note: required because of the requirements on the impl of `std::marker::Send` for `&mut std::fmt::Formatter<'_>`
4949
= note: required because it appears within the type `for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}`
50-
= note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:41:38: 47:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]`
51-
= note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:41:38: 47:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]>`
50+
= note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:39:38: 45:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]`
51+
= note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:39:38: 45:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]>`
5252
= note: required because it appears within the type `impl std::future::Future`
5353
= note: required because it appears within the type `impl std::future::Future`
5454
note: required by `assert_send`
55-
--> $DIR/async-fn-nonsend.rs:49:1
55+
--> $DIR/async-fn-nonsend.rs:47:1
5656
|
5757
LL | fn assert_send(_: impl Send) {}
5858
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5959

6060
error[E0277]: `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely
61-
--> $DIR/async-fn-nonsend.rs:56:5
61+
--> $DIR/async-fn-nonsend.rs:54:5
6262
|
6363
LL | assert_send(non_sync_with_method_call());
6464
| ^^^^^^^^^^^ `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely
@@ -72,12 +72,12 @@ LL | assert_send(non_sync_with_method_call());
7272
= note: required because it appears within the type `std::fmt::Formatter<'_>`
7373
= note: required because of the requirements on the impl of `std::marker::Send` for `&mut std::fmt::Formatter<'_>`
7474
= note: required because it appears within the type `for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}`
75-
= note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:41:38: 47:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]`
76-
= note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:41:38: 47:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]>`
75+
= note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:39:38: 45:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]`
76+
= note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:39:38: 45:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]>`
7777
= note: required because it appears within the type `impl std::future::Future`
7878
= note: required because it appears within the type `impl std::future::Future`
7979
note: required by `assert_send`
80-
--> $DIR/async-fn-nonsend.rs:49:1
80+
--> $DIR/async-fn-nonsend.rs:47:1
8181
|
8282
LL | fn assert_send(_: impl Send) {}
8383
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/test/ui/async-await/async-fn-path-elision.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0726]: implicit elided lifetime not allowed here
2-
--> $DIR/async-fn-path-elision.rs:8:20
2+
--> $DIR/async-fn-path-elision.rs:5:20
33
|
44
LL | async fn error(lt: HasLifetime) {
55
| ^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

src/test/ui/async-await/async-unsafe-fn-call-in-safe.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
2-
--> $DIR/async-unsafe-fn-call-in-safe.rs:14:5
2+
--> $DIR/async-unsafe-fn-call-in-safe.rs:12:5
33
|
44
LL | S::f();
55
| ^^^^^^ call to unsafe function
66
|
77
= note: consult the function's documentation for information on how to avoid undefined behavior
88

99
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
10-
--> $DIR/async-unsafe-fn-call-in-safe.rs:15:5
10+
--> $DIR/async-unsafe-fn-call-in-safe.rs:13:5
1111
|
1212
LL | f();
1313
| ^^^ call to unsafe function
1414
|
1515
= note: consult the function's documentation for information on how to avoid undefined behavior
1616

1717
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
18-
--> $DIR/async-unsafe-fn-call-in-safe.rs:19:5
18+
--> $DIR/async-unsafe-fn-call-in-safe.rs:17:5
1919
|
2020
LL | S::f();
2121
| ^^^^^^ call to unsafe function
2222
|
2323
= note: consult the function's documentation for information on how to avoid undefined behavior
2424

2525
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
26-
--> $DIR/async-unsafe-fn-call-in-safe.rs:20:5
26+
--> $DIR/async-unsafe-fn-call-in-safe.rs:18:5
2727
|
2828
LL | f();
2929
| ^^^ call to unsafe function

src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.stderr

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
error: `await` is a keyword in the 2018 edition
2-
--> $DIR/2015-edition-error-various-positions.rs:6:13
2+
--> $DIR/2015-edition-error-various-positions.rs:5:13
33
|
44
LL | pub mod await {
55
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
66
|
77
note: lint level defined here
8-
--> $DIR/2015-edition-error-various-positions.rs:3:9
8+
--> $DIR/2015-edition-error-various-positions.rs:2:9
99
|
1010
LL | #![deny(keyword_idents)]
1111
| ^^^^^^^^^^^^^^
1212
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
1313
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
1414

1515
error: `await` is a keyword in the 2018 edition
16-
--> $DIR/2015-edition-error-various-positions.rs:8:20
16+
--> $DIR/2015-edition-error-various-positions.rs:7:20
1717
|
1818
LL | pub struct await;
1919
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -22,7 +22,7 @@ LL | pub struct await;
2222
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
2323

2424
error: `await` is a keyword in the 2018 edition
25-
--> $DIR/2015-edition-error-various-positions.rs:12:16
25+
--> $DIR/2015-edition-error-various-positions.rs:11:16
2626
|
2727
LL | use outer_mod::await::await;
2828
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -31,7 +31,7 @@ LL | use outer_mod::await::await;
3131
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
3232

3333
error: `await` is a keyword in the 2018 edition
34-
--> $DIR/2015-edition-error-various-positions.rs:12:23
34+
--> $DIR/2015-edition-error-various-positions.rs:11:23
3535
|
3636
LL | use outer_mod::await::await;
3737
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -40,7 +40,7 @@ LL | use outer_mod::await::await;
4040
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
4141

4242
error: `await` is a keyword in the 2018 edition
43-
--> $DIR/2015-edition-error-various-positions.rs:17:14
43+
--> $DIR/2015-edition-error-various-positions.rs:16:14
4444
|
4545
LL | struct Foo { await: () }
4646
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -49,7 +49,7 @@ LL | struct Foo { await: () }
4949
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
5050

5151
error: `await` is a keyword in the 2018 edition
52-
--> $DIR/2015-edition-error-various-positions.rs:21:15
52+
--> $DIR/2015-edition-error-various-positions.rs:20:15
5353
|
5454
LL | impl Foo { fn await() {} }
5555
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -58,7 +58,7 @@ LL | impl Foo { fn await() {} }
5858
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
5959

6060
error: `await` is a keyword in the 2018 edition
61-
--> $DIR/2015-edition-error-various-positions.rs:25:14
61+
--> $DIR/2015-edition-error-various-positions.rs:24:14
6262
|
6363
LL | macro_rules! await {
6464
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -67,7 +67,7 @@ LL | macro_rules! await {
6767
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
6868

6969
error: `await` is a keyword in the 2018 edition
70-
--> $DIR/2015-edition-error-various-positions.rs:32:5
70+
--> $DIR/2015-edition-error-various-positions.rs:31:5
7171
|
7272
LL | await!();
7373
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -76,7 +76,7 @@ LL | await!();
7676
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
7777

7878
error: `await` is a keyword in the 2018 edition
79-
--> $DIR/2015-edition-error-various-positions.rs:35:11
79+
--> $DIR/2015-edition-error-various-positions.rs:34:11
8080
|
8181
LL | match await { await => {} }
8282
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -85,7 +85,7 @@ LL | match await { await => {} }
8585
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
8686

8787
error: `await` is a keyword in the 2018 edition
88-
--> $DIR/2015-edition-error-various-positions.rs:35:19
88+
--> $DIR/2015-edition-error-various-positions.rs:34:19
8989
|
9090
LL | match await { await => {} }
9191
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`

0 commit comments

Comments
 (0)