Skip to content

Commit 4539dfc

Browse files
authored
Merge pull request #189 from kdnakt/fix-guard
Translate untranslated lines in guard.md
2 parents 152b95a + 305c4f8 commit 4539dfc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/flow_control/match/guard.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ fn main() {
3232
}
3333
```
3434

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

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

0 commit comments

Comments
 (0)