diff options
| author | Rubens Brandao <git@rubens.io> | 2024-04-10 17:58:05 -0300 |
|---|---|---|
| committer | Rubens Brandao <git@rubens.io> | 2024-04-10 18:02:09 -0300 |
| commit | 37b51462dcf26dc40ac5d7e82acdfd4cbe754157 (patch) | |
| tree | 6a6bb04329059518761f6b5be5506d32a6b6c47c /rust/src/basicblock.rs | |
| parent | 16fc31044f3b202200a6f03a538cda5f985bbecb (diff) | |
fix the array implementation using GAT
Diffstat (limited to 'rust/src/basicblock.rs')
| -rw-r--r-- | rust/src/basicblock.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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<C: BlockContext> CoreOwnedArrayProvider for BasicBlock<C> { } } -unsafe impl<'a, C: 'a + BlockContext> CoreArrayWrapper<'a> for BasicBlock<C> { - type Wrapped = Guard<'a, BasicBlock<C>>; +unsafe impl<C: BlockContext> CoreArrayWrapper for BasicBlock<C> { + type Wrapped<'a> = Guard<'a, BasicBlock<C>> 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) } } |
