about summary refs log tree commit diff
path: root/tests/ui/coroutine/clone-impl-async.rs
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2025-08-04 13:10:09 +0000
committerGitHub <noreply@github.com>2025-08-04 13:10:09 +0000
commitee1b237215ee90df2c0102457fa2d0e9c2df8753 (patch)
treed7b99f917db35f8a07550c15b2544e0563612b5e /tests/ui/coroutine/clone-impl-async.rs
parentee00b998177899c10bea83a38c46627f27496ba2 (diff)
parentab7c35995d9489821cc8b70ac1da069090ee56c9 (diff)
downloadrust-ee1b237215ee90df2c0102457fa2d0e9c2df8753.tar.gz
rust-ee1b237215ee90df2c0102457fa2d0e9c2df8753.zip
Merge pull request #4513 from rust-lang/rustup-2025-08-04
Automatic Rustup
Diffstat (limited to 'tests/ui/coroutine/clone-impl-async.rs')
-rw-r--r--tests/ui/coroutine/clone-impl-async.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/ui/coroutine/clone-impl-async.rs b/tests/ui/coroutine/clone-impl-async.rs
index 2794b167aa2..4e2b26d0295 100644
--- a/tests/ui/coroutine/clone-impl-async.rs
+++ b/tests/ui/coroutine/clone-impl-async.rs
@@ -9,7 +9,7 @@ use std::future::ready;
 
 struct NonClone;
 
-fn main() {
+fn local() {
     let inner_non_clone = async {
         let non_clone = NonClone;
         let () = ready(()).await;
@@ -34,7 +34,9 @@ fn main() {
     //~^ ERROR : Copy` is not satisfied
     check_clone(&maybe_copy_clone);
     //~^ ERROR : Clone` is not satisfied
+}
 
+fn non_local() {
     let inner_non_clone_fn = the_inner_non_clone_fn();
     check_copy(&inner_non_clone_fn);
     //~^ ERROR : Copy` is not satisfied
@@ -69,3 +71,5 @@ async fn the_maybe_copy_clone_fn() {}
 
 fn check_copy<T: Copy>(_x: &T) {}
 fn check_clone<T: Clone>(_x: &T) {}
+
+fn main() {}