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 11 pull requests #49675

Closed
wants to merge 42 commits into from
Closed

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
  2. check impl trait first

    tinaun committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    d2b9a77 View commit details
    Browse the repository at this point in the history
  3. added test

    tinaun committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    97e0dc3 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 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. std: Minimize size of panicking on wasm

    This commit applies a few code size optimizations for the wasm target to
    the standard library, namely around panics. We notably know that in most
    configurations it's impossible for us to print anything in
    wasm32-unknown-unknown so we can skip larger portions of panicking that
    are otherwise simply informative. This allows us to get quite a nice
    size reduction.
    
    Finally we can also tweak where the allocation happens for the
    `Box<Any>` that we panic with. By only allocating once unwinding starts
    we can reduce the size of a panicking wasm module from 44k to 350 bytes.
    alexcrichton committed Apr 2, 2018
    Configuration menu
    Copy the full SHA
    f886518 View commit details
    Browse the repository at this point in the history
  4. 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
  3. Refactor inner function into closure.

    So we can cut some params by using stuff from the environment.
    leoyvens committed Apr 3, 2018
    Configuration menu
    Copy the full SHA
    21641d6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ba5a5cf View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0a3eb5c View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2018

  1. 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
  2. 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
  3. 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
  4. Configuration menu
    Copy the full SHA
    1b1df3e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8cde9ad View commit details
    Browse the repository at this point in the history
  6. Get rid of SpannedIdent

    petrochenkov committed Apr 4, 2018
    Configuration menu
    Copy the full SHA
    2e622b1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1f4c139 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    179c9f1 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2dcafc4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    2c8eb34 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    2bb74f6 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8a82a76 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    eba1218 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    1a2a234 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2018

  1. Rollup merge of rust-lang#48709 - tinaun:issue48703, r=nikomatsakis

    remove erroneous error message when checking impl trait params
    
    fixes rust-lang#48703
    alexcrichton committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    81e4ea1 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#48851 - petrochenkov:genparattr, r=nikomats…

    …akis
    
    Stabilize attributes on generic parameters
    
    Closes rust-lang#48848
    alexcrichton committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    c887c22 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#49154 - petrochenkov:spident, r=eddyb

    AST: Give spans to all identifiers
    
    Change representation of `ast::Ident` from `{ name: Symbol, ctxt: SyntaxContext }` to `{ name: Symbol, span: Span }`.
    Syntax contexts still can be extracted from spans (`span.ctxt()`).
    
    Why this should not require more memory:
    - `Span` is `u32` just like `SyntaxContext`.
    - Despite keeping more spans in AST we don't actually *create* more spans, so the number of "outlined" spans kept in span interner shouldn't become larger.
    
    Why this may be slightly slower:
    - When we need to extract ctxt from an identifier instead of just field read we need to do bit field extraction possibly followed by and access by index into span interner's vector. Both operations should be fast (unless the span interner is under some synchronization) and we already do ctxt extraction from spans all the time during macro expansion, so the difference should be lost in noise.
    
    cc rust-lang#48842 (comment)
    alexcrichton committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    0afb655 View commit details
    Browse the repository at this point in the history
  4. 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
    alexcrichton committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    ab7bb51 View commit details
    Browse the repository at this point in the history
  5. 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).
    alexcrichton committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    07e06ad View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#49419 - leodasvacas:small-typeck-refactorin…

    …gs, r=nikomatsakis
    
    Small typeck refactorings
    
    Some code improvements I noticed while reading the code.
    alexcrichton committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    2d9e754 View commit details
    Browse the repository at this point in the history
  7. 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
    alexcrichton committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    59053aa View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#49488 - alexcrichton:small-wasm-panic, r=sf…

    …ackler
    
    std: Minimize size of panicking on wasm
    
    This commit applies a few code size optimizations for the wasm target to
    the standard library, namely around panics. We notably know that in most
    configurations it's impossible for us to print anything in
    wasm32-unknown-unknown so we can skip larger portions of panicking that
    are otherwise simply informative. This allows us to get quite a nice
    size reduction.
    
    Finally we can also tweak where the allocation happens for the
    `Box<Any>` that we panic with. By only allocating once unwinding starts
    we can reduce the size of a panicking wasm module from 44k to 350 bytes.
    alexcrichton committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    7432273 View commit details
    Browse the repository at this point in the history
  9. 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.
    alexcrichton committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    1191bb1 View commit details
    Browse the repository at this point in the history
  10. 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
    alexcrichton committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    f8e3584 View commit details
    Browse the repository at this point in the history