]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #19115 : jakub-/rust/issue-19100, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 26 Nov 2014 22:37:06 +0000 (22:37 +0000)
committerbors <bors@rust-lang.org>
Wed, 26 Nov 2014 22:37:06 +0000 (22:37 +0000)
...of the type being matched.

This change will result in a better diagnostic for code like the following:

```rust
enum Enum {
    Foo,
    Bar
}

fn f(x: Enum) {
    match x {
        Foo => (),
        Bar => ()
    }
}
```

which would currently simply fail with an unreachable pattern error
on the 2nd arm.

The user is advised to either use a qualified path in the patterns
or import the variants explicitly into the scope.


Trivial merge