Skip to content

Commit 2f9ab0f

Browse files
authored
Merge pull request #171 from kdnakt/translate-input_parameters
Translate untranslated lines in input_parameters.md
2 parents 5417cee + dcb8fa8 commit 2f9ab0f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/fn/closures/input_parameters.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ they are:
1414

1515
Rustはたいていの場合、型アノテーションなしでも変数を捕捉する方法を臨機応変に選択してくれますが、関数を書く場合にはこの曖昧さは許されません。
1616
引数のパラメータとしてクロージャを取る場合、そのクロージャの完全な型はいくつかの`traits`の中の1つを使って明示されなければなりません。
17+
どれが使われるかは、捕捉された値でクロージャが何をするかによって決まります。
1718
制限の少ない順に並べると、下記の通りです。
1819

1920
<!--
@@ -64,6 +65,8 @@ In the following example, try swapping the usage of `Fn`, `FnMut`, and
6465
```rust,editable
6566
// A function which takes a closure as an argument and calls it.
6667
// <F> denotes that F is a "Generic type parameter"
68+
// クロージャを引数として取り、クロージャを呼び出す関数。
69+
// <F>はFが「ジェネリックな型パラメータ」であることを示す。
6770
fn apply<F>(f: F) where
6871
// The closure takes no input and returns nothing.
6972
// クロージャには引数も返り値もない。
@@ -122,6 +125,7 @@ fn main() {
122125
apply(diary);
123126
124127
// `double` satisfies `apply_to_3`'s trait bound
128+
// `double`は`apply_to_3`のトレイト境界を満たす。
125129
let double = |x| 2 * x;
126130
127131
println!("3 doubled: {}", apply_to_3(double));

0 commit comments

Comments
 (0)