Skip to content

Commit 98a4881

Browse files
committed
chore: apply new pattern since MSVR is now >= 1.59.0
1 parent 875348d commit 98a4881

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

bindgen/codegen/mod.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -2747,14 +2747,11 @@ impl CodeGenerator for CompInfo {
27472747
{
27482748
None
27492749
} else {
2750-
// FIXME: When MSRV >= 1.59.0, we can use
2751-
// > const PTR: *const #canonical_ident = ::#prefix::mem::MaybeUninit::uninit().as_ptr();
27522750
Some(quote! {
27532751
// Use a shared MaybeUninit so that rustc with
27542752
// opt-level=0 doesn't take too much stack space,
27552753
// see #2218.
2756-
const UNINIT: ::#prefix::mem::MaybeUninit<#canonical_ident> = ::#prefix::mem::MaybeUninit::uninit();
2757-
let ptr = UNINIT.as_ptr();
2754+
const PTR: *const #canonical_ident = ::#prefix::mem::MaybeUninit::uninit().as_ptr();
27582755
})
27592756
};
27602757

0 commit comments

Comments
 (0)