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 div_euc -> div_euclid, and mod_euc -> rem_euclid #56936

Merged
merged 4 commits into from
Dec 23, 2018
Merged

rename div_euc -> div_euclid, and mod_euc -> rem_euclid #56936

merged 4 commits into from
Dec 23, 2018

Conversation

strega-nil
Copy link
Contributor

logic is written up in #49048

Also, update the documentation slightly.

cc @alexcrichton @clarcharr @varkor

logic is written up in #49048

Also, update the documentation slightly
@rust-highfive
Copy link
Collaborator

r? @dtolnay

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 18, 2018
@clarfonthey
Copy link
Contributor

Thank you for the PR!

@kennytm kennytm added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Dec 18, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:051638c8:start=1545094002714405624,finish=1545094059512726135,duration=56798320511
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/63/dc/c8bfd1bd77113c033161ce31730510d1c479cf9bcc8e99edf3c906f30cce/awscli-1.16.77-py2.py3-none-any.whl (1.4MB)
    0% |▎                               | 10kB 30.1MB/s eta 0:00:01
    1% |▌                               | 20kB 2.1MB/s eta 0:00:01
    2% |▊                               | 30kB 3.1MB/s eta 0:00:01
    2% |█                               | 40kB 2.0MB/s eta 0:00:01
---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-both (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:51:47] 
[00:51:47] running 119 tests
[00:52:09] .iiiii...i.....i..i...i..i.i..i.ii..i.....i..i....i..........iiii.........i.i...ii...i.......ii.i.i. 100/119
[00:52:13] i......iii.i.....ii
[00:52:13] 
[00:52:13]  finished in 26.291
[00:52:13] travis_fold:end:test_debuginfo

---
[01:02:21] travis_fold:start:test_stage1-core
travis_time:start:test_stage1-core
Testing core stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:02:21]    Compiling core v0.0.0 (/checkout/src/libcore)
[01:02:30] error[E0599]: no method named `mod_euclid` found for type `i8` in the current scope
[01:02:30]   --> src/libcore/../libcore/tests/num/int_macros.rs:35:28
[01:02:30]    |
[01:02:30] 35 |         assert!((-1 as $T).mod_euclid(MIN) == MAX);
[01:02:30]    | 
[01:02:30]    | 
[01:02:30]   ::: src/libcore/../libcore/tests/num/i8.rs:11:1
[01:02:30]    |
[01:02:30] 11 | int_module!(i8, i8);
[01:02:30]    | -------------------- in this macro invocation
[01:02:30]    |
[01:02:30]    = help: did you mean `div_euclid`?
[01:02:30] 
[01:02:30] error[E0599]: no method named `mod_euclid` found for type `i16` in the current scope
[01:02:30]   --> src/libcore/../libcore/tests/num/int_macros.rs:35:28
[01:02:30]    |
[01:02:30] 35 |         assert!((-1 as $T).mod_euclid(MIN) == MAX);
[01:02:30]    | 
[01:02:30]    | 
[01:02:30]   ::: src/libcore/../libcore/tests/num/i16.rs:11:1
[01:02:30]    |
[01:02:30] 11 | int_module!(i16, i16);
[01:02:30]    | ---------------------- in this macro invocation
[01:02:30]    |
[01:02:30]    = help: did you mean `div_euclid`?
[01:02:30] 
[01:02:30] error[E0599]: no method named `mod_euclid` found for type `i32` in the current scope
[01:02:30]   --> src/libcore/../libcore/tests/num/int_macros.rs:35:28
[01:02:30]    |
[01:02:30] 35 |         assert!((-1 as $T).mod_euclid(MIN) == MAX);
[01:02:30]    | 
[01:02:30]    | 
[01:02:30]   ::: src/libcore/../libcore/tests/num/i32.rs:11:1
[01:02:30]    |
[01:02:30] 11 | int_module!(i32, i32);
[01:02:30]    | ---------------------- in this macro invocation
[01:02:30]    |
[01:02:30]    = help: did you mean `div_euclid`?
[01:02:30] 
[01:02:30] error[E0599]: no method named `mod_euclid` found for type `i64` in the current scope
[01:02:30]   --> src/libcore/../libcore/tests/num/int_macros.rs:35:28
[01:02:30]    |
[01:02:30] 35 |         assert!((-1 as $T).mod_euclid(MIN) == MAX);
[01:02:30]    | 
[01:02:30]    | 
[01:02:30]   ::: src/libcore/../libcore/tests/num/i64.rs:11:1
[01:02:30]    |
[01:02:30] 11 | int_module!(i64, i64);
[01:02:30]    | ---------------------- in this macro invocation
[01:02:30]    |
[01:02:30]    = help: did you mean `div_euclid`?
---
travis_time:end:0c12f4e0:start=1545097825543383064,finish=1545097825627330932,duration=83947868
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:065937de
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:012b27b6
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

src/libcore/num/mod.rs Show resolved Hide resolved
src/libcore/num/mod.rs Outdated Show resolved Hide resolved
@dtolnay
Copy link
Member

dtolnay commented Dec 20, 2018

Implementation looks good to me. Let's run these names by @rust-lang/libs in case other people have opinions.

Notice there are two changes:

  • euc -> euclid
  • mod -> rem

@dtolnay
Copy link
Member

dtolnay commented Dec 21, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Dec 21, 2018

📌 Commit 455bc95 has been approved by dtolnay

@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 Dec 21, 2018
Centril added a commit to Centril/rust that referenced this pull request Dec 22, 2018
rename div_euc -> div_euclid, and mod_euc -> rem_euclid

logic is written up in rust-lang#49048

Also, update the documentation slightly.

cc @alexcrichton @clarcharr @varkor
kennytm added a commit to kennytm/rust that referenced this pull request Dec 22, 2018
rename div_euc -> div_euclid, and mod_euc -> rem_euclid

logic is written up in rust-lang#49048

Also, update the documentation slightly.

cc @alexcrichton @clarcharr @varkor
bors added a commit that referenced this pull request Dec 22, 2018
Rollup of 25 pull requests

Successful merges:

 - #56802 (Add DoubleEndedIterator::nth_back)
 - #56909 (static eval: Do not ICE on layout size overflow)
 - #56914 (Ignore ui/target-feature-gate on sparc, sparc64, powerpc, powerpc64 and powerpc64le)
 - #56919 (Remove a wrong multiplier on relocation offset computation)
 - #56933 (Add --progress to git submodule commands in x.py)
 - #56936 (rename div_euc -> div_euclid, and mod_euc -> rem_euclid)
 - #56941 (deny intra-doc link resolution failures in libstd)
 - #56945 (Fix rustdoc-js tests)
 - #56967 (Replace current crate's searchIndex when regenerating)
 - #56970 (Mem uninit doc ptr drop)
 - #56973 (make basic CTFE tracing available on release builds)
 - #56979 (Adding unwinding support for x86_64_fortanix_unknown_sgx target.)
 - #56981 (miri: allocation is infallible)
 - #56984 (A few tweaks to dropck_outlives)
 - #56989 (Fix compiletest `trim` deprecation warnings)
 - #56992 (suggest similar lint names for unknown lints)
 - #57002 (Stabilize Vec(Deque)::resize_with)
 - #57011 (rustdoc: add new CLI flag to load static files from a different location)
 - #57027 (Optimize away a move)
 - #57034 (Inline tweaks)
 - #57039 (Update migrate warning wording.)
 - #57040 (Fix feature gate to point to 1.32.0 for `path_from_str`)
 - #57049 (Stabilize #[repr(packed(N))])
 - #57050 (Fixed typo in HashMap documentation)
 - #57052 (Fix stabilization version numbers (exhaustive_integer_patterns + macro_literal_matcher))
@bors bors merged commit 455bc95 into rust-lang:master Dec 23, 2018
edarc added a commit to edarc/ssd1322 that referenced this pull request Jan 20, 2019
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. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants