Skip to content

Commit 4e027b2

Browse files
committed
Soundness fix (for auto traits): use 'lower_bound internally instead of 'static
1 parent 24e93a8 commit 4e027b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ where
117117
C: TyCon,
118118
{
119119
marker: PhantomData<&'lower_bound ()>,
120-
inner: Apply<'static, C>,
120+
inner: Apply<'lower_bound, C>,
121121
}
122122

123123
impl<'lower_bound, C> Existential<'lower_bound, C>
@@ -129,7 +129,7 @@ where
129129
unsafe {
130130
Self {
131131
marker: PhantomData,
132-
inner: mem::transmute_copy::<Apply<'a, C>, Apply<'static, C>>(&inner),
132+
inner: mem::transmute_copy::<Apply<'a, C>, Apply<'lower_bound, C>>(&inner),
133133
}
134134
}
135135
}

0 commit comments

Comments
 (0)