1 error: this file contains an unclosed delimiter
2 --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:18:53
4 LL | trait C{async fn new(val: T) {}
10 error[E0670]: `async fn` is not permitted in Rust 2015
11 --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:6:5
13 LL | async fn create(path: impl AsRef<std::path::Path>) {
14 | ^^^^^ to use `async fn`, switch to Rust 2018 or later
16 = help: pass `--edition 2021` to `rustc`
17 = note: for more on editions, read https://doc.rust-lang.org/edition-guide
19 error[E0670]: `async fn` is not permitted in Rust 2015
20 --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:13:9
22 LL | trait C{async fn new(val: T) {}
23 | ^^^^^ to use `async fn`, switch to Rust 2018 or later
25 = help: pass `--edition 2021` to `rustc`
26 = note: for more on editions, read https://doc.rust-lang.org/edition-guide
28 error[E0706]: functions in traits cannot be declared `async`
29 --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:13:9
31 LL | trait C{async fn new(val: T) {}
32 | -----^^^^^^^^^^^^^^^^^^
34 | `async` because of this
36 = note: `async` trait functions are not currently supported
37 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
39 error[E0423]: expected function, found module `crate`
40 --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:9:5
42 LL | crate(move || {} ).await
43 | ^^^^^ not a function
45 error[E0412]: cannot find type `T` in this scope
46 --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:13:27
49 | ------------ similarly named struct `A` defined here
51 LL | trait C{async fn new(val: T) {}
52 | ^ help: a struct with a similar name exists: `A`
54 warning: changes to closure capture in Rust 2021 will affect drop order
55 --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:6:57
57 LL | async fn create(path: impl AsRef<std::path::Path>) {
58 | _____________________----_____________________________-__^
60 | | | in Rust 2018, `path` is dropped here along with the closure, but in Rust 2021 `path` is not part of the closure
61 | | in Rust 2018, this causes the closure to capture `path`, but in Rust 2021, it has no effect
64 LL | | crate(move || {} ).await
68 = note: requested on the command line with `-W rust-2021-incompatible-closure-captures`
69 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
70 help: add a dummy let to cause `path` to be fully captured
72 LL | async fn create(path: impl AsRef<std::path::Path>) { let _ = &path;
75 warning: changes to closure capture in Rust 2021 will affect drop order
76 --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:13:30
78 LL | trait C{async fn new(val: T) {}
81 | | in Rust 2018, `val` is dropped here along with the closure, but in Rust 2021 `val` is not part of the closure
82 | in Rust 2018, this causes the closure to capture `val`, but in Rust 2021, it has no effect
84 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
85 help: add a dummy let to cause `val` to be fully captured
87 LL | trait C{async fn new(val: T) { let _ = &val;}
90 error: aborting due to 6 previous errors; 2 warnings emitted
92 Some errors have detailed explanations: E0412, E0423, E0670, E0706.
93 For more information about an error, try `rustc --explain E0412`.