Skip to content

examples/perf: Add an arch flag to run only on x86_64 #428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Sylfrena
Copy link

@Sylfrena Sylfrena commented Jul 3, 2025

Allow lints for "unnecessary transmutes" for now.

Sylfrena added 2 commits July 3, 2025 19:48
Allow lints for "unnecessary transmutes" for now.
Resoolve lints for "unnecessary transmutes" for now.
@@ -1223,7 +1223,7 @@ pub(crate) use unlikely;
#[allow(unused_macros)]
macro_rules! static_cast_i32 {
($v:expr_2021) => {
::std::mem::transmute::<u32, i32>($v)
u32::cast_signed($v.wrapping_neg())
Copy link
Member

Choose a reason for hiding this comment

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

The wrapping_neg should definitely not be here. The macro name gives no indication that it also negates the number. This would be highly misleading and potentially lead to bugs down the road.

Also cast_signed requires a newer rust version which might be OK but needs careful consideration as it is a backwards compatibility breaking change.

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.

2 participants