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

Stabilize reverse_bits feature #61364

Merged
merged 1 commit into from Jun 1, 2019

Conversation

Projects
None yet
6 participants
@lzutao
Copy link
Contributor

commented May 30, 2019

FCP done in #48763 (comment)

Closes #48763

r? @Centril

@lzutao

This comment was marked as resolved.

Copy link
Contributor Author

commented May 30, 2019

@rustbot modify labels: T-libs

@rustbot rustbot added the T-libs label May 30, 2019

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

commented May 30, 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:018a6d90:start=1559240831287361816,finish=1559240832562018655,duration=1274656839
$ 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
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
travis_time:start:tidy
tidy check
[00:12:28] * 574 error codes
[00:12:28] * highest error code: E0729
[00:12:28] tidy error: /checkout/src/libcore/num/mod.rs:471: malformed stability attribute: missing the `since` key
[00:12:29] tidy error: /checkout/src/libcore/num/mod.rs:2520: malformed stability attribute: missing the `since` key
[00:12:33] some tidy checks failed
[00:12:33] 
[00:12:33] 
[00:12:33] 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:12:33] 
[00:12:33] 
[00:12:33] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:12:33] Build completed unsuccessfully in 0:01:11
[00:12:33] Build completed unsuccessfully in 0:01:11
[00:12:33] Makefile:67: recipe for target 'tidy' failed
[00:12:33] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:17935ef8
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Thu May 30 18:39:56 UTC 2019

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)

