File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -32,13 +32,14 @@ fn main() {
32
32
}
33
33
```
34
34
35
+ <!--
35
36
Note that the compiler won't take guard conditions into account when checking
36
37
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
+ ガード条件を考慮しない点に注意してください。
39
41
40
42
``` rust,editable,ignore,mdbook-runnable
41
- ```rust,editable
42
43
fn main() {
43
44
let number: u8 = 4;
44
45
@@ -47,7 +48,7 @@ fn main() {
47
48
i if i > 0 => println!("Greater than zero"),
48
49
// _ => unreachable!("Should never happen."),
49
50
// TODO ^ uncomment to fix compilation
50
- _ => println!("Fell through"), // This should not be possible to reach
51
+ // TODO ^ アンコメントしてコンパイルを修正しよう
51
52
}
52
53
}
53
54
```
You can’t perform that action at this time.
0 commit comments