diff options
| author | Stepan Koltsov <stepan.koltsov@gmail.com> | 2013-08-07 22:07:24 +0400 |
|---|---|---|
| committer | Stepan Koltsov <stepan.koltsov@gmail.com> | 2013-08-07 22:07:24 +0400 |
| commit | 828bfb2c61aaac93325b00737362769d045b6438 (patch) | |
| tree | dbe318e98a06cc74b166f3c3e2f19b56984582e8 /src/rt/sync/timer.cpp | |
| parent | 29ffbbaaa850d3f8fe1b35e3a63defe9206a3eb7 (diff) | |
| download | rust-828bfb2c61aaac93325b00737362769d045b6438.tar.gz rust-828bfb2c61aaac93325b00737362769d045b6438.zip | |
Fix incorrect non-exhaustive matching for fixed length vecs
Code like this is fixed now:
```
fn foo(p: [u8, ..4]) {
match p {
[a, b, c, d] => {}
};
}
```
Invalid constructors are not reported as errors yet:
```
fn foo(p: [u8, ..4]) {
match p {
[_, _, _] => {} // this should be error
[_, _, _, _, _, .._] => {} // and this
_ => {}
}
}
```
Issue #8311 is partially fixed by this commit. Fixed-length arrays in
let statement are not yet allowed:
```
let [a, b, c] = [1, 2, 3]; // still fails
```
Diffstat (limited to 'src/rt/sync/timer.cpp')
0 files changed, 0 insertions, 0 deletions
