aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/tests/ui/spawn_nonsend.stderr
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-07-09 01:49:31 +0200
committerdiondokter <[email protected]>2025-08-29 13:23:21 +0200
commit8aec341f28a00012e1771d5c35d2647e11830755 (patch)
tree28ec3bad05e5dcb6ec949493688111839bb6865b /embassy-executor/tests/ui/spawn_nonsend.stderr
parent34ff67cdbf25e278ff99bd4a05b6b8c6a30fa5d1 (diff)
executor: return error when creating the spawntoken, not when spawning.
Diffstat (limited to 'embassy-executor/tests/ui/spawn_nonsend.stderr')
-rw-r--r--embassy-executor/tests/ui/spawn_nonsend.stderr10
1 files changed, 5 insertions, 5 deletions
diff --git a/embassy-executor/tests/ui/spawn_nonsend.stderr b/embassy-executor/tests/ui/spawn_nonsend.stderr
index 2a06c8b94..25bd7d78d 100644
--- a/embassy-executor/tests/ui/spawn_nonsend.stderr
+++ b/embassy-executor/tests/ui/spawn_nonsend.stderr
@@ -12,8 +12,8 @@ error[E0277]: `*mut ()` cannot be sent between threads safely
127 | #[embassy_executor::task] 127 | #[embassy_executor::task]
13 | ------------------------- within this `impl Sized` 13 | ------------------------- within this `impl Sized`
14... 14...
1513 | s.spawn(task(core::ptr::null_mut())).unwrap(); 1513 | s.spawn(task(core::ptr::null_mut()).unwrap());
16 | ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be sent between threads safely 16 | ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be sent between threads safely
17 | | 17 | |
18 | required by a bound introduced by this call 18 | required by a bound introduced by this call
19 | 19 |
@@ -26,8 +26,8 @@ note: required because it's used within this closure
26note: required because it appears within the type `impl Sized` 26note: required because it appears within the type `impl Sized`
27 --> src/raw/mod.rs 27 --> src/raw/mod.rs
28 | 28 |
29 | pub unsafe fn _spawn_async_fn<FutFn>(&'static self, future: FutFn) -> SpawnToken<impl Sized> 29 | pub unsafe fn _spawn_async_fn<FutFn>(&'static self, future: FutFn) -> Result<SpawnToken<impl Sized>, SpawnError>
30 | ^^^^^^^^^^ 30 | ^^^^^^^^^^
31note: required because it appears within the type `impl Sized` 31note: required because it appears within the type `impl Sized`
32 --> tests/ui/spawn_nonsend.rs:7:1 32 --> tests/ui/spawn_nonsend.rs:7:1
33 | 33 |
@@ -36,6 +36,6 @@ note: required because it appears within the type `impl Sized`
36note: required by a bound in `SendSpawner::spawn` 36note: required by a bound in `SendSpawner::spawn`
37 --> src/spawner.rs 37 --> src/spawner.rs
38 | 38 |
39 | pub fn spawn<S: Send>(&self, token: SpawnToken<S>) -> Result<(), SpawnError> { 39 | pub fn spawn<S: Send>(&self, token: SpawnToken<S>) {
40 | ^^^^ required by this bound in `SendSpawner::spawn` 40 | ^^^^ required by this bound in `SendSpawner::spawn`
41 = note: this error originates in the attribute macro `embassy_executor::task` (in Nightly builds, run with -Z macro-backtrace for more info) 41 = note: this error originates in the attribute macro `embassy_executor::task` (in Nightly builds, run with -Z macro-backtrace for more info)