Skip to content

Commit 5e49aad

Browse files
committed
ci: generate pages at 24ab2be [ci skip]
1 parent 24ab2be commit 5e49aad

File tree

5 files changed

+36
-12
lines changed

5 files changed

+36
-12
lines changed

docs/fn/closures.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,12 @@ <h1 id="クロージャ"><a class="header" href="#クロージャ">クロージ
179179
let outer_var = 42;
180180

181181
// A regular function can't refer to variables in the enclosing environment
182-
// Increment via closures and functions.
183-
// 関数とクロージャのそれぞれで数値をインクリメントする
182+
// 通常の関数は周辺の環境の変数を参照できない。
184183
//fn function(i: i32) -&gt; i32 { i + outer_var }
185184
// TODO: uncomment the line above and see the compiler error. The compiler
186185
// suggests that we define a closure instead.
186+
// TODO: 上の行をアンコメントしてコンパイラエラーを見てみよう。
187+
// 代わりにクロージャを定義することをコンパイラが提案してくれる。
187188

188189
// Closures are anonymous, here we are binding them to references
189190
// Annotation is identical to function annotation but is optional
@@ -200,8 +201,10 @@ <h1 id="クロージャ"><a class="header" href="#クロージャ">クロージ
200201
println!(&quot;closure_annotated: {}&quot;, closure_annotated(1));
201202
println!(&quot;closure_inferred: {}&quot;, closure_inferred(1));
202203
// Once closure's type has been inferred, it cannot be inferred again with another type.
204+
// クロージャの型が一度推論されると、別の型にあらためて推論することはできない。
203205
//println!(&quot;cannot reuse closure_inferred with another type: {}&quot;, closure_inferred(42i64));
204206
// TODO: uncomment the line above and see the compiler error.
207+
// TODO: 上の行をアンコメントしてコンパイルエラーを見てみよう。
205208

206209
// A closure taking no arguments which returns an `i32`.
207210
// The return type is inferred.

docs/print.html

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4082,11 +4082,12 @@ <h1 id="クロージャ"><a class="header" href="#クロージャ">クロージ
40824082
let outer_var = 42;
40834083

40844084
// A regular function can't refer to variables in the enclosing environment
4085-
// Increment via closures and functions.
4086-
// 関数とクロージャのそれぞれで数値をインクリメントする
4085+
// 通常の関数は周辺の環境の変数を参照できない。
40874086
//fn function(i: i32) -&gt; i32 { i + outer_var }
40884087
// TODO: uncomment the line above and see the compiler error. The compiler
40894088
// suggests that we define a closure instead.
4089+
// TODO: 上の行をアンコメントしてコンパイラエラーを見てみよう。
4090+
// 代わりにクロージャを定義することをコンパイラが提案してくれる。
40904091

40914092
// Closures are anonymous, here we are binding them to references
40924093
// Annotation is identical to function annotation but is optional
@@ -4103,8 +4104,10 @@ <h1 id="クロージャ"><a class="header" href="#クロージャ">クロージ
41034104
println!(&quot;closure_annotated: {}&quot;, closure_annotated(1));
41044105
println!(&quot;closure_inferred: {}&quot;, closure_inferred(1));
41054106
// Once closure's type has been inferred, it cannot be inferred again with another type.
4107+
// クロージャの型が一度推論されると、別の型にあらためて推論することはできない。
41064108
//println!(&quot;cannot reuse closure_inferred with another type: {}&quot;, closure_inferred(42i64));
41074109
// TODO: uncomment the line above and see the compiler error.
4110+
// TODO: 上の行をアンコメントしてコンパイルエラーを見てみよう。
41084111

