From a7cb300105f1e9698abc70d485cc7defc164bc1f Mon Sep 17 00:00:00 2001 From: Nick Spinale Date: Wed, 1 May 2024 23:16:39 +0000 Subject: [PATCH] Restore remaining uses of #![feature(associated_type_bounds)] Signed-off-by: Nick Spinale --- crates/sel4-async/block-io/src/lib.rs | 20 +++++-------------- .../cli/src/bin/sel4-embed-debug-info.rs | 10 ++++------ .../bookkeeping/src/slot_tracker.rs | 8 ++------ 3 files changed, 11 insertions(+), 27 deletions(-) diff --git a/crates/sel4-async/block-io/src/lib.rs b/crates/sel4-async/block-io/src/lib.rs index 479f7ba3f..c1fa5d462 100644 --- a/crates/sel4-async/block-io/src/lib.rs +++ b/crates/sel4-async/block-io/src/lib.rs @@ -213,10 +213,7 @@ impl NextBlockSizeAdapter { wrapper_methods!(T); } -impl BlockIOLayout for NextBlockSizeAdapter -where - T::BlockSize: HasNextBlockSize, -{ +impl> BlockIOLayout for NextBlockSizeAdapter { type Error = T::Error; type BlockSize = ::NextBlockSize; @@ -232,10 +229,7 @@ where } } -impl, A: Access> BlockIO for NextBlockSizeAdapter -where - T::BlockSize: HasNextBlockSize, -{ +impl, A: Access> BlockIO for NextBlockSizeAdapter { async fn read_or_write_blocks( &self, start_block_idx: u64, @@ -261,10 +255,7 @@ impl PrevBlockSizeAdapter { wrapper_methods!(T); } -impl BlockIOLayout for PrevBlockSizeAdapter -where - T::BlockSize: HasPrevBlockSize, -{ +impl> BlockIOLayout for PrevBlockSizeAdapter { type Error = T::Error; type BlockSize = ::PrevBlockSize; @@ -278,9 +269,8 @@ where } } -impl, A: ReadAccess> BlockIO for PrevBlockSizeAdapter -where - T::BlockSize: HasPrevBlockSize, +impl, A: ReadAccess> BlockIO + for PrevBlockSizeAdapter { async fn read_or_write_blocks( &self, diff --git a/crates/sel4-backtrace/embedded-debug-info/cli/src/bin/sel4-embed-debug-info.rs b/crates/sel4-backtrace/embedded-debug-info/cli/src/bin/sel4-embed-debug-info.rs index cc33dd225..b3fbddb39 100644 --- a/crates/sel4-backtrace/embedded-debug-info/cli/src/bin/sel4-embed-debug-info.rs +++ b/crates/sel4-backtrace/embedded-debug-info/cli/src/bin/sel4-embed-debug-info.rs @@ -61,12 +61,10 @@ fn main() -> Result<(), io::Error> { fs::write(out_elf_path, out_elf) } -fn with_bit_width(image_elf: &[u8], content: &[u8]) -> Vec -where - T: FileHeaderExt, - T::Word: PrimInt, - T::Sword: PrimInt, -{ +fn with_bit_width>( + image_elf: &[u8], + content: &[u8], +) -> Vec { let content_len = NumCast::from(content.len()).unwrap(); let mut input = Input::::default(); input.symbolic_injections.push(SymbolicInjection { diff --git a/crates/sel4-shared-ring-buffer/bookkeeping/src/slot_tracker.rs b/crates/sel4-shared-ring-buffer/bookkeeping/src/slot_tracker.rs index 8edd6c4a7..abe86e33e 100644 --- a/crates/sel4-shared-ring-buffer/bookkeeping/src/slot_tracker.rs +++ b/crates/sel4-shared-ring-buffer/bookkeeping/src/slot_tracker.rs @@ -69,9 +69,7 @@ impl SlotTracker { pub fn new_with_capacity(common: T::Common, free: T::Free, capacity: usize) -> Self where - T: SlotStateTypes, - T::Common: Clone, - T::Free: Clone, + T: SlotStateTypes, { Self::new(iter::repeat((common, free)).take(capacity)) } @@ -96,9 +94,7 @@ impl SlotTracker { capacity: usize, ) -> Self where - T: SlotStateTypes, - T::Common: Clone, - T::Occupied: Clone, + T: SlotStateTypes, { Self::new_occupied(iter::repeat((common, occupied)).take(capacity)) }