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.
2 parents 7e071a9 + 5c258c4 commit 515e380Copy full SHA for 515e380
core/src/mem/mod.rs
@@ -151,9 +151,14 @@ pub const fn forget<T>(t: T) {
151
#[inline]
152
#[unstable(feature = "forget_unsized", issue = "none")]
153
pub fn forget_unsized<T: ?Sized>(t: T) {
154
+ #[cfg(bootstrap)]
155
// SAFETY: the forget intrinsic could be safe, but there's no point in making it safe since
156
// we'll be implementing this function soon via `ManuallyDrop`
- unsafe { intrinsics::forget(t) }
157
+ unsafe {
158
+ intrinsics::forget(t)
159
+ }
160
+ #[cfg(not(bootstrap))]
161
162
}
163
164
/// Returns the size of a type in bytes.
0 commit comments