about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-11-26 22:37:06 +0000
committerbors <bors@rust-lang.org>2014-11-26 22:37:06 +0000
commitfac5a07679cac21a580badc84b755b8df0f975cf (patch)
treeae15b481ed531e4fae600c41ca41107f6ad3e279 /src/rustllvm/RustWrapper.cpp
parent6faff24ec85744de092a7d7c2378370f65d623bb (diff)
parent9d01db1966a3ab073691eb8e5203e36624b9f992 (diff)
downloadrust-fac5a07679cac21a580badc84b755b8df0f975cf.tar.gz
rust-fac5a07679cac21a580badc84b755b8df0f975cf.zip
auto merge of #19115 : jakub-/rust/issue-19100, r=alexcrichton
...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.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions