We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73236af commit be193a0Copy full SHA for be193a0
src/lib.rs
@@ -119,7 +119,7 @@ macro_rules! __lazy_static_internal {
119
impl $crate::__Deref for $N {
120
type Target = $T;
121
#[allow(unsafe_code)]
122
- fn deref<'a>(&'a self) -> &'a $T {
+ fn deref(&self) -> &$T {
123
unsafe {
124
#[inline(always)]
125
fn __static_ref_initialize() -> $T { $e }
tests/test.rs
@@ -147,3 +147,12 @@ fn pre_init() {
147
lazy_static::initialize(&PRE_INIT);
148
assert_eq!(PRE_INIT_FLAG.load(SeqCst), true);
149
}
150
+
151
+lazy_static! {
152
+ static ref LIFETIME_NAME: for<'a> fn(&'a u8) = { fn f(_: &u8) {} f };
153
+}
154
155
+#[test]
156
+fn lifetime_name() {
157
+ let _ = LIFETIME_NAME;
158
0 commit comments