Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1576de0ce
Choose a base ref
...
head repository: rust-lang/rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3c5a0fa45
Choose a head ref
  • 10 commits
  • 8 files changed
  • 5 contributors

Commits on Aug 18, 2016

  1. Use a Carrier trait with the ? operator

    Allows use with `Option` and custom `Result`-like types.
    nrc committed Aug 18, 2016
    Configuration menu
    Copy the full SHA
    683bcc0 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2016

  1. Remove the Option and bool impls for carrier and add a dummy impl

    The dummy impl should ensure the same type checking behaviour as having other (real) Carrier impls.
    nrc committed Aug 19, 2016
    Configuration menu
    Copy the full SHA
    5aa89d8 View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2016

  1. Configuration menu
    Copy the full SHA
    be8df50 View commit details
    Browse the repository at this point in the history
  2. Fix linker on Solaris/Illumos

    Solaris linker doesn't support the `--retain-symbols-file` option,
    so this patch provides version scripts as an alternative on that
    platform.
    nbaksalyar committed Aug 20, 2016
    Configuration menu
    Copy the full SHA
    c08b7b9 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2016

  1. cstring: avoid excessive growth just to 0-terminate

    Based on following what happens in CString::new("string literal"):
    
    1. Using `Into<Vec<u8>>`, a Vec is allocated with capacity exactly equal
       to the string's input length.
    2. By `v.push(0)`, the Vec is grown to twice capacity, since it was full.
    3. By `v.into_boxed_slice()`, the Vec capacity is shrunk to fit the length again.
    
    If we use `.reserve_exact(1)` just before the push, then we avoid the
    capacity doubling that we're going to have to shrink anyway.
    
    Growing by just 1 byte means that the step (2) is less likely to have to
    move the memory to a larger allocation chunk, and that the step (3) does
    not have to reallocate.
    bluss committed Aug 21, 2016
    Configuration menu
    Copy the full SHA
    876c02c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c32456d View commit details
    Browse the repository at this point in the history
  3. Auto merge of #35777 - nrc:carrier3, r=@nikomatsakis

    Carrier trait (third attempt)
    
    This adds a `Carrier` trait to operate with `?`. The only public implementation is for `Result`, so effectively the trait does not exist, however, it ensures future compatibility for the `?` operator. This is not intended to be used, nor is it intended to be a long-term solution.
    
    Although this exact PR has not been through Crater, I do not expect it to be a breaking change based on putting numerous similar PRs though Crater in the past.
    
    cc:
    * [? tracking issue](#31436)
    * [previous PR](#35056)
    * [RFC issue](rust-lang/rfcs#1718) for discussion of long-term Carrier trait solutions.
    
    r? @nikomatsakis
    bors authored Aug 21, 2016
    Configuration menu
    Copy the full SHA
    42584d3 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2016

  1. Auto merge of #35821 - nbaksalyar:solaris-trans-fix, r=alexcrichton

    Fix linker on Solaris/Illumos
    
    This patch provides a fix for the `GnuLinker::export_symbols` function that currently relies on a `--retain-symbols-file` option which is not supported by the Solaris & Illumos linker.
    
    Instead, a [version script](https://www.gnu.org/software/gnulib/manual/html_node/LD-Version-Scripts.html) is used on this platform to achieve the same goal. Here's an example of a similar approach in LLVM's CMake script: https://github.com/llvm-mirror/llvm/blob/master/cmake/modules/AddLLVM.cmake#L88-L94.
    
    Perhaps other platforms like OpenBSD could benefit from this as well. /cc @semarie
    bors authored Aug 22, 2016
    Configuration menu
    Copy the full SHA
    c44534e View commit details
    Browse the repository at this point in the history
  2. Auto merge of #35848 - Mark-Simulacrum:make-tidy-in-tree, r=alexcrichton

    Check that executable file is in-tree before failing tidy check
    
    I silenced stdout and stderr for ls-files, not sure if that's appropriate (is `make tidy` intended to give debugging information)? Otherwise it prints each file it find to stdout/stderr, which currently prints nothing (only executable files are checked).
    
    I have not done major testing regarding the behavior of ls-files when the file is ignored, but judging by the man page everything should be fine.
    
    I've duplicated the code which makes the path git-friendly from the `Cargo.lock` checking code; I can extract that into a common helper if wanted (it's only two lines).
    
    Fixes #35689.
    bors authored Aug 22, 2016
    Configuration menu
    Copy the full SHA
    57a1f68 View commit details
    Browse the repository at this point in the history
  3. Auto merge of #35871 - bluss:cstring-new, r=alexcrichton

    cstring: avoid excessive growth just to 0-terminate
    
    Based on following what happens in CString::new("string literal"):
    
    1. Using `Into<Vec<u8>>`, a Vec is allocated with capacity exactly equal
       to the string's input length.
    2. By `v.push(0)`, the Vec is grown to twice capacity, since it was full.
    3. By `v.into_boxed_slice()`, the Vec capacity is shrunk to fit the length again.
    
    If we use `.reserve_exact(1)` just before the push, then we avoid the
    capacity doubling that we're going to have to shrink anyway.
    
    Growing by just 1 byte means that the step (2) is less likely to have to
    move the memory to a larger allocation chunk, and that the step (3) does
    not have to reallocate.
    
    Addresses part of #35838
    bors authored Aug 22, 2016
    Configuration menu
    Copy the full SHA
    3c5a0fa View commit details
    Browse the repository at this point in the history
Loading