Skip to content

Commit b8ee9d3

Browse files
authored
Rollup merge of #132612 - compiler-errors:async-trait-bounds, r=lcnr
Gate async fn trait bound modifier on `async_trait_bounds` This PR moves `async Fn()` trait bounds into a new feature gate: `feature(async_trait_bounds)`. The general vibe is that we will most likely stabilize the `feature(async_closure)` *without* the `async Fn()` trait bound modifier, so we need to gate that separately. We're trying to work on the general vision of `async` trait bound modifier general in: rust-lang/rfcs#3710, however that RFC still needs more time for consensus to converge, and we've decided that the value that users get from calling the bound `async Fn()` is *not really* worth blocking landing async closures in general.
2 parents 0dc213c + c3c0c2f commit b8ee9d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/pass/async-closure-captures.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Same as rustc's `tests/ui/async-await/async-closures/captures.rs`, keep in sync
22

3-
#![feature(async_closure, noop_waker)]
3+
#![feature(async_closure, noop_waker, async_trait_bounds)]
44

55
use std::future::Future;
66
use std::pin::pin;

tests/pass/async-closure-drop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(async_closure, noop_waker, async_fn_traits)]
1+
#![feature(async_closure, noop_waker, async_trait_bounds)]
22

33
use std::future::Future;
44
use std::pin::pin;

0 commit comments

Comments
 (0)