@lzutao lzutao force-pushed the lzutao:stabilize-reverse_bits branch from 3618f88 to 1e2185a May 30, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented May 30, 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:0e1597bd:start=1559242420714441063,finish=1559242421961996546,duration=1247555483
$ 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
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:10:16]    Compiling rustc_tsan v0.0.0 (/checkout/src/librustc_tsan)
[00:10:16]    Compiling rustc_lsan v0.0.0 (/checkout/src/librustc_lsan)
[00:10:17]    Compiling rustc_asan v0.0.0 (/checkout/src/librustc_asan)
[00:10:17]    Compiling rustc_msan v0.0.0 (/checkout/src/librustc_msan)
[00:10:25] error[E0723]: can only call other `const fn` within a `const fn`, but `const num::<impl isize>::reverse_bits` is not stable as `const fn`
[00:10:25]     |
[00:10:25] 318 | / macro_rules! wrapping_int_impl {
[00:10:25] 318 | / macro_rules! wrapping_int_impl {
[00:10:25] 319 | |     ($($t:ty)*) => ($(
[00:10:25] 320 | |         impl Wrapping<$t> {
[00:10:25] 321 | |             doc_comment! {
[00:10:25] ...   |
[00:10:25] 528 | |                 Wrapping(self.0.reverse_bits())
[00:10:25] ...   |
[00:10:25] 677 | |     )*)
[00:10:25] 678 | | }
[00:10:25]     | |_- in this expansion of `wrapping_int_impl!`
[00:10:25]     | |_- in this expansion of `wrapping_int_impl!`
[00:10:25] 679 | 
[00:10:25] 680 |   wrapping_int_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
[00:10:25]     |
[00:10:25]     = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
[00:10:25]     = help: add #![feature(const_fn)] to the crate attributes to enable
[00:10:25] 
[00:10:25] 
[00:10:25] error[E0723]: can only call other `const fn` within a `const fn`, but `const num::<impl i8>::reverse_bits` is not stable as `const fn`
[00:10:25]     |
[00:10:25] 318 | / macro_rules! wrapping_int_impl {
[00:10:25] 318 | / macro_rules! wrapping_int_impl {
[00:10:25] 319 | |     ($($t:ty)*) => ($(
[00:10:25] 320 | |         impl Wrapping<$t> {
[00:10:25] 321 | |             doc_comment! {
[00:10:25] ...   |
[00:10:25] 528 | |                 Wrapping(self.0.reverse_bits())
[00:10:25] ...   |
[00:10:25] 677 | |     )*)
[00:10:25] 678 | | }
[00:10:25]     | |_- in this expansion of `wrapping_int_impl!`
[00:10:25]     | |_- in this expansion of `wrapping_int_impl!`
[00:10:25] 679 | 
[00:10:25] 680 |   wrapping_int_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
[00:10:25]     |
[00:10:25]     = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
[00:10:25]     = help: add #![feature(const_fn)] to the crate attributes to enable
[00:10:25] 
[00:10:25] 
[00:10:25] error[E0723]: can only call other `const fn` within a `const fn`, but `const num::<impl i16>::reverse_bits` is not stable as `const fn`
[00:10:25]     |
[00:10:25] 318 | / macro_rules! wrapping_int_impl {
[00:10:25] 318 | / macro_rules! wrapping_int_impl {
[00:10:25] 319 | |     ($($t:ty)*) => ($(
[00:10:25] 320 | |         impl Wrapping<$t> {
[00:10:25] 321 | |             doc_comment! {
[00:10:25] ...   |
[00:10:25] 528 | |                 Wrapping(self.0.reverse_bits())
[00:10:25] ...   |
[00:10:25] 677 | |     )*)
[00:10:25] 678 | | }
[00:10:25]     | |_- in this expansion of `wrapping_int_impl!`
[00:10:25]     | |_- in this expansion of `wrapping_int_impl!`
[00:10:25] 679 | 
[00:10:25] 680 |   wrapping_int_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
[00:10:25]     |
[00:10:25]     = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
[00:10:25]     = help: add #![feature(const_fn)] to the crate attributes to enable
[00:10:25] 
[00:10:25] 
[00:10:25] error[E0723]: can only call other `const fn` within a `const fn`, but `const num::<impl i32>::reverse_bits` is not stable as `const fn`
[00:10:25]     |
[00:10:25] 318 | / macro_rules! wrapping_int_impl {
[00:10:25] 318 | / macro_rules! wrapping_int_impl {
[00:10:25] 319 | |     ($($t:ty)*) => ($(
[00:10:25] 320 | |         impl Wrapping<$t> {
[00:10:25] 321 | |             doc_comment! {
[00:10:25] ...   |
[00:10:25] 528 | |                 Wrapping(self.0.reverse_bits())
[00:10:25] ...   |
[00:10:25] 677 | |     )*)
[00:10:25] 678 | | }
[00:10:25]     | |_- in this expansion of `wrapping_int_impl!`
[00:10:25]     | |_- in this expansion of `wrapping_int_impl!`
[00:10:25] 679 | 
[00:10:25] 680 |   wrapping_int_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
[00:10:25]     |
[00:10:25]     = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
[00:10:25]     = help: add #![feature(const_fn)] to the crate attributes to enable
[00:10:25] 
[00:10:25] 
[00:10:25] error[E0723]: can only call other `const fn` within a `const fn`, but `const num::<impl i64>::reverse_bits` is not stable as `const fn`
[00:10:25]     |
[00:10:25] 318 | / macro_rules! wrapping_int_impl {
[00:10:25] 318 | / macro_rules! wrapping_int_impl {
[00:10:25] 319 | |     ($($t:ty)*) => ($(
[00:10:25] 320 | |         impl Wrapping<$t> {
[00:10:25] 321 | |             doc_comment! {
[00:10:25] ...   |
[00:10:25] 528 | |                 Wrapping(self.0.reverse_bits())
[00:10:25] ...   |
[00:10:25] 677 | |     )*)
[00:10:25] 678 | | }
[00:10:25]     | |_- in this expansion of `wrapping_int_impl!`
[00:10:25]     | |_- in this expansion of `wrapping_int_impl!`
[00:10:25] 679 | 
[00:10:25] 680 |   wrapping_int_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
[00:10:25]     |
[00:10:25]     = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
[00:10:25]     = help: add #![feature(const_fn)] to the crate attributes to enable
[00:10:25] 
[00:10:25] 
[00:10:25] error[E0723]: can only call other `const fn` within a `const fn`, but `const num::<impl i128>::reverse_bits` is not stable as `const fn`
[00:10:25]     |
[00:10:25] 318 | / macro_rules! wrapping_int_impl {
[00:10:25] 318 | / macro_rules! wrapping_int_impl {
[00:10:25] 319 | |     ($($t:ty)*) => ($(
[00:10:25] 320 | |         impl Wrapping<$t> {
[00:10:25] 321 | |             doc_comment! {
[00:10:25] ...   |
[00:10:25] 528 | |                 Wrapping(self.0.reverse_bits())
[00:10:25] ...   |
[00:10:25] 677 | |     )*)
[00:10:25] 678 | | }
[00:10:25]     | |_- in this expansion of `wrapping_int_impl!`
[00:10:25]     | |_- in this expansion of `wrapping_int_impl!`
[00:10:25] 679 | 
[00:10:25] 680 |   wrapping_int_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
[00:10:25]     |
[00:10:25]     = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
[00:10:25]     = help: add #![feature(const_fn)] to the crate attributes to enable
[00:10:25] 

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)

@jonas-schievink jonas-schievink added this to the 1.37 milestone May 30, 2019

@lzutao

This comment has been minimized.

Copy link
Contributor Author

commented May 31, 2019

@Centril Do we want to stabilize const fn for {integer}::reverse_bits ?

@lzutao lzutao force-pushed the lzutao:stabilize-reverse_bits branch from 5823a14 to 1c26bbf May 31, 2019

@lzutao

This comment has been minimized.

Copy link
Contributor Author

commented May 31, 2019

Okay, I const-stabilized the <{signed-integer}>::reverse_bits.

@Centril

This comment has been minimized.

Copy link
Member

commented May 31, 2019

@bors r+ rollup

@bors

This comment has been minimized.

Copy link
Contributor

commented May 31, 2019

📌 Commit 1c26bbf has been approved by Centril

@lzutao

This comment was marked as resolved.

Copy link
Contributor Author

commented May 31, 2019

@Centril Should I add #[must_use] lint to those methods as Simon said #48763 (comment)

Looks like this is done in #61134

Centril added a commit to Centril/rust that referenced this pull request Jun 1, 2019

@Centril Centril referenced this pull request Jun 1, 2019

Merged

Rollup of 8 pull requests #61418

bors added a commit that referenced this pull request Jun 1, 2019

Auto merge of #61418 - Centril:rollup-yvj33a1, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #60729 (Expand dynamic drop tests for cases in #47949)
 - #61263 (Don't generate div inside header (h4/h3/h...) elements)
 - #61364 (Stabilize reverse_bits feature)
 - #61375 (Make "panic did not include expected string" message consistent)
 - #61387 (Remove ty::BrFresh and RegionConstraintCollector::new_bound)
 - #61389 (Remove GlobalArenas and use Arena instead)
 - #61391 (Doc comment fixes for `rustc::mir::interpret::InterpretCx`)
 - #61403 (Remove unnecessary `-Z continue-parse-after-error` from tests)

Failed merges:

r? @ghost

@bors bors merged commit 1c26bbf into rust-lang:master Jun 1, 2019

1 check passed

Travis CI - Pull Request Build Passed
Details

@lzutao lzutao deleted the lzutao:stabilize-reverse_bits branch Jun 1, 2019

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.