Skip to content

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Diggsey committed Aug 13, 2023
1 parent 150f0dd commit 67a7f60
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 @@ -317,9 +317,9 @@ macro_rules! scoped_thread_local {

// This wrapper helps to ensure that the 'static lifetime is not visible
// to the safe code.
fn cast_from_static<'a, 'b>(x: &'a mut Hkt<'_>) -> Hkt<'b> where 'a: 'b {
fn cast_from_static<'is_reborrow_mut_general_enough, 'a, 'b>(x: &'a mut Hkt<'is_reborrow_mut_general_enough>) -> Hkt<'b> where 'a: 'b {
//let y: &'b mut Hkt<'_> = unsafe { std::mem::transmute(x) };
ReborrowMut::reborrow_mut(x)
<Hkt<'is_reborrow_mut_general_enough> as ReborrowMut<'_>>::reborrow_mut(x)
}

impl $name<'static> {
Expand Down

0 comments on commit 67a7f60

Please sign in to comment.