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 16 pull requests #84975

Closed
wants to merge 45 commits into from

Commits on Apr 13, 2021

  1. BufWriter: apply #[inline] / #[inline(never)] optimizations

    Ensure that `write` and `write_all` can be inlined and that their
    commonly executed fast paths can be as short as possible.
    
    `write_vectored` would likely benefit from the same optimization, but I
    omitted it because its implementation is more complex, and I don't have
    a benchmark on hand to guide its optimization.
    tgnottingham committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    1f32d40 View commit details
    Browse the repository at this point in the history
  2. BufWriter: avoid using expensive Vec methods

    We use a Vec as our internal, constant-sized buffer, but the overhead of
    using methods like `extend_from_slice` can be enormous, likely because
    they don't get inlined, because `Vec` has to repeat bounds checks that
    we've already done, and because it makes considerations for things like
    reallocating, even though they should never happen.
    tgnottingham committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    b43e8e2 View commit details
    Browse the repository at this point in the history
  3. BufWriter: optimize for write sizes less than buffer size

    Optimize for the common case where the input write size is less than the
    buffer size. This slightly increases the cost for pathological write
    patterns that commonly fill the buffer exactly, but if a client is doing
    that frequently, they're already paying the cost of frequent flushing,
    etc., so the cost is of this optimization to them is relatively small.
    tgnottingham committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    5fd9372 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    72aecbf View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    85bc88d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0f29dc4 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2021

  1. Configuration menu
    Copy the full SHA
    01e7018 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2021

  1. Configuration menu
    Copy the full SHA
    33cc3f5 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2021

  1. Configuration menu
    Copy the full SHA
    52fa9da View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fab8410 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    45bc193 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cf79c06 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2021

  1. Configuration menu
    Copy the full SHA
    8a2e67e View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2021

  1. Allow using core:: in intra-doc links within core itself

    I came up with this idea ages ago, but rustdoc used to ICE on it. Now it
    doesn't.
    jyn514 committed Apr 30, 2021
    Configuration menu
    Copy the full SHA
    4a63e1e View commit details
    Browse the repository at this point in the history

