1
Fork 0

Fix E0165 code examples

This commit is contained in:
Guillaume Gomez 2016-06-01 16:02:23 +02:00
parent 298730e703
commit c34676a7c4

View file

@ -384,18 +384,19 @@ let irr = Irrefutable(0);
// This fails to compile because the match is irrefutable.
while let Irrefutable(x) = irr {
...
// ...
}
```
Try this instead:
```
```no_run
struct Irrefutable(i32);
let irr = Irrefutable(0);
loop {
let Irrefutable(x) = irr;
...
// ...
}
```
"##,