File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -262,11 +262,11 @@ fn foo(x: i32) -> i32 {
262
262
あなたがこれまで式ベースの言語を使ったことがなければ、 ` return ` のない前の定義の方がちょっと変に見えるかもしれません。しかし、それは時間とともに直観的に感じられるようになります。
263
263
264
264
<!-- ## Diverging functions-->
265
- ## ダイバージング関数
265
+ ## 発散する関数
266
266
267
267
<!-- Rust has some special syntax for ‘diverging functions’, which are functions that-->
268
268
<!-- do not return:-->
269
- Rustはリターンしない関数、「ダイバージング関数」のための特別な構文をいくつか持っています 。
269
+ Rustには「発散する関数」、すなわち値を返さない関数のための特別な構文がいくつかあります 。
270
270
271
271
``` rust
272
272
fn diverges () -> ! {
@@ -280,7 +280,7 @@ fn diverges() -> ! {
280
280
<!-- return, and so it has the type ‘`!`’, which is read ‘diverges’.-->
281
281
` panic! ` は既に見てきた ` println! ` と同様にマクロです。
282
282
` println! ` とは違って、 ` panic! ` は実行中の現在のスレッドを与えられたメッセージとともにクラッシュさせます。
283
- この関数はクラッシュを引き起こすので、決してリターンしません 。そのため、それは「ダイバージ」と読む、 「 ` ! ` 」型を持つのです 。
283
+ この関数はクラッシュを引き起こすので、決して値を返しません 。そのため、この関数は「 ` ! ` 」型を持つのです。 「 ` ! ` 」は「発散する(diverges)」と読みます 。
284
284
285
285
<!-- If you add a main function that calls `diverges()` and run it, you’ll get-->
286
286
<!-- some output that looks like this:-->
@@ -337,7 +337,7 @@ stack backtrace:
337
337
```
338
338
339
339
<!-- A diverging function can be used as any type:-->
340
- ダイバージング関数は任意の型として使うことができます 。
340
+ 発散する関数は任意の型としても使えます 。
341
341
342
342
``` should_panic
343
343
# fn diverges() -> ! {
You can’t perform that action at this time.
0 commit comments