Skip to content

Commit 7cc70fc

Browse files
committed
generate
1 parent 0d7abb4 commit 7cc70fc

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

public/1.6/book/slice-patterns.html

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<meta name="generator" content="rustdoc">
7-
<title>Slice patterns</title>
7+
<title>スライスパターン</title>
88

99
<link rel="stylesheet" type="text/css" href="rustbook.css">
1010

@@ -185,9 +185,14 @@
185185
<div id='page'>
186186

187187

188-
<h1 class="title">Slice patterns</h1>
189-
<p>If you want to match against a slice or array, you can use <code>&amp;</code> with the
190-
<code>slice_patterns</code> feature:</p>
188+
<h1 class="title">スライスパターン</h1>
189+
<!-- % Slice patterns -->
190+
191+
<!-- If you want to match against a slice or array, you can use `&` with the -->
192+
193+
<!-- `slice_patterns` feature: -->
194+
195+
<p>スライスや配列に対してマッチを行いたい場合、 <code>slice_patterns</code> フィーチャを有効にすると以下のように <code>&amp;</code> を使うことができます。</p>
191196
<span class='rusttest'>#![feature(slice_patterns)]
192197

193198
fn main() {
@@ -210,10 +215,15 @@ <h1 class="title">Slice patterns</h1>
210215
}
211216
}</pre>
212217

213-
<p>The <code>advanced_slice_patterns</code> gate lets you use <code>..</code> to indicate any number of
214-
elements inside a pattern matching a slice. This wildcard can only be used once
215-
for a given array. If there&#39;s an identifier before the <code>..</code>, the result of the
216-
slice will be bound to that name. For example:</p>
218+
<!-- The `advanced_slice_patterns` gate lets you use `..` to indicate any number of -->
219+
220+
<!-- elements inside a pattern matching a slice. This wildcard can only be used once -->
221+
222+
<!-- for a given array. If there's an identifier before the `..`, the result of the -->
223+
224+
<!-- slice will be bound to that name. For example: -->
225+
226+
<p><code>advanced_slice_patterns</code> フィーチャを有効にすると、スライスにマッチするパターンの中で <code>..</code> を使ってその要素の数が任意であることを示すことができます。このワイルドカードは与えるパターン配列の中で一度だけ使うことができます。もし <code>..</code> の前に識別子(訳注: 以下の例では <code>inside</code> )があれば、そのスライスの結果はその識別子名に束縛されます。例えば以下のようになります。</p>
217227
<span class='rusttest'>#![feature(advanced_slice_patterns, slice_patterns)]
218228

219229
fn is_symmetric(list: &amp;[u32]) -&gt; bool {

0 commit comments

Comments
 (0)