-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rollup of 11 pull requests #59431
Conversation
Add additional instructions when `sudo ./x.py install` fails to complete the build. This resolves issues rust-lang#40108 and rust-lang#49269.
…` and early termination.
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.
Co-Authored-By: pnkfelix <[email protected]>
add missing braces analogous to those suggested by killercup
Explicitly call out when it returns NaN, adhere to the panic doc guidelines.
Expand suggestions for type ascription parse errors Fix rust-lang#51222. CC rust-lang#48016, rust-lang#47666, rust-lang#54516, rust-lang#34255.
…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
@bors r+ p=11 |
📌 Commit 674e982 has been approved by |
⌛ Testing commit 674e982 with merge 462533aa83f2383a2bc72313701d5e1b04deef23... |
💔 Test failed - checks-travis |
The job Click to expand the log.
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 |
Successful merges:
Promoted
andStatic
inmir::Place
#59232 (MergePromoted
andStatic
inmir::Place
)FromIterator
short-circuiting #59362 (DemoFromIterator
short-circuiting){Ord,f32,f64}::clamp
docs a little #59410 (Clarify{Ord,f32,f64}::clamp
docs a little)?
instead ofreturn None
. #59419 (Utilize?
instead ofreturn None
.)Failed merges:
r? @ghost