Open n1000 opened 8 months ago
Yeah, it's WIP. I'd like to enable it unconditionally but ctest2 emits an error which is used by libc-test. That's because it uses an ancient rustc parser and we have to make it update (and enable the const fn feature) before releasing libc v0.3. See https://github.com/rust-lang/libc/issues/3248 for what is needed to release.
Looks like there is both feature = "const-extern-fn"
which the user can enable and cfg(libc_const_extern_fn)
which the build script automatically enables. The latter is entirely unused in the source code.
Rust / System details:
libc version: main branch at commit e2e6fd69f49925f95fd6b493217a7e44ef7564cd or later.
Minimal test code:
Build output:
I wasn't sure if this was intended behavior or not (this error first showed up after commit e2e6fd69f49925f95fd6b493217a7e44ef7564cd). If it is intended, then I guess it is just the README.md that may need to be updated to remove this text from the Features description:
If it is unintended, then should the
const-extern-fn
feature be enabled by default now that the MSRV of libc is 1.71?In commit e2e6fd69f49925f95fd6b493217a7e44ef7564cd the definition of
safe_f!
insrc/macros.rs
was updated to be conditional onconst-extern-fn
directly. Previously it was conditionally defined based onlibc_const_extern_fn
which is automatically turned on bybuild.rs
based on the rustc version.Apologies in advance if this is a known breakage / work in progress on
main
.