Skip to content

cpuid: allow unused unsafes#585

Merged
jakecorrenti merged 2 commits intocontainers:mainfrom
slp:allow-unused-unsafe
Mar 13, 2026
Merged

cpuid: allow unused unsafes#585
jakecorrenti merged 2 commits intocontainers:mainfrom
slp:allow-unused-unsafe

Conversation

@slp
Copy link
Collaborator

@slp slp commented Mar 13, 2026

Rust 1.94 has switched a number of cpuid-related methods from
unsafe to safe. We initially removed the "unsafe" block to make
clippy happy, but this would make libkrun harder to package on
distros that are a bit conservative with their Rust versions.

Since there isn't any real impact, let's temporarily allow unused
unsafes on the affected methods instead.

@slp
Copy link
Collaborator Author

slp commented Mar 13, 2026

cc/ @d-e-s-o

slp added 2 commits March 13, 2026 12:13
This reverts commit fb42ebf.

Signed-off-by: Sergio Lopez <slp@redhat.com>
Rust 1.94 has switched a number of cpuid-related methods from
unsafe to safe. We initially removed the "unsafe" block to make
clippy happy, but this would make libkrun harder to package on
distros that are a bit conservative with their Rust versions.

Since there isn't any real impact, let's temporarily allow unused
unsafes on the affected methods instead.

Suggested-by: Daniel Müller <deso@posteo.net>
Signed-off-by: Sergio Lopez <slp@redhat.com>
@slp slp force-pushed the allow-unused-unsafe branch from 61d7883 to 9bffe3c Compare March 13, 2026 11:13
Copy link
Contributor

@d-e-s-o d-e-s-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

Copy link
Member

@jakecorrenti jakecorrenti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jakecorrenti jakecorrenti merged commit 8a7fc37 into containers:main Mar 13, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants