diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-07-09 01:49:31 +0200 |
|---|---|---|
| committer | diondokter <[email protected]> | 2025-08-29 13:23:21 +0200 |
| commit | 8aec341f28a00012e1771d5c35d2647e11830755 (patch) | |
| tree | 28ec3bad05e5dcb6ec949493688111839bb6865b /embassy-executor/tests/ui/spawn_nonsend.stderr | |
| parent | 34ff67cdbf25e278ff99bd4a05b6b8c6a30fa5d1 (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.stderr | 10 |
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 | |||
| 12 | 7 | #[embassy_executor::task] | 12 | 7 | #[embassy_executor::task] |
| 13 | | ------------------------- within this `impl Sized` | 13 | | ------------------------- within this `impl Sized` |
| 14 | ... | 14 | ... |
| 15 | 13 | s.spawn(task(core::ptr::null_mut())).unwrap(); | 15 | 13 | 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 | |||
| 26 | note: required because it appears within the type `impl Sized` | 26 | note: 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 | | ^^^^^^^^^^ |
| 31 | note: required because it appears within the type `impl Sized` | 31 | note: 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` | |||
| 36 | note: required by a bound in `SendSpawner::spawn` | 36 | note: 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) |
