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
Merged

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented May 30, 2019

FCP done in #48763 (comment)

Closes #48763

r? @Centril

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 30, 2019
@tesuji

This comment has been minimized.

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label May 30, 2019
@rust-highfive

This comment has been minimized.

@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: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 the relnotes Marks issues that should be documented in the release notes of the next release. label May 30, 2019
@jonas-schievink jonas-schievink added this to the 1.37 milestone May 30, 2019
@tesuji
Copy link
Contributor Author

tesuji commented May 31, 2019

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

@tesuji
Copy link
Contributor Author

tesuji commented May 31, 2019

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

@Centril
Copy link
Contributor

Centril commented May 31, 2019

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 31, 2019

📌 Commit 1c26bbf has been approved by Centril

@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 May 31, 2019
@tesuji

This comment has been minimized.

Centril added a commit to Centril/rust that referenced this pull request Jun 1, 2019
bors added a commit that referenced this pull request Jun 1, 2019
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
@tesuji tesuji deleted the stabilize-reverse_bits branch June 1, 2019 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. 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.

Tracking issue for reversing the bit pattern in an integer
6 participants