Skip to content

Commit

Permalink
Soundness fix (for auto traits): use 'lower_bound internally instead …
Browse files Browse the repository at this point in the history
…of 'static
  • Loading branch information
steffahn committed Sep 12, 2021
1 parent 24e93a8 commit 4e027b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ where
C: TyCon,
{
marker: PhantomData<&'lower_bound ()>,
inner: Apply<'static, C>,
inner: Apply<'lower_bound, C>,
}

impl<'lower_bound, C> Existential<'lower_bound, C>
Expand All @@ -129,7 +129,7 @@ where
unsafe {
Self {
marker: PhantomData,
inner: mem::transmute_copy::<Apply<'a, C>, Apply<'static, C>>(&inner),
inner: mem::transmute_copy::<Apply<'a, C>, Apply<'lower_bound, C>>(&inner),
}
}
}
Expand Down

0 comments on commit 4e027b2

Please sign in to comment.