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

Rollup of 19 pull requests #57503

Closed
wants to merge 17 commits into from
Closed

Rollup of 19 pull requests #57503

wants to merge 17 commits into from

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jan 10, 2019

Successful merges:

Failed merges:

r? @ghost

@Centril
Copy link
Contributor Author

Centril commented Jan 10, 2019

@bors r+ p=19

@bors
Copy link
Contributor

bors commented Jan 10, 2019

📌 Commit 7c590fe6699fa546f08ae8ed6d689403db11fd42 has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 10, 2019
@bors
Copy link
Contributor

bors commented Jan 11, 2019

⌛ Testing commit 7c590fe6699fa546f08ae8ed6d689403db11fd42 with merge 8d7aa49d2fc058a000d668024fe4fd65f81552fe...

@bors
Copy link
Contributor

bors commented Jan 11, 2019

💔 Test failed - checks-travis

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-full-bootstrap 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.
[00:05:10] [RUSTC-TIMING] rustc_errors test:false 13.172
[00:06:14] [RUSTC-TIMING] syntax test:false 64.202
[00:06:14]    Compiling syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
[00:06:45] [RUSTC-TIMING] syntax_ext test:false 31.194
No output has been received in the last 30m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

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 Jan 11, 2019
@Centril
Copy link
Contributor Author

Centril commented Jan 11, 2019

Can't see any reason in any of the included PRs why this should time out, so...

@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 Jan 11, 2019
@bors
Copy link
Contributor

bors commented Jan 11, 2019

⌛ Testing commit 7c590fe6699fa546f08ae8ed6d689403db11fd42 with merge 35f174f84f5f4fdb413c1cad5d4266593575647f...

oli-obk and others added 2 commits January 11, 2019 12:19
…nikomatsakis

Stabilize `let` bindings and destructuring in constants and const fn

r? @Centril

This PR stabilizes the following features in constants and `const` functions:

* irrefutable destructuring patterns (e.g. `const fn foo((x, y): (u8, u8)) { ... }`)
* `let` bindings (e.g. `let x = 1;`)
* mutable `let` bindings (e.g. `let mut x = 1;`)
* assignment (e.g. `x = y`) and assignment operator (e.g. `x += y`) expressions, even where the assignment target is a projection (e.g. a struct field or index operation like `x[3] = 42`)
* expression statements (e.g. `3;`)

This PR does explicitly *not* stabilize:

* mutable references (i.e. `&mut T`)
* dereferencing mutable references
* refutable patterns (e.g. `Some(x)`)
* operations on `UnsafeCell` types (as that would need raw pointers and mutable references and such, not because it is explicitly forbidden. We can't explicitly forbid it as such values are OK as long as they aren't mutated.)
* We are not stabilizing `let` bindings in constants that use `&&` and `||` short circuiting operations. These are treated as `&` and `|` inside `const` and `static` items right now. If we stopped treating them as `&` and `|` after stabilizing `let` bindings, we'd break code like `let mut x = false; false && { x = true; false };`. So to use `let` bindings in constants you need to change `&&` and `||` to `&` and `|` respectively.
…li-obk

Const-stabilize `const_int_ops` + `const_ip`

r? @oli-obk

I've added T-lang since this affects intrinsics and the operational semantics of Rust's `const fn` fragment.
This PR depends on rust-lang#57105 but the FCP intent does not.

## Stable APIs proposed for constification

+ `const_int_ops`:
    + `count_ones`
    + `count_zeros`
    + `leading_zeros`
    + `trailing_zeros`
    + `swap_bytes`
    + `from_be`
    + `from_le`
    + `to_be`
    + `to_le`
+ `const_ip`
    + `Ipv4Addr::new`

## Unstable APIs constified

+ `const_int_conversion`:
    + `reverse_bits`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup 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.

4 participants