Skip to content

Commit

Permalink
Stabilize async closures
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Dec 13, 2024
1 parent f495cec commit 51ff984
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 51 deletions.
1 change: 0 additions & 1 deletion tests/ui/async_yields_async.fixed
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(async_closure)]
#![warn(clippy::async_yields_async)]
#![allow(clippy::redundant_async_block)]

Expand Down
1 change: 0 additions & 1 deletion tests/ui/async_yields_async.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(async_closure)]
#![warn(clippy::async_yields_async)]
#![allow(clippy::redundant_async_block)]

Expand Down
12 changes: 6 additions & 6 deletions tests/ui/async_yields_async.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:38:9
--> tests/ui/async_yields_async.rs:37:9
|
LL | let _h = async {
| _____________________-
Expand All @@ -20,7 +20,7 @@ LL + }.await
|

error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:43:9
--> tests/ui/async_yields_async.rs:42:9
|
LL | let _i = async {
| ____________________-
Expand All @@ -33,7 +33,7 @@ LL | | };
| |_____- outer async construct

error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:49:9
--> tests/ui/async_yields_async.rs:48:9
|
LL | let _j = async || {
| ________________________-
Expand All @@ -52,7 +52,7 @@ LL + }.await
|

error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:54:9
--> tests/ui/async_yields_async.rs:53:9
|
LL | let _k = async || {
| _______________________-
Expand All @@ -65,7 +65,7 @@ LL | | };
| |_____- outer async construct

error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:56:23
--> tests/ui/async_yields_async.rs:55:23
|
LL | let _l = async || CustomFutureType;
| ^^^^^^^^^^^^^^^^
Expand All @@ -75,7 +75,7 @@ LL | let _l = async || CustomFutureType;
| help: consider awaiting this value: `CustomFutureType.await`

error: an async construct yields a type which is itself awaitable
--> tests/ui/async_yields_async.rs:62:9
--> tests/ui/async_yields_async.rs:61:9
|
LL | let _m = async || {
| _______________________-
Expand Down
1 change: 0 additions & 1 deletion tests/ui/author/blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#![allow(redundant_semicolons, clippy::no_effect)]
#![feature(stmt_expr_attributes)]
#![feature(async_closure)]

#[rustfmt::skip]
fn main() {
Expand Down
1 change: 0 additions & 1 deletion tests/ui/infinite_loops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#![allow(clippy::never_loop)]
#![warn(clippy::infinite_loop)]
#![feature(async_closure)]

extern crate proc_macros;
use proc_macros::{external, with_span};
Expand Down
42 changes: 21 additions & 21 deletions tests/ui/infinite_loops.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: infinite loop detected
--> tests/ui/infinite_loops.rs:14:5
--> tests/ui/infinite_loops.rs:13:5
|
LL | / loop {
LL | |
Expand All @@ -15,7 +15,7 @@ LL | fn no_break() -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:21:5
--> tests/ui/infinite_loops.rs:20:5
|
LL | / loop {
LL | |
Expand All @@ -32,7 +32,7 @@ LL | fn all_inf() -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:23:9
--> tests/ui/infinite_loops.rs:22:9
|
LL | / loop {
LL | |
Expand All @@ -49,7 +49,7 @@ LL | fn all_inf() -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:25:13
--> tests/ui/infinite_loops.rs:24:13
|
LL | / loop {
LL | |
Expand All @@ -63,7 +63,7 @@ LL | fn all_inf() -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:39:5
--> tests/ui/infinite_loops.rs:38:5
|
LL | / loop {
LL | |
Expand All @@ -74,7 +74,7 @@ LL | | }
= help: if this is not intended, try adding a `break` or `return` condition in the loop

error: infinite loop detected
--> tests/ui/infinite_loops.rs:52:5
--> tests/ui/infinite_loops.rs:51:5
|
LL | / loop {
LL | | fn inner_fn() -> ! {
Expand All @@ -90,7 +90,7 @@ LL | fn no_break_never_ret_noise() -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:95:5
--> tests/ui/infinite_loops.rs:94:5
|
LL | / loop {
LL | |
Expand All @@ -107,7 +107,7 @@ LL | fn break_inner_but_not_outer_1(cond: bool) -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:106:5
--> tests/ui/infinite_loops.rs:105:5
|
LL | / loop {
LL | |
Expand All @@ -124,7 +124,7 @@ LL | fn break_inner_but_not_outer_2(cond: bool) -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:120:9
--> tests/ui/infinite_loops.rs:119:9
|
LL | / loop {
LL | |
Expand All @@ -138,7 +138,7 @@ LL | fn break_outer_but_not_inner() -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:143:9
--> tests/ui/infinite_loops.rs:142:9
|
LL | / loop {
LL | |
Expand All @@ -155,7 +155,7 @@ LL | fn break_wrong_loop(cond: bool) -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:183:5
--> tests/ui/infinite_loops.rs:182:5
|
LL | / loop {
LL | |
Expand All @@ -172,7 +172,7 @@ LL | fn match_like() -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:224:5
--> tests/ui/infinite_loops.rs:223:5
|
LL | / loop {
LL | |
Expand All @@ -186,7 +186,7 @@ LL | fn match_like() -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:229:5
--> tests/ui/infinite_loops.rs:228:5
|
LL | / loop {
LL | |
Expand All @@ -203,7 +203,7 @@ LL | fn match_like() -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:334:9
--> tests/ui/infinite_loops.rs:333:9
|
LL | / loop {
LL | |
Expand All @@ -217,7 +217,7 @@ LL | fn problematic_trait_method() -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:344:9
--> tests/ui/infinite_loops.rs:343:9
|
LL | / loop {
LL | |
Expand All @@ -231,7 +231,7 @@ LL | fn could_be_problematic() -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:353:9
--> tests/ui/infinite_loops.rs:352:9
|
LL | / loop {
LL | |
Expand All @@ -245,7 +245,7 @@ LL | let _loop_forever = || -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:367:8
--> tests/ui/infinite_loops.rs:366:8
|
LL | Ok(loop {
| ________^
Expand All @@ -256,7 +256,7 @@ LL | | })
= help: if this is not intended, try adding a `break` or `return` condition in the loop

error: infinite loop detected
--> tests/ui/infinite_loops.rs:409:5
--> tests/ui/infinite_loops.rs:408:5
|
LL | / 'infinite: loop {
LL | |
Expand All @@ -272,7 +272,7 @@ LL | fn continue_outer() -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:416:5
--> tests/ui/infinite_loops.rs:415:5
|
LL | / loop {
LL | |
Expand All @@ -289,7 +289,7 @@ LL | fn continue_outer() -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:418:9
--> tests/ui/infinite_loops.rs:417:9
|
LL | / 'inner: loop {
LL | | loop {
Expand All @@ -304,7 +304,7 @@ LL | fn continue_outer() -> ! {
| ++++

error: infinite loop detected
--> tests/ui/infinite_loops.rs:426:5
--> tests/ui/infinite_loops.rs:425:5
|
LL | / loop {
LL | |
Expand Down
1 change: 0 additions & 1 deletion tests/ui/redundant_closure_call_fixable.fixed
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(async_closure)]
#![warn(clippy::redundant_closure_call)]
#![allow(clippy::redundant_async_block)]
#![allow(clippy::type_complexity)]
Expand Down
1 change: 0 additions & 1 deletion tests/ui/redundant_closure_call_fixable.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(async_closure)]
#![warn(clippy::redundant_closure_call)]
#![allow(clippy::redundant_async_block)]
#![allow(clippy::type_complexity)]
Expand Down
Loading

0 comments on commit 51ff984

Please sign in to comment.