This website requires JavaScript.
Explore
Help
Sign in
bjoernager
/
rust
Watch
1
Fork
You've already forked rust
0
Code
Activity
2e79c8deb0
rust
/
tests
/
ui
/
for
/
for-loop-refutable-pattern-error-message.rs
4 lines
92 B
Rust
Raw
Normal View
History
Unescape
Escape
syntax: desugar a `for` loop to a let binding to get better error messages when the pattern is refutable. This means the compiler points directly to the pattern and said that the problem is the pattern being refutable (rather than just saying that some value isn't covered in the `match` as it did previously). Fixes #14390.
2014-05-26 22:01:09 +10:00
fn
main
(
)
{
hygiene for `for` loops, `if let`, `while let` and some unrelated test cleanups
2015-09-30 12:19:45 +13:00
for
&
1
in
[
1
]
.
iter
(
)
{
}
//~ ERROR refutable pattern in `for` loop binding
syntax: desugar a `for` loop to a let binding to get better error messages when the pattern is refutable. This means the compiler points directly to the pattern and said that the problem is the pattern being refutable (rather than just saying that some value isn't covered in the `match` as it did previously). Fixes #14390.
2014-05-26 22:01:09 +10:00
}
Copy permalink