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

Add clamp for ranges. Implements #44095 #58710

Merged
merged 2 commits into from
Mar 15, 2019
Merged

Add clamp for ranges. Implements #44095 #58710

merged 2 commits into from
Mar 15, 2019

Conversation

EdorianDark
Copy link
Contributor

@EdorianDark EdorianDark commented Feb 24, 2019

Ready for merge

@rust-highfive
Copy link
Collaborator

r? @sfackler

(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 Feb 24, 2019
@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:091a89c1:start=1551034961844413942,finish=1551034962869575687,duration=1025161745
$ 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
---

[00:04:08] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:08] tidy error: /checkout/src/libcore/cmp.rs:571: trailing whitespace
[00:04:08] tidy error: /checkout/src/libstd/f64.rs:908: trailing whitespace
[00:04:08] tidy error: /checkout/src/libstd/f64.rs:1532: trailing whitespace
[00:04:08] tidy error: /checkout/src/libstd/f32.rs:962: trailing whitespace
[00:04:10] some tidy checks failed
[00:04:10] 
[00:04:10] 
[00:04:10] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:10] 
[00:04:10] 
[00:04:10] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:10] Build completed unsuccessfully in 0:00:45
[00:04:10] Build completed unsuccessfully in 0:00:45
[00:04:10] Makefile:68: recipe for target 'tidy' failed
[00:04:10] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:03f185a3
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sun Feb 24 19:07:05 UTC 2019
---
travis_time:end:06ecc7d2:start=1551035225813028477,finish=1551035225817272259,duration=4243782
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0324f2f4
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:00b2fb60
travis_time:start:00b2fb60
$ 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:0019db74
$ 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/cmp.rs Outdated Show resolved Hide resolved
@sfackler
Copy link
Member

The impl you're using the type in is cfg'd, so the import is unused some of the time: https://github.com/rust-lang/rust/pull/58710/files#diff-2ae382eb5bbc830a6b884b8a6ba5d95fL27

@EdorianDark
Copy link
Contributor Author

This implements the original RFC.

@EdorianDark EdorianDark changed the title [wip] Add clamp for ranges. fixes #44095 Add clamp for ranges. fixes #44095 Mar 10, 2019
@sfackler
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Mar 10, 2019

📌 Commit 6041ec3 has been approved by sfackler

@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 Mar 10, 2019
@kennytm kennytm changed the title Add clamp for ranges. fixes #44095 Add clamp for ranges. Implements #44095 Mar 11, 2019
kennytm added a commit to kennytm/rust that referenced this pull request Mar 11, 2019
Add clamp for ranges. Implements rust-lang#44095

Does not build, but I can not figure out why.
Either I import ops and get the error:

``
error: unused import: `core::ops::RangeInclusive`
  --> src/libstd/f64.rs:16:5
   |
16 | use core::ops::RangeInclusive;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
``

or I do not import and get another error

``
error[E0412]: cannot find type `RangeInclusive` in this scope=======>  ] 35/36: std
   --> src/libstd/f64.rs:928:32
    |
928 |     pub fn clamp(self, range : RangeInclusive<Self>) -> Self
    |                                ^^^^^^^^^^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
12  | use core::ops::RangeInclusive;
    |
``

If it would build, could it get merged?
Can someone figure out, why it doesn't build?
@bors
Copy link
Contributor

bors commented Mar 12, 2019

⌛ Testing commit 6041ec3 with merge 64507dd2a15b43fee6a4e567162e3f52b04c5f8a...

@bors
Copy link
Contributor

bors commented Mar 12, 2019

💔 Test failed - checks-travis

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu 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.

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)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 12, 2019
@kennytm
Copy link
Member

kennytm commented Mar 13, 2019

@bors retry

3 hour timeout

@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 Mar 13, 2019
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Mar 14, 2019
Add clamp for ranges. Implements rust-lang#44095

Ready for merge
@bors
Copy link
Contributor

bors commented Mar 14, 2019

⌛ Testing commit 6041ec3 with merge 7ae1b4e...

bors added a commit that referenced this pull request Mar 14, 2019
Add clamp for ranges. Implements #44095

Ready for merge
@bors
Copy link
Contributor

bors commented Mar 15, 2019

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 15, 2019
@kennytm
Copy link
Member

kennytm commented Mar 15, 2019

@bors retry

@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 Mar 15, 2019
@bors
Copy link
Contributor

bors commented Mar 15, 2019

⌛ Testing commit 6041ec3 with merge 70d1150...

bors added a commit that referenced this pull request Mar 15, 2019
Add clamp for ranges. Implements #44095

Ready for merge
@bors bors mentioned this pull request Mar 15, 2019
@bors
Copy link
Contributor

bors commented Mar 15, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: sfackler
Pushing 70d1150 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 15, 2019
@bors bors merged commit 6041ec3 into rust-lang:master Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

6 participants