aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/tests/ui/spawn_nonsend.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-executor/tests/ui/spawn_nonsend.rs')
-rw-r--r--embassy-executor/tests/ui/spawn_nonsend.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/embassy-executor/tests/ui/spawn_nonsend.rs b/embassy-executor/tests/ui/spawn_nonsend.rs
new file mode 100644
index 000000000..4c4cc7697
--- /dev/null
+++ b/embassy-executor/tests/ui/spawn_nonsend.rs
@@ -0,0 +1,16 @@
1#![cfg_attr(feature = "nightly", feature(impl_trait_in_assoc_type))]
2
3use core::future::Future;
4
5use embassy_executor::SendSpawner;
6
7#[embassy_executor::task]
8async fn task(non_send: *mut ()) {
9 println!("{}", non_send as usize);
10}
11
12fn send_spawn(s: SendSpawner) {
13 s.spawn(task(core::ptr::null_mut())).unwrap();
14}
15
16fn main() {}