Skip to content

Commit a77b308

Browse files
committed
Implement changes from T-Libs-API review
And start tracking based on the tracking issue.
1 parent e2aae53 commit a77b308

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

library/core/src/mem/drop_guard.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ use crate::ops::{Deref, DerefMut};
2727
/// // "Chashu likes tuna!!!"
2828
/// }
2929
/// ```
30-
#[unstable(feature = "drop_guard", issue = "none")]
30+
#[unstable(feature = "drop_guard", issue = "144426")]
3131
#[doc(alias = "ScopeGuard")]
3232
#[doc(alias = "defer")]
33-
pub struct DropGuard<T, F = fn(T)>
33+
pub struct DropGuard<T, F>
3434
where
3535
F: FnOnce(T),
3636
{
@@ -55,7 +55,7 @@ where
5555
/// let value = String::from("Chashu likes tuna");
5656
/// let guard = DropGuard::new(value, |s| println!("{s}"));
5757
/// ```
58-
#[unstable(feature = "drop_guard", issue = "none")]
58+
#[unstable(feature = "drop_guard", issue = "144426")]
5959
#[must_use]
6060
pub const fn new(inner: T, f: F) -> Self {
6161
Self { inner: ManuallyDrop::new(inner), f: ManuallyDrop::new(f) }
@@ -83,7 +83,7 @@ where
8383
/// let guard = DropGuard::new(value, |s| println!("{s}"));
8484
/// assert_eq!(DropGuard::into_inner(guard), "Nori likes chicken");
8585
/// ```
86-
#[unstable(feature = "drop_guard", issue = "none")]
86+
#[unstable(feature = "drop_guard", issue = "144426")]
8787
#[inline]
8888
pub fn into_inner(guard: Self) -> T {
8989
// First we ensure that dropping the guard will not trigger
@@ -105,7 +105,7 @@ where
105105
}
106106
}
107107

108-
#[unstable(feature = "drop_guard", issue = "none")]
108+
#[unstable(feature = "drop_guard", issue = "144426")]
109109
impl<T, F> Deref for DropGuard<T, F>
110110
where
111111
F: FnOnce(T),
@@ -117,7 +117,7 @@ where
117117
}
118118
}
119119

120-
#[unstable(feature = "drop_guard", issue = "none")]
120+
#[unstable(feature = "drop_guard", issue = "144426")]
121121
impl<T, F> DerefMut for DropGuard<T, F>
122122
where
123123
F: FnOnce(T),
@@ -127,7 +127,7 @@ where
127127
}
128128
}
129129

130-
#[unstable(feature = "drop_guard", issue = "none")]
130+
#[unstable(feature = "drop_guard", issue = "144426")]
131131
impl<T, F> Drop for DropGuard<T, F>
132132
where
133133
F: FnOnce(T),
@@ -143,7 +143,7 @@ where
143143
}
144144
}
145145

146-
#[unstable(feature = "drop_guard", issue = "none")]
146+
#[unstable(feature = "drop_guard", issue = "144426")]
147147
impl<T, F> Debug for DropGuard<T, F>
148148
where
149149
T: Debug,

0 commit comments

Comments
 (0)