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

Conversation

Projects
None yet
6 participants
@EdorianDark
Copy link
Contributor

EdorianDark commented Feb 24, 2019

Ready for merge

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 24, 2019

r? @sfackler

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

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 24, 2019

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)

Show resolved Hide resolved src/libcore/cmp.rs Outdated
@sfackler

This comment has been minimized.

Copy link
Member

sfackler commented Feb 25, 2019

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 EdorianDark force-pushed the EdorianDark:master branch from 881eb40 to bd2e126 Mar 9, 2019

@EdorianDark

This comment has been minimized.

Copy link
Contributor Author

EdorianDark commented Mar 10, 2019

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

This comment has been minimized.

Copy link
Member

sfackler commented Mar 10, 2019

@bors r+

Thanks!

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 10, 2019

📌 Commit 6041ec3 has been approved by sfackler

@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

Rollup merge of rust-lang#58710 - EdorianDark:master, r=sfackler
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

This comment has been minimized.

Copy link
Contributor

bors commented Mar 12, 2019

⌛️ Testing commit 6041ec3 with merge 64507dd...

bors added a commit that referenced this pull request Mar 12, 2019

Auto merge of #58710 - EdorianDark:master, r=sfackler
Add clamp for ranges. Implements #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

This comment has been minimized.

Copy link
Contributor

bors commented Mar 12, 2019

💔 Test failed - checks-travis

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Mar 12, 2019

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)

@kennytm

This comment has been minimized.

Copy link
Member

kennytm commented Mar 13, 2019

@bors retry

3 hour timeout

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Mar 14, 2019

Rollup merge of rust-lang#58710 - EdorianDark:master, r=sfackler
Add clamp for ranges. Implements rust-lang#44095

Ready for merge
@bors

This comment has been minimized.

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

Auto merge of #58710 - EdorianDark:master, r=sfackler
Add clamp for ranges. Implements #44095

Ready for merge
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 15, 2019

💥 Test timed out

@kennytm

This comment has been minimized.

Copy link
Member

kennytm commented Mar 15, 2019

@bors retry

@bors

This comment has been minimized.

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

Auto merge of #58710 - EdorianDark:master, r=sfackler
Add clamp for ranges. Implements #44095

Ready for merge

@bors bors referenced this pull request Mar 15, 2019

Merged

Musl host toolchain #58575

@bors

This comment has been minimized.

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 label Mar 15, 2019

@bors bors merged commit 6041ec3 into rust-lang:master Mar 15, 2019

1 check passed

homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.