summaryrefslogtreecommitdiffstats
path: root/src/test/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/test/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr b/src/test/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr
index 50de23229..df1cafdb7 100644
--- a/src/test/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr
+++ b/src/test/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr
@@ -25,16 +25,27 @@ LL | trait C{async fn new(val: T) {}
= help: pass `--edition 2021` to `rustc`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
+error[E0412]: cannot find type `T` in this scope
+ --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:13:27
+ |
+LL | pub struct A {}
+ | ------------ similarly named struct `A` defined here
+...
+LL | trait C{async fn new(val: T) {}
+ | ^ help: a struct with a similar name exists: `A`
+
error[E0706]: functions in traits cannot be declared `async`
--> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:13:9
|
LL | trait C{async fn new(val: T) {}
- | -----^^^^^^^^^^^^^^^^^^
+ | -----^^^^^^^^^^^^^^^
| |
| `async` because of this
|
= note: `async` trait functions are not currently supported
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
+ = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
+ = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
error[E0423]: expected function, found module `crate`
--> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:9:5
@@ -42,15 +53,6 @@ error[E0423]: expected function, found module `crate`
LL | crate(move || {} ).await
| ^^^^^ not a function
-error[E0412]: cannot find type `T` in this scope
- --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:13:27
- |
-LL | pub struct A {}
- | ------------ similarly named struct `A` defined here
-...
-LL | trait C{async fn new(val: T) {}
- | ^ help: a struct with a similar name exists: `A`
-
warning: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:6:57
|
@@ -65,8 +67,8 @@ LL | | crate(move || {} ).await
LL | | }
| |_____^
|
- = note: requested on the command line with `-W rust-2021-incompatible-closure-captures`
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
+ = note: requested on the command line with `-W rust-2021-incompatible-closure-captures`
help: add a dummy let to cause `path` to be fully captured
|
LL | async fn create(path: impl AsRef<std::path::Path>) { let _ = &path;