diff options
| author | Michael Goulet <michael@errs.io> | 2024-11-04 19:29:02 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-12-02 16:50:44 +0000 |
| commit | 59e3e8934e3e50ddb9b9a9ffaa523cbab2260598 (patch) | |
| tree | d2883e386337ef32de1647da6f538739f1a40f30 /tests/ui/impl-trait/precise-capturing | |
| parent | a6f2f00de89e1dd9cb903db93dac754398c1267f (diff) | |
| download | rust-59e3e8934e3e50ddb9b9a9ffaa523cbab2260598.tar.gz rust-59e3e8934e3e50ddb9b9a9ffaa523cbab2260598.zip | |
Gate async fn trait bound modifier on async_trait_bounds
Diffstat (limited to 'tests/ui/impl-trait/precise-capturing')
| -rw-r--r-- | tests/ui/impl-trait/precise-capturing/bound-modifiers.rs | 2 | ||||
| -rw-r--r-- | tests/ui/impl-trait/precise-capturing/bound-modifiers.stderr | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/ui/impl-trait/precise-capturing/bound-modifiers.rs b/tests/ui/impl-trait/precise-capturing/bound-modifiers.rs index 46121308fa0..cac5ae177d2 100644 --- a/tests/ui/impl-trait/precise-capturing/bound-modifiers.rs +++ b/tests/ui/impl-trait/precise-capturing/bound-modifiers.rs @@ -7,7 +7,7 @@ fn polarity() -> impl Sized + ?use<> {} fn asyncness() -> impl Sized + async use<> {} //~^ ERROR expected identifier, found keyword `use` //~| ERROR cannot find trait `r#use` in this scope -//~| ERROR async closures are unstable +//~| ERROR `async` trait bounds are unstable fn constness() -> impl Sized + const use<> {} //~^ ERROR expected identifier, found keyword `use` diff --git a/tests/ui/impl-trait/precise-capturing/bound-modifiers.stderr b/tests/ui/impl-trait/precise-capturing/bound-modifiers.stderr index 16e7470debf..d4b5b47b41b 100644 --- a/tests/ui/impl-trait/precise-capturing/bound-modifiers.stderr +++ b/tests/ui/impl-trait/precise-capturing/bound-modifiers.stderr @@ -46,16 +46,16 @@ error[E0405]: cannot find trait `r#use` in this scope LL | fn binder() -> impl Sized + for<'a> use<> {} | ^^^ not found in this scope -error[E0658]: async closures are unstable +error[E0658]: `async` trait bounds are unstable --> $DIR/bound-modifiers.rs:7:32 | LL | fn asyncness() -> impl Sized + async use<> {} | ^^^^^ | = note: see issue #62290 <https://github.com/rust-lang/rust/issues/62290> for more information - = help: add `#![feature(async_closure)]` to the crate attributes to enable + = help: add `#![feature(async_trait_bounds)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - = help: to use an async block, remove the `||`: `async {` + = help: use the desugared name of the async trait, such as `AsyncFn` error[E0658]: const trait impls are experimental --> $DIR/bound-modifiers.rs:12:32 |
