Skip to content

Commit

Permalink
Add regression test for issue 167
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhenrymantilla committed Jun 2, 2023
1 parent 6a072b8 commit a48ae40
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/it.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,16 @@ mod unsync {
cell.set(&s).unwrap();
}
}

#[test]
fn assert_lazy_is_covariant_in_the_ctor() {
#[allow(dead_code)]
type AnyLazy<'f, T> = Lazy<T, Box<dyn 'f + FnOnce() -> T>>;

fn _for<'short, T>(it: *const (AnyLazy<'static, T>,)) -> *const (AnyLazy<'short, T>,) {
it
}
}
}

#[cfg(any(feature = "std", feature = "critical-section"))]
Expand Down

0 comments on commit a48ae40

Please sign in to comment.