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
1
Packages
Projects
Releases
Wiki
Activity
Files
fd1a263fc7029b06a8f041feadbcc85c65b0a6e8
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