about summary refs log tree commit diff
path: root/tests/ui/coroutine/clone-impl-async.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-07-18 18:17:15 +0000
committerMichael Goulet <michael@errs.io>2025-07-31 17:31:51 +0000
commitd525e79157e32abc510714dd32628c9c155f2997 (patch)
treeea87e96a67f6c624ec0979aac0d6a99030d8a89c /tests/ui/coroutine/clone-impl-async.rs
parent3fb1b53a9dbfcdf37a4b67d35cde373316829930 (diff)
downloadrust-d525e79157e32abc510714dd32628c9c155f2997.tar.gz
rust-d525e79157e32abc510714dd32628c9c155f2997.zip
Stall coroutines based off of ty::Coroutine, not ty::CoroutineWitness
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() {}