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 9 pull requests #49684

Merged
merged 29 commits into from
Apr 5, 2018
Merged

Rollup of 9 pull requests #49684

merged 29 commits into from
Apr 5, 2018

Commits on Mar 28, 2018

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

Commits on Mar 29, 2018

  1. Take the original extra-filename passed to a crate into account when

    resolving it as a dependency.
    
    Fixes rust-lang#46816
    chmanchester committed Mar 29, 2018
    Configuration menu
    Copy the full SHA
    bd81547 View commit details
    Browse the repository at this point in the history
  2. Flush executables to disk after linkage

    A problem caused by not doing so in Chrome has been reported here:
    https://randomascii.wordpress.com/2018/02/25/compiler-bug-linker-bug-windows-kernel-bug/amp/
    
    File::sync_all() calls FlushFileBuffers() down the line,
    causing potentially unflushed buffers on high I/O-load systems to flush
    and prevent nasty non-reproducible bugs.
    
    The force-flush is only done on Windows and if the linker exited successfully
    
    Closes rust-lang#48545
    nabijaczleweli committed Mar 29, 2018
    Configuration menu
    Copy the full SHA
    cd09c2b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3787106 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2018

  1. Add a generic CAS loop to std::sync::Atomic*

    This adds a new method to all numeric `Atomic*` types with a
    safe compare-and-set loop, so users will no longer need to write
    their own, except in *very* strange circumstances.
    
    This solves rust-lang#48384 with `x.fetch_max(_)`/`x.fetch_min(_)`. It
    also relates to rust-lang#48655 (which I misuse as tracking issue for now).
    
    *note* This *might* need a crater run because the functions could
    clash with third party extension traits.
    llogiq committed Mar 30, 2018
    Configuration menu
    Copy the full SHA
    0f5e419 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2018

  1. Open the file as write before trying to flush it

    This should be enough and shouldn't require append(true) since we're not
    explicitly writing anything so we're not flushing it so we've no risk of
    overwriting it
    nabijaczleweli committed Mar 31, 2018
    Configuration menu
    Copy the full SHA
    e1d3c47 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2018

  1. add a dist-thumb builder to build rust-std for the THUMB targets

    the rust-std component only contains the core and compiler-builtins (+c +mem) crates
    
    cc rust-lang#49382
    japaric committed Apr 1, 2018
    Configuration menu
    Copy the full SHA
    68b54a5 View commit details
    Browse the repository at this point in the history
  2. add new image to .travis.yml

    japaric committed Apr 1, 2018
    Configuration menu
    Copy the full SHA
    2a99c02 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2018

  1. Add vec![ptr::null{,_mut}(); n] optimization, like vec![0; n]

    vec![0; n], via implementations of SpecFromElem, has an optimization
    that uses with_capacity_zeroed instead of with_capacity, which will use
    calloc instead of malloc, and avoid an extra memset.
    
    This adds the same optimization for vec![ptr::null(); n] and
    vec![ptr::null_mut(); n], assuming their bit value is 0 (which is true
    on all currently supported platforms).
    
    This does so by adding an intermediate trait IsZero, which looks very
    much like nonzero::Zeroable, but that one is on the way out, and doesn't
    apply to pointers anyways.
    
    Adding such a trait allows to avoid repeating the logic using
    with_capacity_zeroed or with_capacity, or making the macro more complex
    to support generics.
    glandium committed Apr 2, 2018
    Configuration menu
    Copy the full SHA
    cc939ac View commit details
    Browse the repository at this point in the history
  2. Add vec!['\0'; n] optimization, like vec![0; n]

    Similarly to vec![ptr::null{,_mut}(); n] in previous change, this adds
    the optimization for vec!['\0'; n].
    glandium committed Apr 2, 2018
    Configuration menu
    Copy the full SHA
    0df837f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    138472b View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2018

  1. Configuration menu
    Copy the full SHA
    d069354 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    862c839 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2018

  1. Configuration menu
    Copy the full SHA
    9e9a987 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    809d01c View commit details
    Browse the repository at this point in the history
  3. create a nostd crate

    the goal is to build, in a single Cargo invocation, several no-std crates that we want to put in the
    rust-std component of no-std targets. The nostd crate builds these crates:
    
    - core
    - compiler-builtin (with the "c" and "mem" features enabled)
    - alloc
    - std_unicode
    japaric committed Apr 4, 2018
    Configuration menu
    Copy the full SHA
    14768f9 View commit details
    Browse the repository at this point in the history
  4. Revert "create a nostd crate"

    This reverts commit 14768f9.
    japaric committed Apr 4, 2018
    Configuration menu
    Copy the full SHA
    bca569f View commit details
    Browse the repository at this point in the history
  5. compile other no-std crates

    japaric committed Apr 4, 2018
    Configuration menu
    Copy the full SHA
    b1015f5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3237955 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2018

  1. ci: Remove x86_64-gnu-incremental builder

    This builder is starting to time out frequently causing PRs to bounce and
    otherwise doesn't seem to be catching too many bugs, so this commit removes it
    entirely. We've had a number of timeouts in the last few weeks related to this
    builder:
    
    * https://travis-ci.org/rust-lang/rust/jobs/360947582
    * https://travis-ci.org/rust-lang/rust/jobs/360464190
    * https://travis-ci.org/rust-lang/rust/jobs/359946975
    * https://travis-ci.org/rust-lang/rust/jobs/361213241
    * https://travis-ci.org/rust-lang/rust/jobs/362346279
    * https://travis-ci.org/rust-lang/rust/jobs/362072331
    
    On a good run this builder takes about 2h15m, which is already too long for
    Travis and the variable build times end up pushing it beyond the 3h limit
    occasionally.
    
    The timeouts here are somewhat expected in that an incrementally compiled rustc
    compiler isn't optimized like a normal rustc, disallowing inlining between
    codegen units and losing lots of optimization opportunities.
    alexcrichton committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    621ccf8 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#48658 - llogiq:no-more-cas, r=kennytm

    Add a generic CAS loop to std::sync::Atomic*
    
    This adds two new methods to both `AtomicIsize` and `AtomicUsize` with optimized safe compare-and-set loops, so users will no longer need to write their own, except in *very* strange circumstances.
    
    `update_and_fetch` will apply the function and return its result, whereas `fetch_and_update` will apply the function and return the previous value.
    
    This solves rust-lang#48384 with `x.update_and_fetch(|x| x.max(y))`. It also relates to rust-lang#48655 (which I misuse as tracking issue for now)..
    
    *note* This *might* need a crater run because the functions could clash with third party extension traits.
    kennytm committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    920249a View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#49253 - chmanchester:probing_fix, r=alexcri…

    …chton
    
    Take the original extra-filename passed to a crate into account when resolving it as a dependency
    
    resolving it as a dependency.
    
    Fixes rust-lang#46816
    kennytm committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    46d0bef View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#49345 - davidtwco:issue-44109, r=nikomatsakis

    RFC 2008: Finishing Touches
    
    Part of rust-lang#44109.
    
    r? @nikomatsakis
    (not sure who was best for this PR).
    kennytm committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    a70f844 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#49432 - nabijaczleweli:master, r=michaelwoe…

    …rister
    
    Flush executables to disk after linkage
    
    A problem caused by not doing so in Chrome has been reported [here](https://randomascii.wordpress.com/2018/02/25/compiler-bug-linker-bug-windows-kernel-bug/amp/).
    
    `File::sync_all()` calls `FlushFileBuffers()` down the line, causing potentially unflushed buffers on high I/O-load systems to flush and preventing nasty non-reproducible bugs.
    
    Closes rust-lang#48545
    kennytm committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    19c6908 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#49496 - glandium:master, r=sfackler

    Add more vec![... ; n] optimizations
    
    vec![0; n], via implementations of SpecFromElem, has an optimization that uses with_capacity_zeroed instead of with_capacity, which will use calloc instead of malloc, and avoid an extra memset.
    
    This PR adds the same optimization for ptr::null, ptr::null_mut, and None, when their in-memory representation is zeroes.
    kennytm committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    23689cc View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#49563 - japaric:std-thumb, r=alexcrichton

    add a dist builder to build rust-std components for the THUMB targets
    
    the rust-std component only contains the core and compiler-builtins (+c +mem) crates
    
    cc rust-lang#49382
    
    - I'm not entirely sure if this PR alone will produce rust-std components installable by rustup or if something else needs to be changed
    - I could have done the THUMB builds in an existing builder / image; I wasn't sure if that was a good idea so I added a new image
    - I could build other crates like alloc into the rust-std component but, AFAICT, that would require calling Cargo a second time (one for alloc and one for compiler-builtins), or have alloc depend on compiler-builtins (rust-lang#49503 will perform that change) *and* have alloc resurface the "c" and "mem" Cargo features.
    
    r? @alexcrichton
    kennytm committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    b146e33 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#49654 - davidtwco:issue-29893, r=alexcrichton

    Host compiler documentation: Include private items
    
    Fixes rust-lang#29893. Now that compiler documentation is being hosted, including private items seems sensible as these types are going to be being used by contributors working on the compiler.
    
    However, including this means that doc comments that contain codeblocks with invalid Rust and can fail the documenting of a given crate (as evidenced by the changes in the second commit included in this PR). We'd need some way of ensuring that this cannot happen so that these failures don't cause documenting to fail. I'm unsure whether this change to documentation steps will cause this to happen already or if something new will be required.
    
    r? @alexcrichton
    kennytm committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    84f6440 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#49667 - Manishearth:preview-features, r=nik…

    …omatsakis
    
    Add more features to rust_2018_preview
    
    Doesn't handle lib features like never_type; we need to figure out a scheme for that.
    kennytm committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    d05009b View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#49674 - alexcrichton:no-incremental-rustc, …

    …r=michaelwoerister
    
    ci: Remove x86_64-gnu-incremental builder
    
    This builder is starting to time out frequently causing PRs to bounce and
    otherwise doesn't seem to be catching too many bugs, so this commit removes it
    entirely. We've had a number of timeouts in the last few weeks related to this
    builder:
    
    * https://travis-ci.org/rust-lang/rust/jobs/360947582
    * https://travis-ci.org/rust-lang/rust/jobs/360464190
    * https://travis-ci.org/rust-lang/rust/jobs/359946975
    * https://travis-ci.org/rust-lang/rust/jobs/361213241
    * https://travis-ci.org/rust-lang/rust/jobs/362346279
    * https://travis-ci.org/rust-lang/rust/jobs/362072331
    
    On a good run this builder takes about 2h15m, which is already too long for
    Travis and the variable build times end up pushing it beyond the 3h limit
    occasionally.
    
    The timeouts here are somewhat expected in that an incrementally compiled rustc
    compiler isn't optimized like a normal rustc, disallowing inlining between
    codegen units and losing lots of optimization opportunities.
    kennytm committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    f4511e2 View commit details
    Browse the repository at this point in the history