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 11 pull requests #59431

Closed
wants to merge 48 commits into from
Closed

Rollup of 11 pull requests #59431

wants to merge 48 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
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.
When trying to access an associated constant as if it were a field of
an instance, provide a suggestion for the correct syntax.
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.
killercup and others added 17 commits March 25, 2019 11:48
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
…vidtwco

Provide suggestion when using field access instead of path

When trying to access an associated constant as if it were a field of
an instance, provide a suggestion for the correct syntax.

Fix rust-lang#57316.
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.
…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=11

@bors
Copy link
Contributor

bors commented Mar 26, 2019

📌 Commit 674e982 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

⌛ Testing commit 674e982 with merge 462533aa83f2383a2bc72313701d5e1b04deef23...

@bors
Copy link
Contributor

bors commented Mar 26, 2019

💔 Test failed - checks-travis

@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 Mar 26, 2019
@rust-highfive
Copy link
Collaborator

The job dist-various-1 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.
[01:05:31]    Compiling compiler_builtins v0.1.5
[01:05:31]    Compiling unwind v0.0.0 (/checkout/src/libunwind)
[01:05:31]    Compiling backtrace-sys v0.1.27
[01:05:31]    Compiling std v0.0.0 (/checkout/src/libstd)
[01:05:32] error[E0472]: asm! is unsupported on this target
[01:05:32]    --> src/libcore/hint.rs:105:18
[01:05:32]     |
[01:05:32] 105 |         unsafe { asm!("" : : "r"(&dummy)) }
[01:05:32] 
[01:05:42] error: aborting due to previous error
[01:05:42] 
[01:05:42] For more information about this error, try `rustc --explain E0472`.
---
travis_time:end:11afb722:start=1553587279331196703,finish=1553587279338421821,duration=7225118
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0b6466af
$ 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:0a21fcd8
travis_time:start:0a21fcd8
$ 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:0828239c
$ 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)

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-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet