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 6 pull requests #64902

Merged
merged 19 commits into from
Sep 29, 2019
Merged

Rollup of 6 pull requests #64902

merged 19 commits into from
Sep 29, 2019

Commits on Sep 22, 2019

  1. Point at definition when misusing ADT

    When given `struct Foo(usize)` and using it as `Foo {}` or `Foo`, point at
    `Foo`'s definition in the error.
    estebank committed Sep 22, 2019
    Configuration menu
    Copy the full SHA
    2ae9016 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2019

  1. Configuration menu
    Copy the full SHA
    d8bf4f1 View commit details
    Browse the repository at this point in the history
  2. Update ui tests

    GuillaumeGomez committed Sep 25, 2019
    Configuration menu
    Copy the full SHA
    e58e144 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2019

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

Commits on Sep 28, 2019

  1. Configuration menu
    Copy the full SHA
    875fa72 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c94fea0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5cb0039 View commit details
    Browse the repository at this point in the history
  4. Point at enclosing match when expecting () in arm

    When encountering code like the following:
    
    ```rust
    fn main() {
        match 3 {
            4 => 1,
            3 => {
                println!("Yep it maches.");
                2
            }
            _ => 2
        }
        println!("Bye!")
    }
    ```
    
    point at the enclosing `match` expression and suggest ignoring the
    returned value:
    
    ```
    error[E0308]: mismatched types
      --> $DIR/match-needing-semi.rs:8:13
       |
    LL | /     match 3 {
    LL | |         4 => 1,
    LL | |         3 => {
    LL | |             2
       | |             ^ expected (), found integer
    LL | |         }
    LL | |         _ => 2
    LL | |     }
       | |     -- help: consider using a semicolon here
       | |_____|
       |       expected this to be `()`
       |
       = note: expected type `()`
                  found type `{integer}
    ```
    
    Fix rust-lang#40799.
    estebank committed Sep 28, 2019
    Configuration menu
    Copy the full SHA
    8a167ed View commit details
    Browse the repository at this point in the history
  5. review comments

    estebank committed Sep 28, 2019
    Configuration menu
    Copy the full SHA
    ae51953 View commit details
    Browse the repository at this point in the history
  6. clean up

    estebank committed Sep 28, 2019
    Configuration menu
    Copy the full SHA
    c861e24 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    54bad93 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2019

  1. syntax: fix rust-lang#64682.

    Fuse parsing of `self` into `parse_param_general`.
    Centril committed Sep 29, 2019
    Configuration menu
    Copy the full SHA
    8fd03b1 View commit details
    Browse the repository at this point in the history
  2. fixed typo

    jakevossen5 committed Sep 29, 2019
    Configuration menu
    Copy the full SHA
    d695e24 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#64691 - estebank:unexpected-variant, r=Centril

    Point at definition when misusing ADT
    
    When given `struct Foo(usize)` and using it as `Foo {}` or `Foo`, point at `Foo`'s definition in the error.
    Centril committed Sep 29, 2019
    Configuration menu
    Copy the full SHA
    0a2ddcc View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#64735 - GuillaumeGomez:long-err-explanation…

    …-E0533, r=Centril
    
    Add long error explanation for E0533
    
    Part of rust-lang#61137
    Centril committed Sep 29, 2019
    Configuration menu
    Copy the full SHA
    f34e2b1 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#64825 - estebank:match-unit, r=Centril

    Point at enclosing match when expecting `()` in arm
    
    When encountering code like the following:
    
    ```rust
    fn main() {
        match 3 {
            4 => 1,
            3 => {
                println!("Yep it maches.");
                2
            }
            _ => 2
        }
        println!("Bye!")
    }
    ```
    
    point at the enclosing `match` expression and suggest ignoring the
    returned value:
    
    ```
    error[E0308]: mismatched types
      --> $DIR/match-needing-semi.rs:8:13
       |
    LL | /     match 3 {
    LL | |         4 => 1,
    LL | |         3 => {
    LL | |             2
       | |             ^ expected (), found integer
    LL | |         }
    LL | |         _ => 2
    LL | |     }
       | |     -- help: consider using a semicolon here
       | |_____|
       |       expected this to be `()`
       |
       = note: expected type `()`
                  found type `{integer}
    ```
    
    Fix rust-lang#40799.
    Centril committed Sep 29, 2019
    Configuration menu
    Copy the full SHA
    8109332 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#64858 - skinny121:str-const-generics, r=varkor

    Add support for relating slices in `super_relate_consts`
    
    This allows passing strings as generic arguments.
    
    Fixes rust-lang#63773
    Fixes rust-lang#60813
    
    r? @varkor
    Centril committed Sep 29, 2019
    Configuration menu
    Copy the full SHA
    4ada68e View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#64894 - Centril:fix-64682, r=petrochenkov

    syntax: fix dropping of attribute on first param of non-method assocated fn
    
    Fixes rust-lang#64682.
    
    The general idea is that we bake parsing of `self` into `parse_param_general` and then we just use standard list parsing. Overall, this simplifies the parsing and makes it more consistent.
    
    r? @petrochenkov cc @c410-f3r
    Centril committed Sep 29, 2019
    Configuration menu
    Copy the full SHA
    64afa26 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#64898 - jakevossen5:master, r=jonas-schievink

    fixed typo
    
    Accidentally had a typo in rust-lang#64884, sorry!
    Centril committed Sep 29, 2019
    Configuration menu
    Copy the full SHA
    50940ae View commit details
    Browse the repository at this point in the history