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 12 pull requests #59428

Closed
wants to merge 50 commits into from
Closed

Rollup of 12 pull requests #59428

wants to merge 50 commits into from

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Mar 26, 2019

Successful merges:

Failed merges:

r? @ghost

Saleem Jaffer and others added 30 commits March 18, 2019 15:03
uninitialized -> uninit
into_initialized -> assume_init
read_initialized -> read
set -> write
Add additional instructions when `sudo ./x.py install` fails to
complete the build.

This resolves issues rust-lang#40108 and rust-lang#49269.
In order to minimize the verbosity of common syntax errors that are parsed
as type ascription, hide the feature gate error unless there are no other
errors being emitted by the parser.
gnzlbg and others added 20 commits March 25, 2019 11:44
This changes removes a cyclic dependency between the "test" and "libtest"
crates, where "libtest" depends on "test" for "black_box", but "test" depends on
"libtest" for everything else.

I've chosen the "hint" module because there seems to be enough consensus in the
discussion of RFC2360 that this module is where such an intrinsic would belong,
but this PR does not implement that RFC! (note: if that RFC ever gets merged,
the API, docs, etc. of this API will need to change).

For backwards compatibility reasons I've chosen to also keep the "test" feature
gate for these instead of adding a new feature gate. If we change the feature
gate, we'll potentially all benchmarks, and while that's something that we could
do, it seems unnecessary to do that now - if RFC2360 gets merged, we'll need to
do that anyways.
Co-Authored-By: pnkfelix <pnkfelix@pnkfx.org>
add missing braces analogous to those suggested by killercup
Explicitly call out when it returns NaN, adhere to the panic doc
guidelines.
…oli-obk

Merge `Promoted` and `Static` in `mir::Place`

fixes rust-lang#53848
adjust MaybeUninit API to discussions

uninitialized -> uninit
into_initialized -> assume_init
read_initialized -> read
set -> write
Add no_hash to query macro and move some queries over

r? @oli-obk
Update build instructions in README.md

Add additional instructions when `sudo ./x.py install` fails to
complete the build.

This resolves issues rust-lang#40108 and rust-lang#49269.

r? @steveklabnik
Moves test::black_box to core::hint and fix black_box on wasm32 and asm.js

This changes removes a cyclic dependency between the "test" and "libtest"
crates, where "libtest" depends on "test" for "black_box", but "test" depends on
"libtest" for everything else.

I've chosen the "hint" module because there seems to be enough consensus in the
discussion of RFC2360 that this module is where such an intrinsic would belong,
but this PR does not implement that RFC! If that RFC ever gets merged, the API, docs,
etc. of this API will need to change. This PR just move the implementation of the
already existing API.

For backwards compatibility reasons I've chosen to also keep the "test" feature
gate for these instead of adding a new feature gate. If we change the feature
gate, we'll potentially all benchmarks, and while that's something that we could
do, it seems unnecessary to do that now - if RFC2360 gets merged, we'll need to
do that anyways. Backwards compatibility is also why we continue to re-export
"black_box" from the "test" crate.

This PR also fixes black_box on the wasm32 target, which now supports inline assembly, and uses volatile loads on the asm.js target.

r? @Amanieu (cc @rust-lang/libs)
…ircuiting, r=Centril

Demo `FromIterator` short-circuiting

while looking at a FIXME in `FromIterator for Option` and `FromIterator for Result`, I realized that the current documentation does not have example code showing exactly what is meant by "no further elements are taken."

The code snippets provided here are meant to correct that.
add rustfix-able suggestions to trim_{left,right} deprecations

Fixes rust-lang#53802 (technically already fixed by rust-lang#58002, but that issue is about these methods).
…ce, r=shepmaster

Simplify checked_duration_since

This follows the same design as we updated to in rust-lang#56490. Internally, all the system specific time implementations are checked, no panics. Then the panicking publicly exported API can just call the checked version of itself and make do with a single panic (`expect`) at the top.

Since the internal sys implementations are now checked, this gets rid of the extra `if self >= &earlier` check in `checked_duration_since`. Except likely making the generated machine code simpler, it also reduces the algorithm from "Check panic condition -> call possibly panicking method" to just "call non panicking method".

Added two test cases:
* Edge case: Make sure `checked_duration_since` on two equal `Instant`s produce a zero duration, not a `None`.
* Most common/intended usage: Make sure `later.checked_duration_since(earlier)`, returns an expected value.
replace redundant note in deprecation warning
…plett

Clarify `{Ord,f32,f64}::clamp` docs a little

Explicitly call out when it returns NaN, adhere to the panic doc
guidelines.
Utilize `?` instead of `return None`.

None
@Centril
Copy link
Contributor Author

Centril commented Mar 26, 2019

@bors r+ p=12

@bors
Copy link
Contributor

bors commented Mar 26, 2019

📌 Commit 5059a9a 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 Mar 26, 2019
@bors
Copy link
Contributor

bors commented Mar 26, 2019

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout rollup (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self rollup --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/libstd/sys/sgx/rwlock.rs
CONFLICT (content): Merge conflict in src/libstd/sys/sgx/rwlock.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 26, 2019
@Centril Centril closed this Mar 26, 2019
@Centril Centril deleted the rollup branch March 26, 2019 05:04
@bors
Copy link
Contributor

bors commented Mar 26, 2019

☔ The latest upstream changes (presumably #59136) made this pull request unmergeable. Please resolve the merge conflicts.

@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
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-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.