41094112
// A closure taking no arguments which returns an `i32`.
41104113
// The return type is inferred.
@@ -7684,23 +7687,32 @@ <h1 id="ライフタイム"><a class="header" href="#ライフタイム">ライ
76847687
// のスコープを完全に包含します。`borrow1`と`borrow2`の存続期間は一切重なりません。
76857688
fn main() {
76867689
let i = 3; // Lifetime for `i` starts. ────────────────┐
7690+
// `i`のライフタイム開始 │
76877691
// │
76887692
{ // │
76897693
let borrow1 = &amp;i; // `borrow1` lifetime starts. ──┐│
7694+
// `borrow1`のライフタイム開始 ││
76907695
// ││
76917696
println!(&quot;borrow1: {}&quot;, borrow1); // ││
76927697
} // `borrow1` ends. ─────────────────────────────────┘│
7698+
// `borrow1`終了 │
76937699
// │
76947700
// │
76957701
{ // │
76967702
let borrow2 = &amp;i; // `borrow2` lifetime starts. ──┐│
7703+
// `borrow2`のライフタイム開始 ││
76977704
// ││
76987705
println!(&quot;borrow2: {}&quot;, borrow2); // ││
76997706
} // `borrow2` ends. ─────────────────────────────────┘│
7707+
// `borrow2`終了 │
77007708
// │
7701-
} // Lifetime ends. ─────────────────────────────────────┘</code></pre></pre>
7702-
<p>Note that no names or types are assigned to label lifetimes.
7703-
This restricts how lifetimes will be able to be used as we will see.</p>
7709+
} // Lifetime ends. ─────────────────────────────────────┘
7710+
// ライフタイム終了</code></pre></pre>
7711+
<!--
7712+
Note that no names or types are assigned to label lifetimes.
7713+
This restricts how lifetimes will be able to be used as we will see.
7714+
-->
7715+
<p>ここで、一切の名前や型がライフタイムにアサインされていないことに注意しましょう。これにより、ライフタイムの使われ方がこれから見ていくようなやり方に制限されます。</p>
77047716
<div style="break-before: page; page-break-before: always;"></div><!--
77057717
# Explicit annotation
77067718
-->

docs/scope/lifetime.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,23 +178,32 @@ <h1 id="ライフタイム"><a class="header" href="#ライフタイム">ライ
178178
// のスコープを完全に包含します。`borrow1`と`borrow2`の存続期間は一切重なりません。
179179
fn main() {
180180
let i = 3; // Lifetime for `i` starts. ────────────────┐
181+
// `i`のライフタイム開始 │
181182
// │
182183
{ // │
183184
let borrow1 = &amp;i; // `borrow1` lifetime starts. ──┐│
185+
// `borrow1`のライフタイム開始 ││
184186
// ││
185187
println!(&quot;borrow1: {}&quot;, borrow1); // ││
186188
} // `borrow1` ends. ─────────────────────────────────┘│
189+
// `borrow1`終了 │
187190
// │
188191
// │
189192
{ // │
190193
let borrow2 = &amp;i; // `borrow2` lifetime starts. ──┐│
194+
// `borrow2`のライフタイム開始 ││
191195
// ││
192196
println!(&quot;borrow2: {}&quot;, borrow2); // ││
193197
} // `borrow2` ends. ─────────────────────────────────┘│
198+
// `borrow2`終了 │
194199
// │
195-
} // Lifetime ends. ─────────────────────────────────────┘</code></pre></pre>
196-
<p>Note that no names or types are assigned to label lifetimes.
197-
This restricts how lifetimes will be able to be used as we will see.</p>
200+
} // Lifetime ends. ─────────────────────────────────────┘
201+
// ライフタイム終了</code></pre></pre>
202+
<!--
203+
Note that no names or types are assigned to label lifetimes.
204+
This restricts how lifetimes will be able to be used as we will see.
205+
-->
206+
<p>ここで、一切の名前や型がライフタイムにアサインされていないことに注意しましょう。これにより、ライフタイムの使われ方がこれから見ていくようなやり方に制限されます。</p>
198207

199208
</main>
200209

docs/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/searchindex.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)