summaryrefslogtreecommitdiffstats
path: root/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs')
-rw-r--r--tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs
index 4559da91e..f20024e75 100644
--- a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs
+++ b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs
@@ -3,16 +3,10 @@
pub struct A {}
impl A {
- async fn create(path: impl AsRef<std::path::Path>) { //~ ERROR `async fn` is not permitted in Rust 2015
- //~^ WARN changes to closure capture in Rust 2021 will affect drop order [rust_2021_incompatible_closure_captures]
+ async fn create(path: impl AsRef<std::path::Path>) {
;
- crate(move || {} ).await //~ ERROR expected function, found module `crate`
+ crate(move || {} ).await
}
}
-trait C{async fn new(val: T) {} //~ ERROR `async fn` is not permitted in Rust 2015
-//~^ ERROR functions in traits cannot be declared `async`
-//~| ERROR cannot find type `T` in this scope
-//~| WARN changes to closure capture in Rust 2021 will affect drop order [rust_2021_incompatible_closure_captures]
-
-//~ ERROR this file contains an unclosed delimiter
+trait C{async fn new(val: T) {} //~ ERROR this file contains an unclosed delimiter