You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trixie released with rustc 1.85, so I expect a lot of crates will be increasing their MSRV in the next few weeks. I'd like to upgrade only as needed, rough list of what might be nice to have:
Baseline: 1.63
1.64: core::ffi::c_* (definitely need this)
1.64: workspace-level lints (meh)
1.65: cast_mut (this would be nice)
Baseline: 1.65
1.67: varargs for non-C extern ABIs (no known applications)
1.69: derive on packed structs that don't implement Copy (not overly useful for us, everything is copy)
1.75: byte_add (this would be nice)
1.75: const_maybe_uninit_zeroed (this would be nice)
1.77: offset_of (just lets us remove a polyfill)
1.77: C string literals (nothing we can't work around, not sure we even use this now)
Per POSIX: "The symbolic constant PTHREAD_CANCELED expands to a constant expression of type ( void *) whose value matches no pointer to an object in memory nor the value NULL."
So ptr::dangling_mut appears to be correct in theory, and in practice it does in fact produce the value 1.
POSIX loosely defines the requirements but we care about the platform here. It's checking for == PTHREAD_CANCELED, not checking whether values it gets match anything in memory. And dangling_mut makes no guarantees about how it is implemented, we can't rely on it being 1.
Regardless, what's currently there is working code that is easily understood. Obfuscating it just to suppress a lint that applies poorly doesn't make any sense...
Activity
matze commentedon Oct 12, 2025
AsRawFdthat could be implemented onpollfdto simplify interaction with tokio via AsyncFdtgross35 commentedon Oct 15, 2025
That kind of trait implementation would be better suited for a wrapper crate the level above libc. E.g.
nix::poll::PollFd, which implementsAsFd.gibbz00 commentedon Jan 3, 2026
.cast_mut()(overas _).byte_add()(over(ptr as *const u8).add(n) as *const Txtqqczze commentedon Jan 26, 2026
Increase the MSRV from 1.63 to 1.65
tgross35 commentedon Feb 13, 2026
Bump to 1.65 in #4972
Increase the MSRV from 1.63 to 1.65
Increase the MSRV from 1.63 to 1.65
Increase the MSRV from 1.63 to 1.65
Increase the MSRV from 1.63 to 1.65
xtqqczze commentedon Apr 26, 2026
xtqqczze commentedon Aug 16, 2026
is_some_andptr::danglingtgross35 commentedon Aug 17, 2026
Where would we make use of those?
xtqqczze commentedon Aug 17, 2026
tgross35 commentedon Aug 17, 2026
The first warning wouldn't actually be correct - we need the value 1, not what
dangling_mut.xtqqczze commentedon Aug 17, 2026
Per POSIX: "The symbolic constant PTHREAD_CANCELED expands to a constant expression of type ( void *) whose value matches no pointer to an object in memory nor the value NULL."
So
ptr::dangling_mutappears to be correct in theory, and in practice it does in fact produce the value 1.tgross35 commentedon Aug 17, 2026
POSIX loosely defines the requirements but we care about the platform here. It's checking for
== PTHREAD_CANCELED, not checking whether values it gets match anything in memory. Anddangling_mutmakes no guarantees about how it is implemented, we can't rely on it being 1.Regardless, what's currently there is working code that is easily understood. Obfuscating it just to suppress a lint that applies poorly doesn't make any sense...
Skgland commentedon Aug 18, 2026
Maybe
std::ptr::without_provenancecould be used once msrv reaches 1.84.0xtqqczze commentedon Nov 25, 2026
@tgross35 I'm assuming the MSRV for
libcv1.0 will be at least 1.85?tgross35 commentedon Nov 25, 2026
Hm, where does the assumption come from? I don't see anything user-facing on that list.