From 37b51462dcf26dc40ac5d7e82acdfd4cbe754157 Mon Sep 17 00:00:00 2001 From: Rubens Brandao Date: Wed, 10 Apr 2024 17:58:05 -0300 Subject: fix the array implementation using GAT --- rust/src/basicblock.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'rust/src/basicblock.rs') diff --git a/rust/src/basicblock.rs b/rust/src/basicblock.rs index 73ad9362..f28e596f 100644 --- a/rust/src/basicblock.rs +++ b/rust/src/basicblock.rs @@ -76,10 +76,10 @@ unsafe impl<'a, C: 'a + BlockContext> CoreOwnedArrayProvider for Edge<'a, C> { } } -unsafe impl<'a, C: 'a + BlockContext> CoreArrayWrapper<'a> for Edge<'a, C> { - type Wrapped = Edge<'a, C>; +unsafe impl<'a, C: BlockContext> CoreArrayWrapper for Edge<'a, C> { + type Wrapped<'b> = Edge<'b, C> where 'a: 'b; - unsafe fn wrap_raw(raw: &'a Self::Raw, context: &'a Self::Context) -> Edge<'a, C> { + unsafe fn wrap_raw<'b>(raw: &'b Self::Raw, context: &'b Self::Context) -> Self::Wrapped<'b> { let edge_target = Guard::new( BasicBlock::from_raw(raw.target, context.orig_block.context.clone()), raw, @@ -309,10 +309,10 @@ unsafe impl CoreOwnedArrayProvider for BasicBlock { } } -unsafe impl<'a, C: 'a + BlockContext> CoreArrayWrapper<'a> for BasicBlock { - type Wrapped = Guard<'a, BasicBlock>; +unsafe impl CoreArrayWrapper for BasicBlock { + type Wrapped<'a> = Guard<'a, BasicBlock> where C: 'a; - unsafe fn wrap_raw(raw: &'a Self::Raw, context: &'a Self::Context) -> Self::Wrapped { + unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, context: &'a Self::Context) -> Self::Wrapped<'a> { Guard::new(BasicBlock::from_raw(*raw, context.clone()), context) } } -- cgit v1.3.1