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 5 pull requests #48860

Merged
merged 18 commits into from
Mar 9, 2018
Merged

Rollup of 5 pull requests #48860

merged 18 commits into from
Mar 9, 2018

Commits on Mar 7, 2018

  1. rustc: Migrate to termcolor crate from term

    This crate moves the compiler's error reporting to using the `termcolor` crate
    from crates.io. Previously rustc used a super-old version of the `term` crate
    in-tree which is basically unmaintained at this point, but Cargo has been using
    `termcolor` for some time now and tools like `rg` are using `termcolor` as well,
    so it seems like a good strategy to take!
    
    Note that the `term` crate remains in-tree for libtest. Changing libtest will be
    a bit tricky due to how the build works, but we can always tackle that later.
    
    cc rust-lang#45728
    alexcrichton committed Mar 7, 2018
    Configuration menu
    Copy the full SHA
    a919efa View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2018

  1. in which parentheses are suggested for should-have-been-tuple-patterns

    Programmers used to working in some other languages (such as Python or
    Go) might expect to be able to destructure values with comma-separated
    identifiers but no parentheses on the left side of an assignment.
    
    Previously, the first name in such code would get parsed as a
    single-indentifier pattern—recognizing, for example, the
    `let a` in `let a, b = (1, 2);`—whereupon we would have a fatal syntax
    error on seeing an unexpected comma rather than the expected semicolon
    (all the way nearer to the end of `parse_full_stmt`).
    
    Instead, let's look for that comma when parsing the pattern, and if we
    see it, momentarily make-believe that we're parsing the remaining
    elements in a tuple pattern, so that we can suggest wrapping it all in
    parentheses. We need to do this in a separate wrapper method called on
    the top-level pattern (or `|`-patterns) in a `let` statement, `for`
    loop, `if`- or `while let` expression, or match arm rather than within
    `parse_pat` itself, because `parse_pat` gets called recursively to parse
    the sub-patterns within a tuple pattern.
    
    Resolves rust-lang#48492.
    zackmdavis committed Mar 8, 2018
    Configuration menu
    Copy the full SHA
    1f04597 View commit details
    Browse the repository at this point in the history
  2. Modify part of line! documentation.

    In accordance with rust-lang#46997, I've replaced:
    
    > The returned line is not the invocation of the line! macro itself [...]
    
    By
    
    > The returned line is *not necessarily* the line of the `line!` invocation itself [...]
    Songbird0 committed Mar 8, 2018
    Configuration menu
    Copy the full SHA
    2d7472f View commit details
    Browse the repository at this point in the history
  3. Modify part of column! documentation.

    Just like `line!` documentation, I've replaced:
    
    > The returned column is not the invocation of the `column!` macro itself
    
    By
    
    > The returned column is *not necessarily* the line of the `column!` invocation itself
    
    See rust-lang#46997.
    Songbird0 committed Mar 8, 2018
    Configuration menu
    Copy the full SHA
    a0758cd View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2018

  1. Move epochs to libsyntax

    Manishearth committed Mar 9, 2018
    Configuration menu
    Copy the full SHA
    4338bd1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c3fe3a5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b88a61e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    197f35c View commit details
    Browse the repository at this point in the history
  5. Add test

    Manishearth committed Mar 9, 2018
    Configuration menu
    Copy the full SHA
    29542ec View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ae5ae84 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    fbe57cf View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6679732 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a08cfc4 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#48527 - zackmdavis:and_the_social_construct…

    …ion_of_tuples, r=estebank
    
    in which parentheses are suggested for should-have-been-tuple-patterns
    
    ![destructure_suggest_parens](https://user-images.githubusercontent.com/1076988/36638335-48b082d4-19a7-11e8-9726-0d043544df2f.png)
    
    Programmers used to working in some other languages (such as Python or
    Go) might expect to be able to destructure values with comma-separated
    identifiers but no parentheses on the left side of an assignment.
    
    Previously, the first name in such code would get parsed as a
    single-indentifier pattern—recognizing, for example, the
    `let a` in `let a, b = (1, 2);`—whereupon we would have a fatal syntax
    error on seeing an unexpected comma rather than the expected semicolon
    (all the way nearer to the end of `parse_full_stmt`).
    
    Instead, let's look for that comma when parsing the pattern, and if we
    see it, make-believe that we're parsing the remaining elements in a
    tuple pattern, so that we can suggest wrapping it all in parentheses. We
    need to do this in a separate wrapper method called on a "top-level"
    pattern, rather than within
    `parse_pat` itself, because `parse_pat` gets called recursively to parse
    the sub-patterns within a tuple pattern.
    
    ~~We could also do this for `match` arms, `if let`, and `while let`, but
    we elect not to in this patch, as it seems less likely for users to make
    the mistake in those contexts.~~
    
    Resolves rust-lang#48492.
    
    r? @petrochenkov
    Manishearth authored Mar 9, 2018
    Configuration menu
    Copy the full SHA
    b228b05 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#48588 - alexcrichton:termcolor, r=BurntSushi

    rustc: Migrate to `termcolor` crate from `term`
    
    This crate moves the compiler's error reporting to using the `termcolor` crate
    from crates.io. Previously rustc used a super-old version of the `term` crate
    in-tree which is basically unmaintained at this point, but Cargo has been using
    `termcolor` for some time now and tools like `rg` are using `termcolor` as well,
    so it seems like a good strategy to take!
    
    Note that the `term` crate remains in-tree for libtest. Changing libtest will be
    a bit tricky due to how the build works, but we can always tackle that later.
    
    cc rust-lang#45728
    Manishearth authored Mar 9, 2018
    Configuration menu
    Copy the full SHA
    b0bc601 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#48801 - Manishearth:epoch-features, r=nikom…

    …atsakis
    
    Add functionality for gating feature flags on epochs ; rejigger epoch lints
    
    fixes rust-lang#48794
    
    r? @nikomatsakis
    Manishearth authored Mar 9, 2018
    Configuration menu
    Copy the full SHA
    68e7282 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#48856 - Songbird0:improve_line_macro_docume…

    …ntation, r=joshtriplett
    
    Modify part of `line!` documentation.
    
    In accordance with rust-lang#46997, I've replaced:
    
    > The returned line is not the invocation of the line! macro itself [...]
    
    By
    
    > The returned line is *not necessarily* the line of the `line!` invocation itself [...]
    Manishearth authored Mar 9, 2018
    Configuration menu
    Copy the full SHA
    5ab4855 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#48857 - Songbird0:improve_column_macro_docu…

    …mentation, r=joshtriplett
    
    Modify part of `column!` documentation.
    
    Just like `line!` documentation, I've replaced:
    
    > The returned column is not the invocation of the `column!` macro itself
    
    By
    
    > The returned column is *not necessarily* the line of the `column!` invocation itself
    
    See rust-lang#46997.
    Manishearth authored Mar 9, 2018
    Configuration menu
    Copy the full SHA
    b65b171 View commit details
    Browse the repository at this point in the history