This website requires JavaScript.
Explore
Help
Register
Sign In
rust-lang
/
rust
Watch
1
Star
0
Fork
0
You've already forked rust
Code
Issues
Pull Requests
Actions
2
Packages
Projects
Releases
Wiki
Activity
Files
b3827e4f3728b77bd3e60587487ebfc3cc8d901b
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
}
Reference in New Issue
Copy Permalink