diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-06-29 22:37:11 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-07-04 00:23:22 +0200 |
| commit | 72248a601a9ea28ac696f186e2cbe4c2f128a133 (patch) | |
| tree | 109eca1e791766d62237056f9fa4a5a37a7b9d63 | |
| parent | b964bee302fc3631d14d73d9a9b406e7352cd550 (diff) | |
Update Rust nightly, stable.
| -rw-r--r-- | embassy-executor/build_common.rs | 32 | ||||
| -rw-r--r-- | embassy-executor/tests/ui/bad_return_impl_future.stderr | 32 | ||||
| -rw-r--r-- | embassy-executor/tests/ui/return_impl_send.stderr | 64 | ||||
| -rw-r--r-- | embassy-nrf/src/uarte.rs | 2 | ||||
| -rw-r--r-- | embassy-rp/src/flash.rs | 6 | ||||
| -rw-r--r-- | embassy-rp/src/relocate.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32/src/can/fd/message_ram/extended_filter.rs | 8 | ||||
| -rw-r--r-- | embassy-stm32/src/can/fd/message_ram/standard_filter.rs | 8 | ||||
| -rw-r--r-- | embassy-stm32/src/can/fd/message_ram/txbuffer_element.rs | 18 | ||||
| -rw-r--r-- | embassy-stm32/src/cordic/utils.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32/src/tsc/acquisition_banks.rs | 6 | ||||
| -rw-r--r-- | embassy-sync/src/pubsub/mod.rs | 8 | ||||
| -rw-r--r-- | embassy-usb/src/class/web_usb.rs | 2 | ||||
| -rw-r--r-- | rust-toolchain-nightly.toml | 2 | ||||
| -rw-r--r-- | rust-toolchain.toml | 2 |
15 files changed, 83 insertions, 111 deletions
diff --git a/embassy-executor/build_common.rs b/embassy-executor/build_common.rs index b15a8369f..4f24e6d37 100644 --- a/embassy-executor/build_common.rs +++ b/embassy-executor/build_common.rs | |||
| @@ -92,35 +92,3 @@ pub fn set_target_cfgs(cfgs: &mut CfgSet) { | |||
| 92 | 92 | ||
| 93 | cfgs.set("has_fpu", target.ends_with("-eabihf")); | 93 | cfgs.set("has_fpu", target.ends_with("-eabihf")); |
| 94 | } | 94 | } |
| 95 | |||
| 96 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] | ||
| 97 | pub struct CompilerDate { | ||
| 98 | year: u16, | ||
| 99 | month: u8, | ||
| 100 | day: u8, | ||
| 101 | } | ||
| 102 | |||
| 103 | impl CompilerDate { | ||
| 104 | fn parse(date: &str) -> Option<Self> { | ||
| 105 | let mut parts = date.split('-'); | ||
| 106 | let year = parts.next()?.parse().ok()?; | ||
| 107 | let month = parts.next()?.parse().ok()?; | ||
| 108 | let day = parts.next()?.parse().ok()?; | ||
| 109 | Some(Self { year, month, day }) | ||
| 110 | } | ||
| 111 | } | ||
| 112 | |||
| 113 | impl PartialEq<&str> for CompilerDate { | ||
| 114 | fn eq(&self, other: &&str) -> bool { | ||
| 115 | let Some(other) = Self::parse(other) else { | ||
| 116 | return false; | ||
| 117 | }; | ||
| 118 | self.eq(&other) | ||
| 119 | } | ||
| 120 | } | ||
| 121 | |||
| 122 | impl PartialOrd<&str> for CompilerDate { | ||
| 123 | fn partial_cmp(&self, other: &&str) -> Option<std::cmp::Ordering> { | ||
| 124 | Self::parse(other).map(|other| self.cmp(&other)) | ||
| 125 | } | ||
| 126 | } | ||
diff --git a/embassy-executor/tests/ui/bad_return_impl_future.stderr b/embassy-executor/tests/ui/bad_return_impl_future.stderr index 2980fd18b..57f147714 100644 --- a/embassy-executor/tests/ui/bad_return_impl_future.stderr +++ b/embassy-executor/tests/ui/bad_return_impl_future.stderr | |||
| @@ -77,6 +77,22 @@ error[E0277]: task futures must resolve to `()` or `!` | |||
| 77 | | ^^^^ the trait `TaskFn<_>` is not implemented for fn item `fn() -> impl Future<Output = u32> {__task_task}` | 77 | | ^^^^ the trait `TaskFn<_>` is not implemented for fn item `fn() -> impl Future<Output = u32> {__task_task}` |
| 78 | | | 78 | | |
| 79 | = note: use `async fn` or change the return type to `impl Future<Output = ()>` | 79 | = note: use `async fn` or change the return type to `impl Future<Output = ()>` |
| 80 | note: required by a bound in `__task_pool_get` | ||
| 81 | --> tests/ui/bad_return_impl_future.rs:4:1 | ||
| 82 | | | ||
| 83 | 4 | #[embassy_executor::task] | ||
| 84 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `__task_pool_get` | ||
| 85 | = note: this error originates in the attribute macro `embassy_executor::task` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
| 86 | |||
| 87 | error[E0277]: task futures must resolve to `()` or `!` | ||
| 88 | --> tests/ui/bad_return_impl_future.rs:5:4 | ||
| 89 | | | ||
| 90 | 4 | #[embassy_executor::task] | ||
| 91 | | ------------------------- required by a bound introduced by this call | ||
| 92 | 5 | fn task() -> impl Future<Output = u32> { | ||
| 93 | | ^^^^ the trait `TaskFn<_>` is not implemented for fn item `fn() -> impl Future<Output = u32> {__task_task}` | ||
| 94 | | | ||
| 95 | = note: use `async fn` or change the return type to `impl Future<Output = ()>` | ||
| 80 | note: required by a bound in `task_pool_new` | 96 | note: required by a bound in `task_pool_new` |
| 81 | --> src/lib.rs | 97 | --> src/lib.rs |
| 82 | | | 98 | | |
| @@ -102,19 +118,3 @@ note: required by a bound in `task_pool_new` | |||
| 102 | | F: TaskFn<Args, Fut = Fut>, | 118 | | F: TaskFn<Args, Fut = Fut>, |
| 103 | | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `task_pool_new` | 119 | | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `task_pool_new` |
| 104 | = note: this error originates in the attribute macro `embassy_executor::task` (in Nightly builds, run with -Z macro-backtrace for more info) | 120 | = note: this error originates in the attribute macro `embassy_executor::task` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 105 | |||
| 106 | error[E0277]: task futures must resolve to `()` or `!` | ||
| 107 | --> tests/ui/bad_return_impl_future.rs:5:4 | ||
| 108 | | | ||
| 109 | 4 | #[embassy_executor::task] | ||
| 110 | | ------------------------- required by a bound introduced by this call | ||
| 111 | 5 | fn task() -> impl Future<Output = u32> { | ||
| 112 | | ^^^^ the trait `TaskFn<_>` is not implemented for fn item `fn() -> impl Future<Output = u32> {__task_task}` | ||
| 113 | | | ||
| 114 | = note: use `async fn` or change the return type to `impl Future<Output = ()>` | ||
| 115 | note: required by a bound in `__task_pool_get` | ||
| 116 | --> tests/ui/bad_return_impl_future.rs:4:1 | ||
| 117 | | | ||
| 118 | 4 | #[embassy_executor::task] | ||
| 119 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `__task_pool_get` | ||
| 120 | = note: this error originates in the attribute macro `embassy_executor::task` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
diff --git a/embassy-executor/tests/ui/return_impl_send.stderr b/embassy-executor/tests/ui/return_impl_send.stderr index 7e3e468b8..cd693af2b 100644 --- a/embassy-executor/tests/ui/return_impl_send.stderr +++ b/embassy-executor/tests/ui/return_impl_send.stderr | |||
| @@ -77,30 +77,28 @@ error[E0277]: task futures must resolve to `()` or `!` | |||
| 77 | | ^^^^ the trait `TaskFn<_>` is not implemented for fn item `fn() -> impl Send {__task_task}` | 77 | | ^^^^ the trait `TaskFn<_>` is not implemented for fn item `fn() -> impl Send {__task_task}` |
| 78 | | | 78 | | |
| 79 | = note: use `async fn` or change the return type to `impl Future<Output = ()>` | 79 | = note: use `async fn` or change the return type to `impl Future<Output = ()>` |
| 80 | note: required by a bound in `task_pool_new` | 80 | note: required by a bound in `__task_pool_get` |
| 81 | --> src/lib.rs | 81 | --> tests/ui/return_impl_send.rs:3:1 |
| 82 | | | 82 | | |
| 83 | | pub const fn task_pool_new<F, Args, Fut, const POOL_SIZE: usize>(_: F) -> TaskPool<Fut, POOL_SIZE> | 83 | 3 | #[embassy_executor::task] |
| 84 | | ------------- required by a bound in this function | 84 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `__task_pool_get` |
| 85 | | where | 85 | = note: this error originates in the attribute macro `embassy_executor::task` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 86 | | F: TaskFn<Args, Fut = Fut>, | ||
| 87 | | ^^^^^^^^^ required by this bound in `task_pool_new` | ||
| 88 | 86 | ||
| 89 | error[E0277]: task futures must resolve to `()` or `!` | 87 | error[E0277]: `impl Send` is not a future |
| 90 | --> tests/ui/return_impl_send.rs:3:1 | 88 | --> tests/ui/return_impl_send.rs:3:1 |
| 91 | | | 89 | | |
| 92 | 3 | #[embassy_executor::task] | 90 | 3 | #[embassy_executor::task] |
| 93 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TaskFn<_>` is not implemented for fn item `fn() -> impl Send {__task_task}` | 91 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ `impl Send` is not a future |
| 94 | | | 92 | | |
| 95 | = note: use `async fn` or change the return type to `impl Future<Output = ()>` | 93 | = help: the trait `Future` is not implemented for `impl Send` |
| 96 | note: required by a bound in `task_pool_new` | 94 | note: required by a bound in `TaskPool::<F, N>::_spawn_async_fn` |
| 97 | --> src/lib.rs | 95 | --> src/raw/mod.rs |
| 98 | | | 96 | | |
| 99 | | pub const fn task_pool_new<F, Args, Fut, const POOL_SIZE: usize>(_: F) -> TaskPool<Fut, POOL_SIZE> | 97 | | impl<F: Future + 'static, const N: usize> TaskPool<F, N> { |
| 100 | | ------------- required by a bound in this function | 98 | | ^^^^^^ required by this bound in `TaskPool::<F, N>::_spawn_async_fn` |
| 101 | | where | 99 | ... |
| 102 | | F: TaskFn<Args, Fut = Fut>, | 100 | | pub unsafe fn _spawn_async_fn<FutFn>(&'static self, future: FutFn) -> SpawnToken<impl Sized> |
| 103 | | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `task_pool_new` | 101 | | --------------- required by a bound in this associated function |
| 104 | = note: this error originates in the attribute macro `embassy_executor::task` (in Nightly builds, run with -Z macro-backtrace for more info) | 102 | = note: this error originates in the attribute macro `embassy_executor::task` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 105 | 103 | ||
| 106 | error[E0277]: task futures must resolve to `()` or `!` | 104 | error[E0277]: task futures must resolve to `()` or `!` |
| @@ -112,26 +110,28 @@ error[E0277]: task futures must resolve to `()` or `!` | |||
| 112 | | ^^^^ the trait `TaskFn<_>` is not implemented for fn item `fn() -> impl Send {__task_task}` | 110 | | ^^^^ the trait `TaskFn<_>` is not implemented for fn item `fn() -> impl Send {__task_task}` |
| 113 | | | 111 | | |
| 114 | = note: use `async fn` or change the return type to `impl Future<Output = ()>` | 112 | = note: use `async fn` or change the return type to `impl Future<Output = ()>` |
| 115 | note: required by a bound in `__task_pool_get` | 113 | note: required by a bound in `task_pool_new` |
| 116 | --> tests/ui/return_impl_send.rs:3:1 | 114 | --> src/lib.rs |
| 117 | | | 115 | | |
| 118 | 3 | #[embassy_executor::task] | 116 | | pub const fn task_pool_new<F, Args, Fut, const POOL_SIZE: usize>(_: F) -> TaskPool<Fut, POOL_SIZE> |
| 119 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `__task_pool_get` | 117 | | ------------- required by a bound in this function |
| 120 | = note: this error originates in the attribute macro `embassy_executor::task` (in Nightly builds, run with -Z macro-backtrace for more info) | 118 | | where |
| 119 | | F: TaskFn<Args, Fut = Fut>, | ||
| 120 | | ^^^^^^^^^ required by this bound in `task_pool_new` | ||
| 121 | 121 | ||
| 122 | error[E0277]: `impl Send` is not a future | 122 | error[E0277]: task futures must resolve to `()` or `!` |
| 123 | --> tests/ui/return_impl_send.rs:3:1 | 123 | --> tests/ui/return_impl_send.rs:3:1 |
| 124 | | | 124 | | |
| 125 | 3 | #[embassy_executor::task] | 125 | 3 | #[embassy_executor::task] |
| 126 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ `impl Send` is not a future | 126 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TaskFn<_>` is not implemented for fn item `fn() -> impl Send {__task_task}` |
| 127 | | | 127 | | |
| 128 | = help: the trait `Future` is not implemented for `impl Send` | 128 | = note: use `async fn` or change the return type to `impl Future<Output = ()>` |
| 129 | note: required by a bound in `TaskPool::<F, N>::_spawn_async_fn` | 129 | note: required by a bound in `task_pool_new` |
| 130 | --> src/raw/mod.rs | 130 | --> src/lib.rs |
| 131 | | | 131 | | |
| 132 | | impl<F: Future + 'static, const N: usize> TaskPool<F, N> { | 132 | | pub const fn task_pool_new<F, Args, Fut, const POOL_SIZE: usize>(_: F) -> TaskPool<Fut, POOL_SIZE> |
| 133 | | ^^^^^^ required by this bound in `TaskPool::<F, N>::_spawn_async_fn` | 133 | | ------------- required by a bound in this function |
| 134 | ... | 134 | | where |
| 135 | | pub unsafe fn _spawn_async_fn<FutFn>(&'static self, future: FutFn) -> SpawnToken<impl Sized> | 135 | | F: TaskFn<Args, Fut = Fut>, |
| 136 | | --------------- required by a bound in this associated function | 136 | | ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `task_pool_new` |
| 137 | = note: this error originates in the attribute macro `embassy_executor::task` (in Nightly builds, run with -Z macro-backtrace for more info) | 137 | = note: this error originates in the attribute macro `embassy_executor::task` (in Nightly builds, run with -Z macro-backtrace for more info) |
diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs index f377df49e..927a0ac08 100644 --- a/embassy-nrf/src/uarte.rs +++ b/embassy-nrf/src/uarte.rs | |||
| @@ -245,7 +245,7 @@ impl<'d, T: Instance> Uarte<'d, T> { | |||
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | /// Return the endtx event for use with PPI | 247 | /// Return the endtx event for use with PPI |
| 248 | pub fn event_endtx(&self) -> Event { | 248 | pub fn event_endtx(&self) -> Event<'_> { |
| 249 | let r = T::regs(); | 249 | let r = T::regs(); |
| 250 | Event::from_reg(r.events_endtx()) | 250 | Event::from_reg(r.events_endtx()) |
| 251 | } | 251 | } |
diff --git a/embassy-rp/src/flash.rs b/embassy-rp/src/flash.rs index ef1cd9212..8c809090e 100644 --- a/embassy-rp/src/flash.rs +++ b/embassy-rp/src/flash.rs | |||
| @@ -482,7 +482,11 @@ mod ram_helpers { | |||
| 482 | /// # Safety | 482 | /// # Safety |
| 483 | /// | 483 | /// |
| 484 | /// `boot2` must contain a valid 2nd stage boot loader which can be called to re-initialize XIP mode | 484 | /// `boot2` must contain a valid 2nd stage boot loader which can be called to re-initialize XIP mode |
| 485 | unsafe fn flash_function_pointers_with_boot2(erase: bool, write: bool, boot2: &[u32; 64]) -> FlashFunctionPointers { | 485 | unsafe fn flash_function_pointers_with_boot2( |
| 486 | erase: bool, | ||
| 487 | write: bool, | ||
| 488 | boot2: &[u32; 64], | ||
| 489 | ) -> FlashFunctionPointers<'_> { | ||
| 486 | let boot2_fn_ptr = (boot2 as *const u32 as *const u8).offset(1); | 490 | let boot2_fn_ptr = (boot2 as *const u32 as *const u8).offset(1); |
| 487 | let boot2_fn: unsafe extern "C" fn() -> () = core::mem::transmute(boot2_fn_ptr); | 491 | let boot2_fn: unsafe extern "C" fn() -> () = core::mem::transmute(boot2_fn_ptr); |
| 488 | FlashFunctionPointers { | 492 | FlashFunctionPointers { |
diff --git a/embassy-rp/src/relocate.rs b/embassy-rp/src/relocate.rs index 34487819f..6ff40ddd7 100644 --- a/embassy-rp/src/relocate.rs +++ b/embassy-rp/src/relocate.rs | |||
| @@ -39,7 +39,7 @@ pub struct RelocatedProgram<'a, const PROGRAM_SIZE: usize> { | |||
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | impl<'a, const PROGRAM_SIZE: usize> RelocatedProgram<'a, PROGRAM_SIZE> { | 41 | impl<'a, const PROGRAM_SIZE: usize> RelocatedProgram<'a, PROGRAM_SIZE> { |
| 42 | pub fn new_with_origin(program: &Program<PROGRAM_SIZE>, origin: u8) -> RelocatedProgram<PROGRAM_SIZE> { | 42 | pub fn new_with_origin(program: &Program<PROGRAM_SIZE>, origin: u8) -> RelocatedProgram<'_, PROGRAM_SIZE> { |
| 43 | RelocatedProgram { program, origin } | 43 | RelocatedProgram { program, origin } |
| 44 | } | 44 | } |
| 45 | 45 | ||
diff --git a/embassy-stm32/src/can/fd/message_ram/extended_filter.rs b/embassy-stm32/src/can/fd/message_ram/extended_filter.rs index 453e9056e..ac47901a8 100644 --- a/embassy-stm32/src/can/fd/message_ram/extended_filter.rs +++ b/embassy-stm32/src/can/fd/message_ram/extended_filter.rs | |||
| @@ -115,22 +115,22 @@ impl R { | |||
| 115 | impl W { | 115 | impl W { |
| 116 | #[doc = "Byte 0 - Bits 0:28 - EFID1"] | 116 | #[doc = "Byte 0 - Bits 0:28 - EFID1"] |
| 117 | #[inline(always)] | 117 | #[inline(always)] |
| 118 | pub fn efid1(&mut self) -> EFID1_W { | 118 | pub fn efid1(&mut self) -> EFID1_W<'_> { |
| 119 | EFID1_W { w: self } | 119 | EFID1_W { w: self } |
| 120 | } | 120 | } |
| 121 | #[doc = "Byte 0 - Bits 29:31 - EFEC"] | 121 | #[doc = "Byte 0 - Bits 29:31 - EFEC"] |
| 122 | #[inline(always)] | 122 | #[inline(always)] |
| 123 | pub fn efec(&mut self) -> EFEC_W { | 123 | pub fn efec(&mut self) -> EFEC_W<'_> { |
| 124 | EFEC_W { w: self } | 124 | EFEC_W { w: self } |
| 125 | } | 125 | } |
| 126 | #[doc = "Byte 1 - Bits 0:28 - EFID2"] | 126 | #[doc = "Byte 1 - Bits 0:28 - EFID2"] |
| 127 | #[inline(always)] | 127 | #[inline(always)] |
| 128 | pub fn efid2(&mut self) -> EFID2_W { | 128 | pub fn efid2(&mut self) -> EFID2_W<'_> { |
| 129 | EFID2_W { w: self } | 129 | EFID2_W { w: self } |
| 130 | } | 130 | } |
| 131 | #[doc = "Byte 1 - Bits 30:31 - EFT"] | 131 | #[doc = "Byte 1 - Bits 30:31 - EFT"] |
| 132 | #[inline(always)] | 132 | #[inline(always)] |
| 133 | pub fn eft(&mut self) -> EFT_W { | 133 | pub fn eft(&mut self) -> EFT_W<'_> { |
| 134 | EFT_W { w: self } | 134 | EFT_W { w: self } |
| 135 | } | 135 | } |
| 136 | } | 136 | } |
diff --git a/embassy-stm32/src/can/fd/message_ram/standard_filter.rs b/embassy-stm32/src/can/fd/message_ram/standard_filter.rs index 3a3bbcf12..f52646bfe 100644 --- a/embassy-stm32/src/can/fd/message_ram/standard_filter.rs +++ b/embassy-stm32/src/can/fd/message_ram/standard_filter.rs | |||
| @@ -115,22 +115,22 @@ impl R { | |||
| 115 | impl W { | 115 | impl W { |
| 116 | #[doc = "Bits 0:10 - SFID2"] | 116 | #[doc = "Bits 0:10 - SFID2"] |
| 117 | #[inline(always)] | 117 | #[inline(always)] |
| 118 | pub fn sfid2(&mut self) -> SFID2_W { | 118 | pub fn sfid2(&mut self) -> SFID2_W<'_> { |
| 119 | SFID2_W { w: self } | 119 | SFID2_W { w: self } |
| 120 | } | 120 | } |
| 121 | #[doc = "Bits 16:26 - SFID1"] | 121 | #[doc = "Bits 16:26 - SFID1"] |
| 122 | #[inline(always)] | 122 | #[inline(always)] |
| 123 | pub fn sfid1(&mut self) -> SFID1_W { | 123 | pub fn sfid1(&mut self) -> SFID1_W<'_> { |
| 124 | SFID1_W { w: self } | 124 | SFID1_W { w: self } |
| 125 | } | 125 | } |
| 126 | #[doc = "Bits 27:29 - SFEC"] | 126 | #[doc = "Bits 27:29 - SFEC"] |
| 127 | #[inline(always)] | 127 | #[inline(always)] |
| 128 | pub fn sfec(&mut self) -> SFEC_W { | 128 | pub fn sfec(&mut self) -> SFEC_W<'_> { |
| 129 | SFEC_W { w: self } | 129 | SFEC_W { w: self } |
| 130 | } | 130 | } |
| 131 | #[doc = "Bits 30:31 - SFT"] | 131 | #[doc = "Bits 30:31 - SFT"] |
| 132 | #[inline(always)] | 132 | #[inline(always)] |
| 133 | pub fn sft(&mut self) -> SFT_W { | 133 | pub fn sft(&mut self) -> SFT_W<'_> { |
| 134 | SFT_W { w: self } | 134 | SFT_W { w: self } |
| 135 | } | 135 | } |
| 136 | } | 136 | } |
diff --git a/embassy-stm32/src/can/fd/message_ram/txbuffer_element.rs b/embassy-stm32/src/can/fd/message_ram/txbuffer_element.rs index 455406a1c..6d65a86cb 100644 --- a/embassy-stm32/src/can/fd/message_ram/txbuffer_element.rs +++ b/embassy-stm32/src/can/fd/message_ram/txbuffer_element.rs | |||
| @@ -376,47 +376,47 @@ impl R { | |||
| 376 | impl W { | 376 | impl W { |
| 377 | #[doc = "Byte 0 - Bits 0:28 - ID"] | 377 | #[doc = "Byte 0 - Bits 0:28 - ID"] |
| 378 | #[inline(always)] | 378 | #[inline(always)] |
| 379 | pub fn id(&mut self) -> ID_W { | 379 | pub fn id(&mut self) -> ID_W<'_> { |
| 380 | ID_W { w: self } | 380 | ID_W { w: self } |
| 381 | } | 381 | } |
| 382 | #[doc = "Byte 0 - Bit 29 - RTR"] | 382 | #[doc = "Byte 0 - Bit 29 - RTR"] |
| 383 | #[inline(always)] | 383 | #[inline(always)] |
| 384 | pub fn rtr(&mut self) -> RTR_W { | 384 | pub fn rtr(&mut self) -> RTR_W<'_> { |
| 385 | RTR_W { w: self } | 385 | RTR_W { w: self } |
| 386 | } | 386 | } |
| 387 | #[doc = "Byte 0 - Bit 30 - XTD"] | 387 | #[doc = "Byte 0 - Bit 30 - XTD"] |
| 388 | #[inline(always)] | 388 | #[inline(always)] |
| 389 | pub fn xtd(&mut self) -> XTD_W { | 389 | pub fn xtd(&mut self) -> XTD_W<'_> { |
| 390 | XTD_W { w: self } | 390 | XTD_W { w: self } |
| 391 | } | 391 | } |
| 392 | #[doc = "Byte 0 - Bit 31 - ESI"] | 392 | #[doc = "Byte 0 - Bit 31 - ESI"] |
| 393 | #[inline(always)] | 393 | #[inline(always)] |
| 394 | pub fn esi(&mut self) -> ESI_W { | 394 | pub fn esi(&mut self) -> ESI_W<'_> { |
| 395 | ESI_W { w: self } | 395 | ESI_W { w: self } |
| 396 | } | 396 | } |
| 397 | #[doc = "Byte 1 - Bit 16:19 - DLC"] | 397 | #[doc = "Byte 1 - Bit 16:19 - DLC"] |
| 398 | #[inline(always)] | 398 | #[inline(always)] |
| 399 | pub fn dlc(&mut self) -> DLC_W { | 399 | pub fn dlc(&mut self) -> DLC_W<'_> { |
| 400 | DLC_W { w: self } | 400 | DLC_W { w: self } |
| 401 | } | 401 | } |
| 402 | #[doc = "Byte 1 - Bit 20 - BRS"] | 402 | #[doc = "Byte 1 - Bit 20 - BRS"] |
| 403 | #[inline(always)] | 403 | #[inline(always)] |
| 404 | pub fn brs(&mut self) -> BRS_W { | 404 | pub fn brs(&mut self) -> BRS_W<'_> { |
| 405 | BRS_W { w: self } | 405 | BRS_W { w: self } |
| 406 | } | 406 | } |
| 407 | #[doc = "Byte 1 - Bit 21 - FDF"] | 407 | #[doc = "Byte 1 - Bit 21 - FDF"] |
| 408 | #[inline(always)] | 408 | #[inline(always)] |
| 409 | pub fn fdf(&mut self) -> FDF_W { | 409 | pub fn fdf(&mut self) -> FDF_W<'_> { |
| 410 | FDF_W { w: self } | 410 | FDF_W { w: self } |
| 411 | } | 411 | } |
| 412 | #[doc = "Byte 1 - Bit 23 - EFC"] | 412 | #[doc = "Byte 1 - Bit 23 - EFC"] |
| 413 | #[inline(always)] | 413 | #[inline(always)] |
| 414 | pub fn efc(&mut self) -> EFC_W { | 414 | pub fn efc(&mut self) -> EFC_W<'_> { |
| 415 | EFC_W { w: self } | 415 | EFC_W { w: self } |
| 416 | } | 416 | } |
| 417 | #[doc = "Byte 1 - Bit 24:31 - MM"] | 417 | #[doc = "Byte 1 - Bit 24:31 - MM"] |
| 418 | #[inline(always)] | 418 | #[inline(always)] |
| 419 | pub fn mm(&mut self) -> MM_W { | 419 | pub fn mm(&mut self) -> MM_W<'_> { |
| 420 | MM_W { w: self } | 420 | MM_W { w: self } |
| 421 | } | 421 | } |
| 422 | #[doc = "Convenience function for setting the data length and frame format"] | 422 | #[doc = "Convenience function for setting the data length and frame format"] |
diff --git a/embassy-stm32/src/cordic/utils.rs b/embassy-stm32/src/cordic/utils.rs index 008f50270..9afa8ef53 100644 --- a/embassy-stm32/src/cordic/utils.rs +++ b/embassy-stm32/src/cordic/utils.rs | |||
| @@ -5,7 +5,7 @@ macro_rules! floating_fixed_convert { | |||
| 5 | ($f_to_q:ident, $q_to_f:ident, $unsigned_bin_typ:ty, $signed_bin_typ:ty, $float_ty:ty, $offset:literal, $min_positive:literal) => { | 5 | ($f_to_q:ident, $q_to_f:ident, $unsigned_bin_typ:ty, $signed_bin_typ:ty, $float_ty:ty, $offset:literal, $min_positive:literal) => { |
| 6 | /// convert float point to fixed point format | 6 | /// convert float point to fixed point format |
| 7 | pub fn $f_to_q(value: $float_ty) -> Result<$unsigned_bin_typ, NumberOutOfRange> { | 7 | pub fn $f_to_q(value: $float_ty) -> Result<$unsigned_bin_typ, NumberOutOfRange> { |
| 8 | const MIN_POSITIVE: $float_ty = unsafe { core::mem::transmute($min_positive) }; | 8 | const MIN_POSITIVE: $float_ty = <$float_ty>::from_bits($min_positive); |
| 9 | 9 | ||
| 10 | if value < -1.0 { | 10 | if value < -1.0 { |
| 11 | return Err(NumberOutOfRange::BelowLowerBound) | 11 | return Err(NumberOutOfRange::BelowLowerBound) |
diff --git a/embassy-stm32/src/tsc/acquisition_banks.rs b/embassy-stm32/src/tsc/acquisition_banks.rs index 6791ef6c1..7d6442b48 100644 --- a/embassy-stm32/src/tsc/acquisition_banks.rs +++ b/embassy-stm32/src/tsc/acquisition_banks.rs | |||
| @@ -32,7 +32,7 @@ impl AcquisitionBankPins { | |||
| 32 | /// Returns an iterator over the pins in this acquisition bank. | 32 | /// Returns an iterator over the pins in this acquisition bank. |
| 33 | /// | 33 | /// |
| 34 | /// This method allows for easy traversal of all configured pins in the bank. | 34 | /// This method allows for easy traversal of all configured pins in the bank. |
| 35 | pub fn iter(&self) -> AcquisitionBankPinsIterator { | 35 | pub fn iter(&self) -> AcquisitionBankPinsIterator<'_> { |
| 36 | AcquisitionBankPinsIterator(AcquisitionBankIterator::new(self)) | 36 | AcquisitionBankPinsIterator(AcquisitionBankIterator::new(self)) |
| 37 | } | 37 | } |
| 38 | } | 38 | } |
| @@ -90,7 +90,7 @@ impl<'a> Iterator for AcquisitionBankPinsIterator<'a> { | |||
| 90 | 90 | ||
| 91 | impl AcquisitionBankPins { | 91 | impl AcquisitionBankPins { |
| 92 | /// Returns an iterator over the available pins in the bank | 92 | /// Returns an iterator over the available pins in the bank |
| 93 | pub fn pins_iterator(&self) -> AcquisitionBankPinsIterator { | 93 | pub fn pins_iterator(&self) -> AcquisitionBankPinsIterator<'_> { |
| 94 | AcquisitionBankPinsIterator(AcquisitionBankIterator::new(self)) | 94 | AcquisitionBankPinsIterator(AcquisitionBankIterator::new(self)) |
| 95 | } | 95 | } |
| 96 | } | 96 | } |
| @@ -107,7 +107,7 @@ pub struct AcquisitionBank { | |||
| 107 | 107 | ||
| 108 | impl AcquisitionBank { | 108 | impl AcquisitionBank { |
| 109 | /// Returns an iterator over the available pins in the bank. | 109 | /// Returns an iterator over the available pins in the bank. |
| 110 | pub fn pins_iterator(&self) -> AcquisitionBankPinsIterator { | 110 | pub fn pins_iterator(&self) -> AcquisitionBankPinsIterator<'_> { |
| 111 | self.pins.pins_iterator() | 111 | self.pins.pins_iterator() |
| 112 | } | 112 | } |
| 113 | 113 | ||
diff --git a/embassy-sync/src/pubsub/mod.rs b/embassy-sync/src/pubsub/mod.rs index 606efff0a..9206b9383 100644 --- a/embassy-sync/src/pubsub/mod.rs +++ b/embassy-sync/src/pubsub/mod.rs | |||
| @@ -88,7 +88,7 @@ impl<M: RawMutex, T: Clone, const CAP: usize, const SUBS: usize, const PUBS: usi | |||
| 88 | /// Create a new subscriber. It will only receive messages that are published after its creation. | 88 | /// Create a new subscriber. It will only receive messages that are published after its creation. |
| 89 | /// | 89 | /// |
| 90 | /// If there are no subscriber slots left, an error will be returned. | 90 | /// If there are no subscriber slots left, an error will be returned. |
| 91 | pub fn subscriber(&self) -> Result<Subscriber<M, T, CAP, SUBS, PUBS>, Error> { | 91 | pub fn subscriber(&self) -> Result<Subscriber<'_, M, T, CAP, SUBS, PUBS>, Error> { |
| 92 | self.inner.lock(|inner| { | 92 | self.inner.lock(|inner| { |
| 93 | let mut s = inner.borrow_mut(); | 93 | let mut s = inner.borrow_mut(); |
| 94 | 94 | ||
| @@ -120,7 +120,7 @@ impl<M: RawMutex, T: Clone, const CAP: usize, const SUBS: usize, const PUBS: usi | |||
| 120 | /// Create a new publisher | 120 | /// Create a new publisher |
| 121 | /// | 121 | /// |
| 122 | /// If there are no publisher slots left, an error will be returned. | 122 | /// If there are no publisher slots left, an error will be returned. |
| 123 | pub fn publisher(&self) -> Result<Publisher<M, T, CAP, SUBS, PUBS>, Error> { | 123 | pub fn publisher(&self) -> Result<Publisher<'_, M, T, CAP, SUBS, PUBS>, Error> { |
| 124 | self.inner.lock(|inner| { | 124 | self.inner.lock(|inner| { |
| 125 | let mut s = inner.borrow_mut(); | 125 | let mut s = inner.borrow_mut(); |
| 126 | 126 | ||
| @@ -151,13 +151,13 @@ impl<M: RawMutex, T: Clone, const CAP: usize, const SUBS: usize, const PUBS: usi | |||
| 151 | 151 | ||
| 152 | /// Create a new publisher that can only send immediate messages. | 152 | /// Create a new publisher that can only send immediate messages. |
| 153 | /// This kind of publisher does not take up a publisher slot. | 153 | /// This kind of publisher does not take up a publisher slot. |
| 154 | pub fn immediate_publisher(&self) -> ImmediatePublisher<M, T, CAP, SUBS, PUBS> { | 154 | pub fn immediate_publisher(&self) -> ImmediatePublisher<'_, M, T, CAP, SUBS, PUBS> { |
| 155 | ImmediatePublisher(ImmediatePub::new(self)) | 155 | ImmediatePublisher(ImmediatePub::new(self)) |
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | /// Create a new publisher that can only send immediate messages. | 158 | /// Create a new publisher that can only send immediate messages. |
| 159 | /// This kind of publisher does not take up a publisher slot. | 159 | /// This kind of publisher does not take up a publisher slot. |
| 160 | pub fn dyn_immediate_publisher(&self) -> DynImmediatePublisher<T> { | 160 | pub fn dyn_immediate_publisher(&self) -> DynImmediatePublisher<'_, T> { |
| 161 | DynImmediatePublisher(ImmediatePub::new(self)) | 161 | DynImmediatePublisher(ImmediatePub::new(self)) |
| 162 | } | 162 | } |
| 163 | 163 | ||
diff --git a/embassy-usb/src/class/web_usb.rs b/embassy-usb/src/class/web_usb.rs index 405944f14..154b219ca 100644 --- a/embassy-usb/src/class/web_usb.rs +++ b/embassy-usb/src/class/web_usb.rs | |||
| @@ -84,7 +84,7 @@ impl<'d> Control<'d> { | |||
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | impl<'d> Handler for Control<'d> { | 86 | impl<'d> Handler for Control<'d> { |
| 87 | fn control_in(&mut self, req: Request, _data: &mut [u8]) -> Option<InResponse> { | 87 | fn control_in(&mut self, req: Request, _data: &mut [u8]) -> Option<InResponse<'_>> { |
| 88 | let landing_value = if self.landing_url.is_some() { 1 } else { 0 }; | 88 | let landing_value = if self.landing_url.is_some() { 1 } else { 0 }; |
| 89 | if req.request_type == RequestType::Vendor | 89 | if req.request_type == RequestType::Vendor |
| 90 | && req.recipient == Recipient::Device | 90 | && req.recipient == Recipient::Device |
diff --git a/rust-toolchain-nightly.toml b/rust-toolchain-nightly.toml index e75ea40cc..411cc6946 100644 --- a/rust-toolchain-nightly.toml +++ b/rust-toolchain-nightly.toml | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | [toolchain] | 1 | [toolchain] |
| 2 | channel = "nightly-2025-03-12" | 2 | channel = "nightly-2025-06-29" |
| 3 | components = [ "rust-src", "rustfmt", "llvm-tools", "miri" ] | 3 | components = [ "rust-src", "rustfmt", "llvm-tools", "miri" ] |
| 4 | targets = [ | 4 | targets = [ |
| 5 | "thumbv7em-none-eabi", | 5 | "thumbv7em-none-eabi", |
diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 870904c3a..e24864037 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | [toolchain] | 1 | [toolchain] |
| 2 | channel = "1.85" | 2 | channel = "1.88" |
| 3 | components = [ "rust-src", "rustfmt", "llvm-tools" ] | 3 | components = [ "rust-src", "rustfmt", "llvm-tools" ] |
| 4 | targets = [ | 4 | targets = [ |
| 5 | "thumbv7em-none-eabi", | 5 | "thumbv7em-none-eabi", |
