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
That said, counterproposal: rather than a target feature, can we transition to cpuid being universally safe (using the mechanisms we normally use to move something from unsafe to safe without provoking widespread warnings about unused unsafe)?
cpuid currently triggers unused_unsafe (see rust-osdev/x86_64#575). Is this intentional?
Yes, that's useful. Though, it requires allowing the lint on crates that support older rust versions where unsafe is needed. For me it is fine either way. I just wanted to make sure this is not an oversight.
Activity
RalfJung commentedon Jan 7, 2026
Thanks for reporting this! This seems like an oversight indeed. Cc @sayantn
That said, I am honestly not entirely sure which mechanisms Josh is referring to here...
tgross35 commentedon Jan 7, 2026
I think the
unused_unsafeis actually useful here - isn't it useful to know that those functions can get rid of their onlyunsafeblock?mkroening commentedon Jan 8, 2026
Yes, that's useful. Though, it requires allowing the lint on crates that support older rust versions where
unsafeis needed. For me it is fine either way. I just wanted to make sure this is not an oversight.