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 #40659

Merged
merged 30 commits into from
Mar 20, 2017
Merged

Rollup of 9 pull requests #40659

merged 30 commits into from
Mar 20, 2017

Commits on Mar 9, 2017

  1. Configuration menu
    Copy the full SHA
    c7db40f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    50aee36 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2017

  1. make shift builtins panic-free with new unchecked_sh* intrinsics

    Also update some 128 bit builtins to be panic-free without relying
    on the const evaluator.
    TimNN committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    cc23d17 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fee1f64 View commit details
    Browse the repository at this point in the history
  3. Change json dumper (and a few other bits and pieces) to use rls-data …

    …rather than its own data structures
    nrc committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    a77e528 View commit details
    Browse the repository at this point in the history
  4. Use out-of-tree rustc serialize

    And remove a few data structures in favour of rls-data ones
    nrc committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    83f84ff View commit details
    Browse the repository at this point in the history
  5. Add rls-span to do some conversions into rls-data.

    And fix some warnings and borrow errors
    nrc committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    bf07f1c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    979a988 View commit details
    Browse the repository at this point in the history
  7. Handle feature=rustbuild

    Taken from https://github.com/rust-lang/rust/pull/40347/files
    
    And update rls-span to a version with the rustbuild boilerplate
    nrc committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    2a3663f View commit details
    Browse the repository at this point in the history
  8. Move to using 0.1 versions of crates, rather than GH links

    Also adds a fixme and does cargo update
    nrc committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    dc63eff View commit details
    Browse the repository at this point in the history
  9. Change how the 0 flag works in format!

    Now it always implies right-alignment, so that padding zeroes are placed after the sign (if any) and before the digits. In other words, it always takes precedence over explicitly specified `[[fill]align]`. This also affects the '#' flag: zeroes are placed after the prefix (0b, 0o, 0x) and before the digits.
    
               :05     :<05    :>05    :^05
    before   |-0001| |-1000| |-0001| |-0100|
    after    |-0001| |-0001| |-0001| |-0001|
              :#05x   :<#05x  :>#05x  :^#05x
    before   |0x001| |0x100| |000x1| |0x010|
    after    |0x001| |0x001| |0x001| |0x001|
    
    Fixes rust-lang#39997 [breaking-change]
    Sawyer47 authored and alexcrichton committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    ff63866 View commit details
    Browse the repository at this point in the history
  10. Change how the 0 flag works in format! for floats

    Now it always implies right-alignment, so that padding zeroes are placed after the sign (if any) and before the digits. In other words, it always takes precedence over explicitly specified `[[fill]align]`.
    
                   :06      :<06     :>06     :^06
        before   |-001.2| |-1.200| |-001.2| |-01.20|
        after    |-001.2| |-001.2| |-001.2| |-001.2|
    Sawyer47 authored and alexcrichton committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    8065486 View commit details
    Browse the repository at this point in the history
  11. Rename TryFrom's associated type and implement str::parse using TryFrom.

    Per discussion on the tracking issue, naming `TryFrom`'s associated type
    `Error` is generally more consistent with similar traits in the Rust
    ecosystem, and what people seem to assume it should be called. It
    also helps disambiguate from `Result::Err`, the most common "Err".
    
    See
    rust-lang#33417 (comment).
    
    TryFrom<&str> and FromStr are equivalent, so have the latter provide the
    former to ensure that. Using TryFrom in the implementation of
    `str::parse` means types that implement either trait can use it.
    When we're ready to stabilize `TryFrom`, we should update `FromStr` to
    suggest implementing `TryFrom<&str>` instead for new code.
    
    See
    rust-lang#33417 (comment)
    and
    rust-lang#33417 (comment).
    
    Refs rust-lang#33417.
    jimmycuadra authored and alexcrichton committed Mar 15, 2017
    Configuration menu
    Copy the full SHA
    2561dcd View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    ce616a7 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2017

  1. Implement Error for !.

    clarfonthey committed Mar 16, 2017
    Configuration menu
    Copy the full SHA
    a5cf551 View commit details
    Browse the repository at this point in the history
  2. isolate llvm 4.0 code path

    TimNN committed Mar 16, 2017
    Configuration menu
    Copy the full SHA
    449219a View commit details
    Browse the repository at this point in the history
  3. clang-format

    TimNN committed Mar 16, 2017
    Configuration menu
    Copy the full SHA
    222ca3c View commit details
    Browse the repository at this point in the history
  4. add missing global metadata

    TimNN committed Mar 16, 2017
    Configuration menu
    Copy the full SHA
    95bd7f2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1d93a6c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5364acb View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2017

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

