-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rename overflowing_{add,sub,mul} intrinsics to wrapping_{add,sub,mul}. #63642
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,7 @@ pub fn intrisic_operation_unsafety(intrinsic: &str) -> hir::Unsafety { | |
match intrinsic { | ||
"size_of" | "min_align_of" | "needs_drop" | | ||
"add_with_overflow" | "sub_with_overflow" | "mul_with_overflow" | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should these be changed to match the others, or is their different signature sufficient to motivate a different naming convention? (this naming convention is not reflected in the std names) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These match the LLVM intrinsics. We could rename them later but they're not outright wrong like |
||
"overflowing_add" | "overflowing_sub" | "overflowing_mul" | | ||
"wrapping_add" | "wrapping_sub" | "wrapping_mul" | | ||
"saturating_add" | "saturating_sub" | | ||
"rotate_left" | "rotate_right" | | ||
"ctpop" | "ctlz" | "cttz" | "bswap" | "bitreverse" | | ||
|
@@ -314,7 +314,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem) { | |
(1, vec![param(0), param(0)], param(0)), | ||
"unchecked_add" | "unchecked_sub" | "unchecked_mul" => | ||
(1, vec![param(0), param(0)], param(0)), | ||
"overflowing_add" | "overflowing_sub" | "overflowing_mul" => | ||
"wrapping_add" | "wrapping_sub" | "wrapping_mul" => | ||
(1, vec![param(0), param(0)], param(0)), | ||
"saturating_add" | "saturating_sub" => | ||
(1, vec![param(0), param(0)], param(0)), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boo strap? 👻