From 4d71f432ad05cd8cce50b13cf6de6a1422f3b401 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 22 Sep 2025 00:47:08 +0200 Subject: Update manifests to satisfy new checks. --- embassy-sync/Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'embassy-sync') diff --git a/embassy-sync/Cargo.toml b/embassy-sync/Cargo.toml index 6494da727..64d76baba 100644 --- a/embassy-sync/Cargo.toml +++ b/embassy-sync/Cargo.toml @@ -27,6 +27,8 @@ src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-sync/ target = "thumbv7em-none-eabi" [features] +defmt = ["dep:defmt"] +log = ["dep:log"] std = [] turbowakers = [] -- cgit From 0850f3b537feb66160b721c280d07d7c85518151 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 22 Sep 2025 01:00:38 +0200 Subject: Update Rust. --- embassy-sync/tests/ui/sync_impl/lazy_lock_function.stderr | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'embassy-sync') diff --git a/embassy-sync/tests/ui/sync_impl/lazy_lock_function.stderr b/embassy-sync/tests/ui/sync_impl/lazy_lock_function.stderr index daf79ad28..417fb8e31 100644 --- a/embassy-sync/tests/ui/sync_impl/lazy_lock_function.stderr +++ b/embassy-sync/tests/ui/sync_impl/lazy_lock_function.stderr @@ -1,10 +1,10 @@ error[E0277]: `*const u8` cannot be shared between threads safely --> tests/ui/sync_impl/lazy_lock_function.rs:8:16 | -6 | let closure_capturing_non_sync_variable = || unsafe { core::ptr::read(x_ptr) }; + 6 | let closure_capturing_non_sync_variable = || unsafe { core::ptr::read(x_ptr) }; | -- within this `{closure@$DIR/tests/ui/sync_impl/lazy_lock_function.rs:6:47: 6:49}` -7 | -8 | check_sync(LazyLock::new(closure_capturing_non_sync_variable)); + 7 | + 8 | check_sync(LazyLock::new(closure_capturing_non_sync_variable)); | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const u8` cannot be shared between threads safely | | | required by a bound introduced by this call @@ -14,7 +14,7 @@ error[E0277]: `*const u8` cannot be shared between threads safely note: required because it's used within this closure --> tests/ui/sync_impl/lazy_lock_function.rs:6:47 | -6 | let closure_capturing_non_sync_variable = || unsafe { core::ptr::read(x_ptr) }; + 6 | let closure_capturing_non_sync_variable = || unsafe { core::ptr::read(x_ptr) }; | ^^ = note: required for `embassy_sync::lazy_lock::LazyLock` to implement `Sync` note: required by a bound in `check_sync` -- cgit From 99febbe3a42ac05b723e6e76088d159eb0acfa5e Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 23 Sep 2025 13:55:55 +0200 Subject: more docs fixes --- embassy-sync/src/blocking_mutex/mod.rs | 4 ++-- embassy-sync/src/blocking_mutex/raw.rs | 4 ++-- embassy-sync/src/rwlock.rs | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'embassy-sync') diff --git a/embassy-sync/src/blocking_mutex/mod.rs b/embassy-sync/src/blocking_mutex/mod.rs index 11809c763..62bfc26fb 100644 --- a/embassy-sync/src/blocking_mutex/mod.rs +++ b/embassy-sync/src/blocking_mutex/mod.rs @@ -135,9 +135,9 @@ impl Mutex { // There's still a ThreadModeRawMutex for use with the generic Mutex (handy with Channel, for example), // but that will require T: Send even though it shouldn't be needed. -#[cfg(any(cortex_m, feature = "std"))] +#[cfg(any(cortex_m, doc, feature = "std"))] pub use thread_mode_mutex::*; -#[cfg(any(cortex_m, feature = "std"))] +#[cfg(any(cortex_m, doc, feature = "std"))] mod thread_mode_mutex { use super::*; diff --git a/embassy-sync/src/blocking_mutex/raw.rs b/embassy-sync/src/blocking_mutex/raw.rs index 50f965e00..fbb9ece15 100644 --- a/embassy-sync/src/blocking_mutex/raw.rs +++ b/embassy-sync/src/blocking_mutex/raw.rs @@ -89,7 +89,7 @@ unsafe impl RawMutex for NoopRawMutex { // ================ -#[cfg(any(cortex_m, feature = "std"))] +#[cfg(any(cortex_m, doc, feature = "std"))] mod thread_mode { use super::*; @@ -147,5 +147,5 @@ mod thread_mode { return unsafe { (0xE000ED04 as *const u32).read_volatile() } & 0x1FF == 0; } } -#[cfg(any(cortex_m, feature = "std"))] +#[cfg(any(cortex_m, doc, feature = "std"))] pub use thread_mode::*; diff --git a/embassy-sync/src/rwlock.rs b/embassy-sync/src/rwlock.rs index 0d784a7dc..e43388c4d 100644 --- a/embassy-sync/src/rwlock.rs +++ b/embassy-sync/src/rwlock.rs @@ -37,8 +37,6 @@ struct State { /// Use [`NoopRawMutex`](crate::blocking_mutex::raw::NoopRawMutex) when data is only shared between tasks running on the same executor. /// /// Use [`ThreadModeRawMutex`](crate::blocking_mutex::raw::ThreadModeRawMutex) when data is shared between tasks running on the same executor but you want a singleton. -/// - pub struct RwLock where M: RawMutex, -- cgit