Commits on Mar 20, 2017

  1. Rollup merge of rust-lang#40241 - Sawyer47:fix-39997, r=alexcrichton

    Change how the `0` flag works in format!
    
    Now it always implies right-alignment, so that padding zeroes are placed after the sign (if any) and before the digits. In other words, it always takes precedence over explicitly specified `[[fill]align]`. This also affects the '#' flag: zeroes are placed after the prefix (0b, 0o, 0x) and before the digits.
    
    Here's a short summary of how similar format strings work in Python and Rust:
    
    ```
                  :05     :<05    :>05    :^05
    Python 3.6  |-0001| |-1000| |000-1| |0-100|
    Rust before |-0001| |-1000| |-0001| |-0100|
    Rust after  |-0001| |-0001| |-0001| |-0001|
    
                 :#05x   :<#05x  :>#05x  :^#05x
    Python 3.6  |0x001| |0x100| |000x1| |00x10|
    Rust before |0x001| |0x100| |000x1| |0x010|
    Rust after  |0x001| |0x001| |0x001| |0x001|
    ```
    
    Fixes rust-lang#39997 [breaking-change]
    frewsxcv authored Mar 20, 2017
    Configuration menu
    Copy the full SHA
    e5221f9 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#40281 - jimmycuadra:try-from-from-str, r=at…

    …uron
    
    Rename TryFrom's associated type and implement str::parse using TryFrom.
    
    Per discussion on the tracking issue, naming `TryFrom`'s associated type `Error` is generally more consistent with similar traits in the Rust ecosystem, and what people seem to assume it should be called. It also helps disambiguate from `Result::Err`, the most common "Err".
    
    See rust-lang#33417 (comment).
    
    `TryFrom<&str>` and `FromStr` are equivalent, so have the latter provide the former to ensure that. Using `TryFrom` in the implementation of `str::parse` means types that implement either trait can use it. When we're ready to stabilize `TryFrom`, we should update `FromStr` to
    suggest implementing `TryFrom<&str>` instead for new code.
    
    See rust-lang#33417 (comment)
    and rust-lang#33417 (comment).
    
    Refs rust-lang#33417.
    frewsxcv authored Mar 20, 2017
    Configuration menu
    Copy the full SHA
    573e906 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#40398 - eddyb:struct-hint, r=nikomatsakis

    Propagate expected type hints through struct literals.
    
    Partial fix for rust-lang#31260 to maximize backwards-compatibility, i.e. the hint is provided but not coerced to.
    
    The added test works because `{...; x}` with a hint of `T` coerces `x` to `T`, and the reasoning why that is slightly different has to do with DSTs: `&Struct { tail: [x] }: &Struct<[T]>` has a hint of `[T]` for `[x]`, but the inferred type should be `[T; 1]` to succeed later, so `[x]` shouldn't be *forced* to be `[T]`.
    
    *However*, implementing that complete behavior in a backwards-compatible way may be non-trivial, and has not yet been fully investigated, while this PR fixes rust-lang#40355 and can be backported.
    
    r? @nikomatsakis
    frewsxcv authored Mar 20, 2017
    Configuration menu
    Copy the full SHA
    6480a00 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#40521 - TimNN:panic-free-shift, r=alexcrichton

    Implemente overflowing_sh* with new unchecked_sh* intrinsics
    
    Also update some 128 bit builtins to not rely on the constant evaluator to avoid checked operations.
    
    Fixes rust-lang#40508.
    
    cc @nagisa, @alexcrichton
    
    Note: I still have a build running to see if the 128 bit changes worked (unoptimized builds take *forever* to compile), however at least the overflowing builtins no longer reference `core::panicking::panic`.
    frewsxcv authored Mar 20, 2017
    Configuration menu
    Copy the full SHA
    1d1543d View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#40532 - jseyfried:improve_tokenstream_quote…

    …r, r=nrc
    
    macros: improve the `TokenStream` quoter
    
    This PR
     - renames the `TokenStream` quoter from `qquote!` to `quote!`,
     - uses `$` instead of `unquote` (e.g. `let toks: TokenStream = ...; quote!([$toks])`),
     - allows unquoting `Token`s as well as `TokenTree`s and `TokenStream`s (fixes rust-lang#39746), and
     - to preserve syntactic space, requires that `$` be followed by
       - a single identifier to unquote, or
       - another `$` to produce a literal `$`.
    
    r? @nrc
    frewsxcv authored Mar 20, 2017
    Configuration menu
    Copy the full SHA
    7471d97 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#40554 - nrc:rls-data, r=alexcrichton

    Use rls-data crate
    
    This basically pulls out a bunch of data structures used by save-analysis for serialization into an external crate, and pulls that crate in using Rustbuild. The RLS can then share these data structures with the compiler which in some cases will allow more efficient communication between the compiler and the RLS (i.e., without serialisation).
    
    Along the way, I have to pull in rls-span, which is the RLS's way of defining spans (more type-safe than the compiler's built-in way). This is basically just to convert from compiler spans to RLS spans.
    
    I also pull in the crates.io version of rustc-serialize, which is a bit annoying, but seems to be the only way to have serialisable data in an external crate. To make this work, all of the save-analysis crate has to use this version too (cc rust-lang#40527).
    
    Finally I pull in a line from rust-lang#40347 to make the unstable crate checking stuff working.
    
    There are a lot of changes to save-analysis but they are all mechanical and trivial - changing from using `From` to `Into` (because of orphan rules) being the main thing.
    
    r? @alexcrichton
    frewsxcv authored Mar 20, 2017
    Configuration menu
    Copy the full SHA
    dedf9d3 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#40566 - clarcharr:never_error, r=sfackler

    Implement std::error::Error for !.
    frewsxcv authored Mar 20, 2017
    Configuration menu
    Copy the full SHA
    4e90331 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#40581 - TimNN:di-global-40, r=alexcrichton

    [LLVM 4.0] Add missing debuginfo metadata to globals
    
    Fixes rust-lang#40580.
    
    cc @rkruppe
    cc rust-lang#40123
    frewsxcv authored Mar 20, 2017
    Configuration menu
    Copy the full SHA
    de724ba View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#40587 - GuillaumeGomez:rustdoc-const-displa…

    …y, r=frewsxcv
    
    Fix invalid debug display for associated consts
    
    Fixes rust-lang#40568.
    
    r? @rust-lang/docs
    
    cc @SergioBenitez
    frewsxcv authored Mar 20, 2017
    Configuration menu
    Copy the full SHA
    d49f869 View commit details
    Browse the repository at this point in the history