Skip to content

Commit 80d3a0e

Browse files
authored
fix expand & expand_mut in nightly (#42)
`cve-rs` does not compile in nightly due to rust-lang/rust#129021 and this change will be landed in Rust 1.83. This PR fixes it.
2 parents a4d3538 + e0a25af commit 80d3a0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lifetime_expansion.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn lifetime_translator_mut<'a, 'b, T: ?Sized>(
4444
///
4545
/// Safety? What's that?
4646
pub fn expand<'a, 'b, T: ?Sized>(x: &'a T) -> &'b T {
47-
let f: fn(_, &'a T) -> &'b T = lifetime_translator;
47+
let f: for<'x> fn(_, &'x T) -> &'b T = lifetime_translator;
4848
f(STATIC_UNIT, x)
4949
}
5050

@@ -54,7 +54,7 @@ pub fn expand<'a, 'b, T: ?Sized>(x: &'a T) -> &'b T {
5454
///
5555
/// Safety? What's that?
5656
pub fn expand_mut<'a, 'b, T: ?Sized>(x: &'a mut T) -> &'b mut T {
57-
let f: fn(_, &'a mut T) -> &'b mut T = lifetime_translator_mut;
57+
let f: for<'x> fn(_, &'x mut T) -> &'b mut T = lifetime_translator_mut;
5858
f(STATIC_UNIT, x)
5959
}
6060

0 commit comments

Comments
 (0)