Commits on May 3, 2021

  1. ⬆️ rust-analyzer

    lnicola committed May 3, 2021
    Configuration menu
    Copy the full SHA
    367c1db View commit details
    Browse the repository at this point in the history
  2. Unify rustc and rustdoc parsing of cfg()

    This extracts a new `parse_cfg` function that's used between both.
    
    - Treat `#[doc(cfg(x), cfg(y))]` the same as `#[doc(cfg(x)]
      #[doc(cfg(y))]`. Previously it would be completely ignored.
    - Treat `#[doc(inline, cfg(x))]` the same as `#[doc(inline)]
      #[doc(cfg(x))]`. Previously, the cfg would be ignored.
    - Pass the cfg predicate through to rustc_expand to be validated
    
    Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
    jyn514 and petrochenkov committed May 3, 2021
    Configuration menu
    Copy the full SHA
    6eb4735 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2021

  1. Configuration menu
    Copy the full SHA
    6b64202 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0b94338 View commit details
    Browse the repository at this point in the history
  3. Update compiler-builtins to 0.1.42 to get fix for outlined atomics

    This should fix linking of other C code (and soon Rust-generated code)
    on aarch64 musl.
    joshtriplett committed May 4, 2021
    Configuration menu
    Copy the full SHA
    196899a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4bd5505 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2021

  1. Fix typo in MaybeUninit::array_assume_init safety comment

    And also add backticks around `MaybeUninit`.
    sdroege committed May 5, 2021
    Configuration menu
    Copy the full SHA
    42405b4 View commit details
    Browse the repository at this point in the history
  2. Revert PR 83866

    That PR caused multiple test failures when Rust's channel is changed
    from nightly to anything else. The commit will have to be landed again
    after the test suite is fixed.
    pietroalbini committed May 5, 2021
    Configuration menu
    Copy the full SHA
    5b34bf4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b6f3dbb View commit details
    Browse the repository at this point in the history
  4. Disallows #![feature(no_coverage)] on stable and beta

    using allow_internal_unstable (as recommended)
    
    Fixes: rust-lang#84836
    
    ```shell
    $ ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc     src/test/run-make-fulldeps/coverage/no_cov_crate.rs
    error[E0554]: `#![feature]` may not be used on the dev release channel
     --> src/test/run-make-fulldeps/coverage/no_cov_crate.rs:2:1
      |
    2 | #![feature(no_coverage)]
      | ^^^^^^^^^^^^^^^^^^^^^^^^
    
    error: aborting due to previous error
    
    For more information about this error, try `rustc --explain E0554`.
    ```
    richkadel committed May 5, 2021
    Configuration menu
    Copy the full SHA
    3584c1d View commit details
    Browse the repository at this point in the history

Commits on May 6, 2021

  1. Configuration menu
    Copy the full SHA
    4617b03 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    568d9c5 View commit details
    Browse the repository at this point in the history
  3. Add needs-unwind to tests

    tmandry committed May 6, 2021
    Configuration menu
    Copy the full SHA
    e1a8ecf View commit details
    Browse the repository at this point in the history
  4. Support multi target-rustcflags for -Zpanic-abort-tests

    I just need this until rustbuild supports -Cpanic=abort std directly.
    tmandry committed May 6, 2021
    Configuration menu
    Copy the full SHA
    1993e1a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    947ad58 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#79930 - tgnottingham:bufwriter_performance,…

    … r=m-ou-se
    
    Optimize BufWriter
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    b02d15d View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#84328 - Folyd:stablize_map_into_keys_values…

    …, r=m-ou-se
    
    Stablize {HashMap,BTreeMap}::into_{keys,values}
    
    I would propose to stabilize `{HashMap,BTreeMap}::into_{keys,values}`( aka. `map_into_keys_values`).
    
    Closes rust-lang#75294.
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    81dfbfb View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#84442 - jyn514:doc-cfg, r=petrochenkov

    Unify rustc and rustdoc parsing of `cfg()`
    
    This extracts a new `parse_cfg` function that's used between both.
    
    - Treat `#[doc(cfg(x), cfg(y))]` the same as `#[doc(cfg(x)]
      #[doc(cfg(y))]`. Previously it would be completely ignored.
    - Treat `#[doc(inline, cfg(x))]` the same as `#[doc(inline)]
      #[doc(cfg(x))]`. Previously, the cfg would be ignored.
    - Pass the cfg predicate through to rustc_expand to be validated
    
    Technically this is a breaking change, but doc_cfg is still nightly so I don't think it matters.
    
    Fixes rust-lang#84437.
    
    r? ``````@petrochenkov``````
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    e1873b2 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#84655 - CDirkx:wasm, r=m-ou-se

    Cleanup of `wasm`
    
    Some more cleanup of `sys`, this time `wasm`
    
    - Reuse `unsupported::args` (functionally equivalent implementation, just an empty iterator).
    - Split out `atomics` implementation of `wasm::thread`, the non-`atomics` implementation is reused from `unsupported`.
    - Move all of the `atomics` code to a separate directory `wasm/atomics`.
    
    `@rustbot` label: +T-libs-impl
    r? `@m-ou-se`
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    d2532c1 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#84712 - joshtriplett:simplify-chdir, r=yaahc

    Simplify chdir implementation and minimize unsafe block
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    2c98926 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#84734 - tmandry:compiletest-needs-unwind, r…

    …=Mark-Simulacrum
    
    Add `needs-unwind` and beginning of support for testing `panic=abort` std to compiletest
    
    For the Fuchsia platform we build libstd with `panic=abort` and would like a way to run tests with that enabled. This adds low-level support for this directly to compiletest.
    
    In the future I'd like to add high-level support in rustbuild, e.g. having target-specific flags that allow configuring a panic strategy. (Side note: It would be nice if we could also build multiple configurations for the same target, but I'm getting ahead of myself.)
    
    This plus rust-lang#84500 have everything that's needed to get ui tests passing on fuchsia targets.
    
    Part of rust-lang#84766. Note that this change only includes the header on tests which need an unwinder to _build_, not those which need it to _run_.
    
    r? `@Mark-Simulacrum`
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    f74ad9e View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#84755 - jyn514:core-links, r=kennytm

    Allow using `core::` in intra-doc links within core itself
    
    I came up with this idea ages ago, but rustdoc used to ICE on it. Now it doesn't.
    
    Helps with rust-lang#73445. Doesn't fix it completely since `extern crate self as std;` in std still gives strange errors.
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    f5ed444 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#84764 - joshtriplett:update-compiler-builti…

    …ns, r=Amanieu
    
    Update compiler-builtins to 0.1.42 to get fix for outlined atomics
    
    This should fix linking of other C code (and soon Rust-generated code)
    on aarch64 musl.
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    3a09e05 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#84851 - lnicola:rust-analyzer-2021-05-03, r…

    …=jonas-schievink
    
    ⬆️ rust-analyzer
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    8ebb164 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#84871 - richkadel:no-coverage-unstable-only…

    …, r=nagisa
    
    Disallows `#![feature(no_coverage)]` on stable and beta (using standard crate-level gating)
    
    Fixes: rust-lang#84836
    
    Removes the function-level feature gating solution originally implemented, and solves the same problem using `allow_internal_unstable`, so normal crate-level feature gating mechanism can still be used (which disallows the feature on stable and beta).
    
    I tested this, building the compiler with and without `CFG_DISABLE_UNSTABLE_FEATURES=1`
    
    With unstable features disabled, I get the expected result as shown here:
    
    ```shell
    $ ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc     src/test/run-make-fulldeps/coverage/no_cov_crate.rs
    error[E0554]: `#![feature]` may not be used on the dev release channel
     --> src/test/run-make-fulldeps/coverage/no_cov_crate.rs:2:1
      |
    2 | #![feature(no_coverage)]
      | ^^^^^^^^^^^^^^^^^^^^^^^^
    
    error: aborting due to previous error
    
    For more information about this error, try `rustc --explain E0554`.
    ```
    
    r? `@Mark-Simulacrum`
    cc: `@tmandry` `@wesleywiser`
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    c6556ea View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#84896 - estebank:issue-84772, r=jackh726

    Handle incorrect placement of parentheses in trait bounds more gracefully
    
    Fix rust-lang#84772.
    
    CC ```@jonhoo```
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    4956b12 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#84905 - RalfJung:copy, r=oli-obk

    CTFE engine: rename copy → copy_intrinsic, move to intrinsics.rs
    
    The `copy` name is confusing for this function because we also have `copy_op` which is pretty different. I hope `copy_intrinsic` is clearer. Also `step.rs` should really just contain the main loop and opcode dispatch, so move this helper function to a more appropriate place.
    
    r? ```@oli-obk```
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    372dfe4 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#84923 - estebank:as_cache_key-once, r=petro…

    …chenkov
    
    Only compute Obligation `cache_key` once  in `register_obligation_at`
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    796b745 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#84945 - fee1-dead:E0583-better-message, r=p…

    …etrochenkov
    
    E0583: Include secondary path in error message
    
    Fixes rust-lang#84819.
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    b39024d View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#84949 - sdroege:maybe-unint-typo, r=m-ou-se

    Fix typo in `MaybeUninit::array_assume_init` safety comment
    
    And also add backticks around `MaybeUninit`.
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    0c94c4b View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#84950 - pietroalbini:revert-3478f83c0, r=Ma…

    …rk-Simulacrum
    
    Revert PR 83866
    
    rust-lang#83866 caused multiple test failures when Rust's channel is changed from nightly to anything else. The PR will have to be landed again after the test suite is fixed.
    
    The two kinds of test failures were:
    
    * Rustdoc tests failed because the links in the generated HTML didn't point at nightly anymore, see rust-lang#84909 (comment)
    * Rustdoc UI tests failed because the links included in error messages didn't point at nightly anymore, see rust-lang#84909 (comment)
    
    r? `@Mark-Simulacrum`
    cc `@jyn514`
    Dylan-DPC committed May 6, 2021
    Configuration menu
    Copy the full SHA
    ab65989 View commit details
    Browse the repository at this point in the history