Skip to content

Commit

Permalink
Translate untranslated lines in guard.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kdnakt committed Jul 14, 2024
1 parent 152b95a commit 305c4f8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/flow_control/match/guard.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ fn main() {
}
```

<!--
Note that the compiler won't take guard conditions into account when checking
if all patterns are covered by the match expression.
possible conditions have been checked. Therefore, you must use the `_` pattern
at the end.
-->
コンパイラは、match式ですべてのパターンがカバーされているかどうかを調べるときに、
ガード条件を考慮しない点に注意してください。

```rust,editable,ignore,mdbook-runnable
```rust,editable
fn main() {
let number: u8 = 4;
Expand All @@ -47,7 +48,7 @@ fn main() {
i if i > 0 => println!("Greater than zero"),
// _ => unreachable!("Should never happen."),
// TODO ^ uncomment to fix compilation
_ => println!("Fell through"), // This should not be possible to reach
// TODO ^ アンコメントしてコンパイルを修正しよう
}
}
```
Expand Down

0 comments on commit 305c4f8

Please sign in to comment.