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

Match on fixed-length vec gives wrong error message #13176

Closed
jruderman opened this issue Mar 28, 2014 · 2 comments
Closed

Match on fixed-length vec gives wrong error message #13176

jruderman opened this issue Mar 28, 2014 · 2 comments

Comments

@jruderman
Copy link
Contributor

let f = &[99]; println!("{:?}", match [1,2,3,4] { [x, ..xs] => (x, xs), [] => (9, f) });

Says

vectors of length 4 not covered

Should say

pattern [] is unreachable
@ghost
Copy link

ghost commented Jun 2, 2014

Duplicate of #13482.

@alexcrichton
Copy link
Member

Looks like it, thanks!

flip1995 pushed a commit to flip1995/rust that referenced this issue Aug 8, 2024
Fix fix under loop may dropping loop label when applying fix.

changelog: [`explicit_counter_loop`]: fix label drop
changelog: [`for_kv_map`]: add label drop test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants