about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAndrew Cann <shum@canndrew.org>2016-11-28 18:38:27 +0800
committerAndrew Cann <shum@canndrew.org>2017-01-03 15:30:19 +0800
commit9ad20442e8af42815fde41c03188764ac516cf18 (patch)
tree0b42ea4f4bd4b5783f2ff5cc051b5fc1fcfcc77a /src/rustllvm/RustWrapper.cpp
parent1659d65e0323707646854d6993da31690f855f0e (diff)
downloadrust-9ad20442e8af42815fde41c03188764ac516cf18.tar.gz
rust-9ad20442e8af42815fde41c03188764ac516cf18.zip
Start enabling empty types in pattern matching.
Remove the assumption at the start of is_useful that any suitably-long array of
wildcard patterns is useful relative the any empty vector. Instead we just
continue to recurse column-wise over the matrix.

This assumption is false in the presence of empty types.
eg. in the simplest case:

let x: ! = ...;
match x {
    // This pattern should not be considered useful by the algorithm
    _   => ...
}
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions