summaryrefslogtreecommitdiffstats
path: root/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
commit4f9fe856a25ab29345b90e7725509e9ee38a37be (patch)
treee4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs
parentAdding upstream version 1.68.2+dfsg1. (diff)
downloadrustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.tar.xz
rustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.zip
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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