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: https://github.com/rust-lang/rfcs/pull/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.
This commit is contained in:
commit
c179a15f7a
64 changed files with 147 additions and 106 deletions
|
@ -794,7 +794,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
closure_def_id,
|
||||
found_kind,
|
||||
expected_kind,
|
||||
"async ",
|
||||
"Async",
|
||||
);
|
||||
self.note_obligation_cause(&mut err, &obligation);
|
||||
self.point_at_returns_when_relevant(&mut err, &obligation);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue