Skip to content

Commit

Permalink
Rollup merge of #132612 - compiler-errors:async-trait-bounds, r=lcnr
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matthiaskrgr authored Dec 3, 2024
2 parents 0dc213c + c3c0c2f commit b8ee9d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/pass/async-closure-captures.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Same as rustc's `tests/ui/async-await/async-closures/captures.rs`, keep in sync

#![feature(async_closure, noop_waker)]
#![feature(async_closure, noop_waker, async_trait_bounds)]

use std::future::Future;
use std::pin::pin;
Expand Down
2 changes: 1 addition & 1 deletion tests/pass/async-closure-drop.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(async_closure, noop_waker, async_fn_traits)]
#![feature(async_closure, noop_waker, async_trait_bounds)]

use std::future::Future;
use std::pin::pin;
Expand Down

0 comments on commit b8ee9d3

Please sign in to comment.