Skip to content
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

Merged
merged 2 commits into from
Aug 17, 2019

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Aug 16, 2019

These confused @Gankra, and then, also me, especially since overflowing_* methods also exist, but they map to *_with_overflow intrinsics!

r? @oli-obk / @nikomatsakis cc @Mark-Simulacrum (on the rustbuild workaround)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 16, 2019
@Mark-Simulacrum
Copy link
Member

Bootstrap changes look fine.

@@ -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" |
Copy link
Contributor

Choose a reason for hiding this comment

The 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)

Copy link
Member Author

Choose a reason for hiding this comment

The 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_* intrinsics were.

@hanna-kruppe
Copy link
Contributor

r=me on the code changes, don't have an opinion on the rustbuild stuff though.

@eddyb
Copy link
Member Author

eddyb commented Aug 16, 2019

@bors r=rkruppe,Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Aug 16, 2019

📌 Commit 892ef6f has been approved by rkruppe,Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 16, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 16, 2019
…mulacrum

Rename overflowing_{add,sub,mul} intrinsics to wrapping_{add,sub,mul}.

These confused @Gankra, and then, also me, especially since `overflowing_*` *methods* also exist, but they map to `*_with_overflow` intrinsics!

r? @oli-obk / @nikomatsakis cc @Mark-Simulacrum (on the rustbuild workaround)
Centril added a commit to Centril/rust that referenced this pull request Aug 17, 2019
…mulacrum

Rename overflowing_{add,sub,mul} intrinsics to wrapping_{add,sub,mul}.

These confused @Gankra, and then, also me, especially since `overflowing_*` *methods* also exist, but they map to `*_with_overflow` intrinsics!

r? @oli-obk / @nikomatsakis cc @Mark-Simulacrum (on the rustbuild workaround)
bors added a commit that referenced this pull request Aug 17, 2019
Rollup of 6 pull requests

Successful merges:

 - #63149 (resolve: Populate external modules in more automatic and lazy way)
 - #63545 (Feature gate 'yield $expr?' pre-expansion)
 - #63548 (Update rustc-demangle to 0.1.16.)
 - #63558 (Remap paths for proc-macro crates.)
 - #63641 (add git keyword to submodule comments in config.example.toml)
 - #63642 (Rename overflowing_{add,sub,mul} intrinsics to wrapping_{add,sub,mul}.)

Failed merges:

r? @ghost
@bors bors merged commit 892ef6f into rust-lang:master Aug 17, 2019
@eddyb eddyb deleted the wrap-it-up branch August 18, 2019 08:31
cmd.arg("--cfg").arg("bootstrap");
} else {
// NOTE(eddyb) see FIXME above, except now we need annotations again in core.
cmd.arg("--cfg").arg("boostrap_stdarch_ignore_this");
Copy link
Member

Choose a reason for hiding this comment

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

boo strap? 👻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants