@@ -195,7 +195,7 @@ <h1 class="title">パターン</h1>
195195<!-- We use them in [variable
196196bindings][bindings], [match statements][match], and other places, too.-->
197197
198- < p > パターンは < a href ="variable-bindings.html "> 変数束縛</ a > , < a href ="match.html "> マッチ文</ a > などで使われています。</ p >
198+ < p > パターンは < a href ="variable-bindings.html "> 変数束縛</ a > 、 < a href ="match.html "> マッチ文</ a > などで使われています。</ p >
199199
200200<!--Let’s go on a whirlwind tour of all of the things patterns can do!-->
201201
@@ -231,7 +231,7 @@ <h1 class="title">パターン</h1>
231231
232232<!-- There’s one pitfall with patterns: like anything that introduces a new binding,they introduce shadowing. For example: -->
233233
234- < p > パターンには一つ落とし穴があります。新しい束縛を導入すると、他の束縛を導入するものと同じように、シャドーイングします 。例えば:</ p >
234+ < p > パターンには一つ落とし穴があります。新しい束縛を導入する他の構文と同様、パターンはシャドーイングをします 。例えば:</ p >
235235
236236< span class ='rusttest '> fn main() {
237237 let x = 'x';
@@ -254,7 +254,7 @@ <h1 class="title">パターン</h1>
254254
255255<!-- This prints:-->
256256
257- < p > これの結果は以下のようになります: </ p >
257+ < p > これは以下のように出力します。 </ p >
258258
259259< pre > < code class ="language-text "> x: c c: c
260260x: x
@@ -264,14 +264,14 @@ <h1 class="title">パターン</h1>
264264`x` that’s in scope for the match arm. Because we already have a binding named
265265`x`, this new `x` shadows it. -->
266266
267- < p > 別の言い方をすると、 < code > x =></ code > はパターンへのマッチだけでなく 、マッチの腕内で有効な < code > x</ code > という名前の束縛を導入します。既に < code > x</ code > は束縛されていたので、この新しい < code > x</ code > はそれを覆い隠します 。</ p >
267+ < p > 別の言い方をすると、 < code > x =></ code > は値をパターンにマッチさせ 、マッチの腕内で有効な < code > x</ code > という名前の束縛を導入します。既に < code > x</ code > という束縛が存在していたので、新たに導入した < code > x</ code > は、その古い < code > x </ code > をシャドーイングします 。</ p >
268268
269269<!-- # Multiple patterns -->
270270
271271< h1 id ='複式パターン ' class ='section-header '> < a href ='#複式パターン '> 複式パターン</ a > </ h1 >
272272<!-- You can match multiple patterns with `|`: -->
273273
274- < p > < code > |</ code > を使うと、複式パターンが導入できます :</ p >
274+ < p > < code > |</ code > を使うと、複数のパターンにマッチさせることができます :</ p >
275275
276276< span class ='rusttest '> fn main() {
277277 let x = 1;
@@ -296,11 +296,11 @@ <h1 id='複式パターン' class='section-header'><a href='#複式パターン'
296296
297297<!-- # Destructuring -->
298298
299- < h1 id ='デストラクチャリング ' class ='section-header '> < a href ='#デストラクチャリング ' > デストラクチャリング </ a > </ h1 >
299+ < h1 id ='分配束縛 ' class ='section-header '> < a href ='#分配束縛 ' > 分配束縛 </ a > </ h1 >
300300<!-- If you have a compound data type, like a [`struct`][struct], you can destructure it
301301inside of a pattern: -->
302302
303- < p > 例えば < a href ="structs.html "> < code > struct</ code > </ a > のような複合データ型を作成したいとき、パターン内でデータを分解することができます 。</ p >
303+ < p > < a href ="structs.html "> < code > struct</ code > </ a > のような複合データ型が存在するとき、パターン内でその値を分解することができます 。</ p >
304304
305305< span class ='rusttest '> fn main() {
306306 struct Point {
@@ -354,7 +354,7 @@ <h1 id='デストラクチャリング' class='section-header'><a href='#デス
354354
355355<!-- If we only care about some of the values, we don’t have to give them all names: -->
356356
357- < p > 値の一部だけを扱いたい場合は、値の全てに名前を付ける必要はありません 。</ p >
357+ < p > 値の一部にだけ興味がある場合は、値のすべてに名前を付ける必要はありません 。</ p >
358358
359359< span class ='rusttest '> fn main() {
360360 struct Point {
@@ -385,7 +385,7 @@ <h1 id='デストラクチャリング' class='section-header'><a href='#デス
385385
386386<!-- You can do this kind of match on any member, not just the first:-->
387387
388- < p > どのメンバに対してもこの種のマッチを行うことができます。たとえ最初ではなくても: </ p >
388+ < p > 最初のメンバだけでなく、 どのメンバに対してもこの種のマッチを行うことができます。</ p >
389389
390390< span class ='rusttest '> fn main() {
391391 struct Point {
@@ -417,7 +417,7 @@ <h1 id='デストラクチャリング' class='section-header'><a href='#デス
417417<!-- This ‘destructuring’ behavior works on any compound data type, like
418418[tuples][tuples] or [enums][enums]. -->
419419
420- < p > この「デストラクチャリング (destructuring)」 と呼ばれる振る舞いは、 < a href ="primitive-types.html#tuples "> タプル</ a > や < a href ="enums.html "> 列挙型</ a > のような、複合データ型で使用できます 。</ p >
420+ < p > この「分配束縛」 (destructuring) と呼ばれる振る舞いは、 < a href ="primitive-types.html#tuples "> タプル</ a > や < a href ="enums.html "> 列挙型</ a > のような、任意の複合データ型で使用できます 。</ p >
421421
422422<!-- # Ignoring bindings -->
423423
@@ -428,7 +428,7 @@ <h1 id='束縛の無視' class='section-header'><a href='#束縛の無視'>束
428428
429429<!-- For example, here’s a `match` against a `Result<T, E>`: -->
430430
431- < p > 例として、 < code > Result<T, E></ code > に対して < code > match</ code > を適用してみましょう :</ p >
431+ < p > 例として、 < code > Result<T, E></ code > に対して < code > match</ code > をしてみましょう :</ p >
432432
433433< span class ='rusttest '> fn main() {
434434 let some_value: Result<i32, &'static str> = Err("There was an error");
@@ -446,12 +446,12 @@ <h1 id='束縛の無視' class='section-header'><a href='#束縛の無視'>束
446446in the `Err` arm, we use `_` to disregard the specific error, and just print
447447a general error message. -->
448448
449- < p > 最初の部分では < code > Ok</ code > ヴァリアント内の値を < code > value</ code > に結びつけています 。しかし < code > Err</ code > 部分では、特定のエラーを避けて、標準的なエラーメッセージを表示するために < code > _</ code > を使っています。</ p >
449+ < p > 最初の部分では < code > Ok</ code > ヴァリアント内の値に < code > value</ code > を束縛しています 。しかし < code > Err</ code > 部分では、ヴァリアント内のエラー情報を無視して一般的なエラーメッセージを表示するために < code > _</ code > を使っています。</ p >
450450
451451<!-- `_` is valid in any pattern that creates a binding. This can be useful to
452452ignore parts of a larger structure: -->
453453
454- < p > < code > _</ code > は束縛を伴うどんなパターンにおいても有効です。これは大きな構造の一部分を無視する際に有用です 。</ p >
454+ < p > < code > _</ code > は束縛を導入するどのようなパターンにおいても有効です。これは大きな構造の一部を無視する際に有用です 。</ p >
455455
456456< span class ='rusttest '> fn main() {
457457 fn coordinate() -> (i32, i32, i32) {
@@ -471,7 +471,7 @@ <h1 id='束縛の無視' class='section-header'><a href='#束縛の無視'>束
471471<!-- Here, we bind the first and last element of the tuple to `x` and `z`, but
472472ignore the middle element. -->
473473
474- < p > ここでは、タプルの最初と最後の要素を < code > x</ code > と < code > z</ code > に結びつけています 。</ p >
474+ < p > ここでは、タプルの最初と最後の要素に < code > x</ code > と < code > z</ code > を束縛します 。</ p >
475475
476476<!-- Similarly, you can use `..` in a pattern to disregard multiple values. -->
477477
@@ -511,7 +511,7 @@ <h1 id='束縛の無視' class='section-header'><a href='#束縛の無視'>束
511511< h1 id ='ref-と-ref-mut ' class ='section-header '> < a href ='#ref-と-ref-mut '> ref と ref mut</ a > </ h1 >
512512<!-- If you want to get a [reference][ref], use the `ref` keyword:-->
513513
514- < p > もし < a href ="references-and-borrowing.html "> リファレンス </ a > を取得したいときは < code > ref</ code > キーワードを使いましょう。</ p >
514+ < p > < a href ="references-and-borrowing.html "> 参照 </ a > を取得したいときは < code > ref</ code > キーワードを使いましょう。</ p >
515515
516516< span class ='rusttest '> fn main() {
517517 let x = 5;
@@ -534,7 +534,7 @@ <h1 id='ref-と-ref-mut' class='section-header'><a href='#ref-と-ref-mut'>ref
534534keyword _creates_ a reference, for use in the pattern. If you need a mutable
535535reference, `ref mut` will work in the same way: -->
536536
537- < p > ここで < code > match</ code > 内の < code > r</ code > は < code > &i32</ code > 型を持っています。言い換えると < code > ref</ code > キーワードがリファレンスを < em > 作ります </ em > 。</ p >
537+ < p > ここで < code > match</ code > 内の < code > r</ code > は < code > &i32</ code > 型を持っています。言い換えると、 < code > ref</ code > キーワードはパターン内で使う参照を < em > 作り出します </ em > 。ミュータブルな参照が必要な場合は、同様に < code > ref mut </ code > を使います 。</ p >
538538
539539< span class ='rusttest '> fn main() {
540540 let mut x = 5;
@@ -551,10 +551,10 @@ <h1 id='ref-と-ref-mut' class='section-header'><a href='#ref-と-ref-mut'>ref
551551
552552<!-- # Ranges -->
553553
554- < h1 id ='レンジ ' class ='section-header '> < a href ='#レンジ ' > レンジ </ a > </ h1 >
554+ < h1 id ='範囲 ' class ='section-header '> < a href ='#範囲 ' > 範囲 </ a > </ h1 >
555555<!-- You can match a range of values with `...`: -->
556556
557- < p > < code > ...</ code > で値のレンジのマッチを行うことができます :</ p >
557+ < p > < code > ...</ code > で値の範囲をマッチさせることができます :</ p >
558558
559559< span class ='rusttest '> fn main() {
560560 let x = 1;
@@ -577,7 +577,7 @@ <h1 id='レンジ' class='section-header'><a href='#レンジ'>レンジ</a></h1
577577
578578<!-- Ranges are mostly used with integers and `char`s: -->
579579
580- < p > レンジは大体 、整数か < code > char</ code > 型で使われます:</ p >
580+ < p > 範囲は多くの場合 、整数か < code > char</ code > 型で使われます:</ p >
581581
582582< span class ='rusttest '> fn main() {
583583 let x = '💅';
@@ -605,7 +605,7 @@ <h1 id='レンジ' class='section-header'><a href='#レンジ'>レンジ</a></h1
605605< h1 id ='束縛 ' class ='section-header '> < a href ='#束縛 '> 束縛</ a > </ h1 >
606606<!-- You can bind values to names with `@`: -->
607607
608- < p > < code > @</ code > で値を名前と結びつけることができます 。</ p >
608+ < p > < code > @</ code > で値に名前を束縛することができます 。</ p >
609609
610610< span class ='rusttest '> fn main() {
611611 let x = 1;
@@ -626,7 +626,7 @@ <h1 id='束縛' class='section-header'><a href='#束縛'>束縛</a></h1>
626626do a complicated match of part of a data structure: -->
627627
628628< p > これは < code > got a range element 1</ code > を出力します。
629- データ構造の一部に対する複雑なマッチが欲しいときに有用です :</ p >
629+ データ構造の一部に対して複雑なマッチングをしたいときに有用です :</ p >
630630
631631< span class ='rusttest '> fn main() {
632632 #[derive(Debug)]
@@ -655,12 +655,12 @@ <h1 id='束縛' class='section-header'><a href='#束縛'>束縛</a></h1>
655655
656656<!--This prints `Some("Steve")`: we’ve bound the inner `name` to `a`.-->
657657
658- < p > これは < code > Some("Steve")</ code > を出力します。内側の < code > name</ code > を < code > a</ code > に結びつけます 。</ p >
658+ < p > これは < code > Some("Steve")</ code > を出力します。内側の < code > name</ code > の値への参照に < code > a</ code > を束縛します 。</ p >
659659
660660<!-- If you use `@` with `|`, you need to make sure the name is bound in each part
661661of the pattern: -->
662662
663- < p > もし < code > | </ code > で < code > @ </ code > を使うときは、パターンのそれぞれの部分が名前と結びついているか確認する必要があります :</ p >
663+ < p > < code > @ </ code > を < code > | </ code > と組み合わせて使う場合は、それぞれのパターンで同じ名前が束縛されるようにする必要があります :</ p >
664664
665665< span class ='rusttest '> fn main() {
666666 let x = 5;
@@ -717,7 +717,7 @@ <h1 id='ガード' class='section-header'><a href='#ガード'>ガード</a></h1
717717
718718<!--If you’re using `if` with multiple patterns, the `if` applies to both sides:-->
719719
720- < p > 複式パターンで < code > if</ code > を使うと、 < code > if</ code > は両方に適用されます :</ p >
720+ < p > 複式パターンで < code > if</ code > を使うと、 < code > if</ code > は < code > | </ code > の両側に適用されます :</ p >
721721
722722< span class ='rusttest '> fn main() {
723723 let x = 4;
@@ -739,7 +739,7 @@ <h1 id='ガード' class='section-header'><a href='#ガード'>ガード</a></h1
739739<!--This prints `no`, because the `if` applies to the whole of `4 | 5`, and not to
740740just the `5`. In other words, the precedence of `if` behaves like this: -->
741741
742- < p > これは < code > no</ code > を出力します。なぜなら < code > if</ code > は < code > 4 | 5</ code > 全体に適用されるのであって、 < code > 5</ code > 単独に対してではないからです 。つまり < code > if</ code > 節は以下のように振舞います:</ p >
742+ < p > これは < code > no</ code > を出力します。なぜなら < code > if</ code > は < code > 4 | 5</ code > 全体に適用されるのであって、 < code > 5</ code > 単独に対して適用されるのではないからです 。つまり < code > if</ code > 節は以下のように振舞います:</ p >
743743
744744< pre > < code class ="language-text "> (4 | 5) if y => ...
745745</ code > </ pre >
@@ -757,7 +757,7 @@ <h1 id='混ぜてマッチ' class='section-header'><a href='#混ぜてマッチ'
757757<!--Whew! That’s a lot of different ways to match things, and they can all be
758758mixed and matched, depending on what you’re doing: -->
759759
760- < p > ふう、マッチには様々な方法があるのですね。やりたいこと次第で 、それらを混ぜてマッチさせることもできます:</ p >
760+ < p > ふう、マッチには様々な方法があるのですね。やりたいことに応じて 、それらを混ぜてマッチさせることもできます:</ p >
761761
762762< span class ='rusttest '> fn main() {
763763 match x {
0 commit comments