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 8 pull requests #50003

Merged
merged 20 commits into from
Apr 16, 2018
Merged

Rollup of 8 pull requests #50003

merged 20 commits into from
Apr 16, 2018

Commits on Apr 1, 2018

  1. Inline most of the code paths for conversions with boxed slices

    This helps with the specific problem described in rust-lang#49541, obviously without
    making any large change to how inlining works in the general case.
    
    Everything involved in the conversions is made `#[inline]`, except for the
    `<Vec<T>>::into_boxed_slice` entry point which is made `#[inline(always)]`
    after checking that duplicating the function mentioned in the issue prevented
    its inlining if I only annotate it with `#[inline]`.
    
    For the record, that function was:
    
    ```rust
    pub fn foo() -> Box<[u8]> {
        vec![0].into_boxed_slice()
    }
    ```
    
    To help the inliner's job, we also hoist a `self.capacity() != self.len` check
    in `<Vec<T>>::shrink_to_fit` and mark it as `#[inline]` too.
    nox committed Apr 1, 2018
    Configuration menu
    Copy the full SHA
    360f2f0 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2018

  1. Use box syntax instead of Box::new in Mutex::remutex on Windows

    The Box::new(mem::uninitialized()) pattern actually actively copies
    uninitialized bytes from the stack into the box, which is a waste of
    time. Using the box syntax instead avoids the useless copy.
    glandium committed Apr 4, 2018
    Configuration menu
    Copy the full SHA
    4577da7 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2018

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

Commits on Apr 11, 2018

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

Commits on Apr 13, 2018

  1. rustbuild: allow building tools with debuginfo

    Debugging information for the extended tools is currently disabled for
    concerns about the size.  This patch adds `--enable-debuginfo-tools` to
    let one opt into having that debuginfo.
    
    This is useful for debugging the tools in distro packages.  We always
    strip debuginfo into separate packages anyway, so the extra size is not
    a concern in regular use.
    cuviper committed Apr 13, 2018
    Configuration menu
    Copy the full SHA
    cc2906c View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2018

  1. fix error span

    csmoe committed Apr 14, 2018
    Configuration menu
    Copy the full SHA
    6f5a16b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bc7403d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    93734e9 View commit details
    Browse the repository at this point in the history
  4. Remove warning about f64->f32 cast being potential UB

    As discussed in rust-lang#15536, the LLVM documentation incorrect described
    overflowing f64->f32 casts as being undefined behavior. LLVM never
    treated them as such, and the documentation has been adjusted in
    https://reviews.llvm.org/rL329065. As such, this warning can now
    be removed.
    
    Closes rust-lang#49622.
    nikic committed Apr 14, 2018
    Configuration menu
    Copy the full SHA
    cbabb1b View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2018

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

Commits on Apr 16, 2018

  1. Configuration menu
    Copy the full SHA
    afa22d6 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#49555 - nox:inline-into-boxed, r=alexcrichton

    Inline most of the code paths for conversions with boxed slices
    
    This helps with the specific problem described in rust-lang#49541, obviously without making any large change to how inlining works in the general case.
    
    Everything involved in the conversions is made `#[inline]`, except for the `<Vec<T>>::into_boxed_slice` entry point which is made `#[inline(always)]` after checking that duplicating the function mentioned in the issue prevented its inlining if I only annotate it with
    `#[inline]`.
    
    For the record, that function was:
    
    ```rust
    pub fn foo() -> Box<[u8]> {
        vec![0].into_boxed_slice()
    }
    ```
    
    To help the inliner's job, we also hoist a `self.capacity() != self.len` check in `<Vec<T>>::shrink_to_fit` and mark it as `#[inline]` too.
    kennytm committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    bf60295 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#49606 - varkor:pipe-repair, r=alexcrichton

    Prevent broken pipes causing ICEs
    
    As the private `std::io::print_to` panics if there is an I/O error, which is used by `println!`, the compiler would ICE if one attempted to use a broken pipe (e.g. `rustc --help | false`). This introduces a new (private) macro `try_println!` which allows us to avoid this.
    
    As a side note, it seems this macro might be useful publicly (and actually there seems to be [a crate specifically for this purpose](https://crates.io/crates/try_print/)), though that can probably be left for a future discussion.
    
    One slight alternative approach would be to simply early exit without an error (i.e. exit code `0`), which [this comment](rust-lang#34376 (comment)) suggests is the usual approach. I've opted not to take that approach initially, because I think it's more helpful to know when there is a broken pipe.
    
    Fixes rust-lang#34376.
    kennytm committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    ccd2c40 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#49646 - glandium:uninitialized-box, r=alexc…

    …richton
    
    Use box syntax instead of Box::new in Mutex::remutex on Windows
    
    The Box::new(mem::uninitialized()) pattern actually actively copies
    uninitialized bytes from the stack into the box, which is a waste of
    time. Using the box syntax instead avoids the useless copy.
    kennytm committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    e4991b2 View commit details
    Browse the repository at this point in the history
  5. Remove underscore_lifetimes and match_default_bindings from activ…

    …e feature list
    
    These are already stabilized in 1.26.
    kennytm committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    6c3e1d7 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#49931 - csmoe:end_span, r=estebank

    Fix incorrect span in `&mut` suggestion
    
    Fixes rust-lang#49859
    kennytm committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    73ea893 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#49959 - cuviper:debuginfo-tools, r=Mark-Sim…

    …ulacrum
    
    rustbuild: allow building tools with debuginfo
    
    Debugging information for the extended tools is currently disabled for
    concerns about the size.  This patch adds `--enable-debuginfo-tools` to
    let one opt into having that debuginfo.
    
    This is useful for debugging the tools in distro packages.  We always
    strip debuginfo into separate packages anyway, so the extra size is not
    a concern in regular use.
    kennytm committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    34ee31d View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#49965 - nikic:fix-49622, r=rkruppe

    Remove warning about f64->f32 cast being potential UB
    
    As discussed in rust-lang#15536, the LLVM documentation incorrect described overflowing f64->f32 casts as being undefined behavior. LLVM never treated them as such, and the documentation has been adjusted in https://reviews.llvm.org/rL329065. As such, this warning can now be removed.
    
    Closes rust-lang#49622.
    
    ---
    
    I could not find any existing test checking for this warning. Should I be adding a test for the absence of the warning instead?
    kennytm committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    87cd53e View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#49994 - frewsxcv:frewsxcv-doc-tests, r=Quie…

    …tMisdreavus
    
    Remove unnecessary indentation in rustdoc book codeblock.
    
    None
    kennytm committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    932431c View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#49647 - kennytm:duplicated-features, r=aturon

    Remove `underscore_lifetimes` and `match_default_bindings` from active feature list
    
    These are already stabilized in 1.26.
    kennytm committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    bf16e4b View commit details
    Browse the repository at this point in the history