Skip to content

Commit f24b181

Browse files
committed
ci: generate pages at 3301673 [ci skip]
1 parent 3301673 commit f24b181

File tree

6 files changed

+64
-12
lines changed

6 files changed

+64
-12
lines changed

docs/mod/visibility.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ <h1 id="プライベートとパブリック"><a class="header" href="#プライ
179179
}
180180

181181
// Modules can also be nested
182+
// モジュールもネストできる
182183
pub mod nested {
183184
pub fn function() {
184185
println!(&quot;called `my_mod::nested::function()`&quot;);
@@ -191,19 +192,24 @@ <h1 id="プライベートとパブリック"><a class="header" href="#プライ
191192

192193
// Functions declared using `pub(in path)` syntax are only visible
193194
// within the given path. `path` must be a parent or ancestor module
195+
// `pub(in path)`形式で宣言された関数は該当のパス内でのみアクセスできる。
196+
// `path`は親や先祖のモジュールでなくてはならない。
194197
pub(in crate::my_mod) fn public_function_in_my_mod() {
195198
print!(&quot;called `my_mod::nested::public_function_in_my_mod()`, that\n&gt; &quot;);
196199
public_function_in_nested();
197200
}
198201

199202
// Functions declared using `pub(self)` syntax are only visible within
200203
// the current module, which is the same as leaving them private
204+
// `pub(self)`形式で宣言された関数は現在のモジュール内でのみアクセスできる。
205+
// つまり、プライベートにするのと同じである。
201206
pub(self) fn public_function_in_nested() {
202207
println!(&quot;called `my_mod::nested::public_function_in_nested()`&quot;);
203208
}
204209

205210
// Functions declared using `pub(super)` syntax are only visible within
206211
// the parent module
212+
// `pub(super)`形式で宣言された関数は親モジュール内でのみアクセスできる。
207213
pub(super) fn public_function_in_super_mod() {
208214
println!(&quot;called `my_mod::nested::public_function_in_super_mod()`&quot;);
209215
}
@@ -217,6 +223,7 @@ <h1 id="プライベートとパブリック"><a class="header" href="#プライ
217223
}
218224

219225
// pub(crate) makes functions visible only within the current crate
226+
// pub(crate)により関数は現在のクレート内でのみアクセスできる。
220227
pub(crate) fn public_function_in_crate() {
221228
println!(&quot;called `my_mod::public_function_in_crate()`&quot;);
222229
}
@@ -231,6 +238,8 @@ <h1 id="プライベートとパブリック"><a class="header" href="#プライ
231238

232239
// Private parent items will still restrict the visibility of a child item,
233240
// even if it is declared as visible within a bigger scope.
241+
// 親がプライベートな場合、子要素がより大きなスコープでアクセスできるように宣言されていても、
242+
// 子要素にアクセス可能な範囲は制限されます。
234243
#[allow(dead_code)]
235244
pub(crate) fn restricted_function() {
236245
println!(&quot;called `my_mod::private_nested::restricted_function()`&quot;);
@@ -257,12 +266,16 @@ <h1 id="プライベートとパブリック"><a class="header" href="#プライ
257266
my_mod::call_public_function_in_my_mod();
258267

259268
// pub(crate) items can be called from anywhere in the same crate
269+
// pub(crate)の要素は同じクレートのどこからでも呼び出すことができる。
260270
my_mod::public_function_in_crate();
261271

262272
// pub(in path) items can only be called from within the module specified
263273
// Error! function `public_function_in_my_mod` is private
274+
// pub(in path)の要素は指定されたモジュールからのみ呼び出すことができる。
275+
// エラー! `public_function_in_my_mod`関数はプライベート。
264276
//my_mod::nested::public_function_in_my_mod();
265277
// TODO ^ Try uncommenting this line
278+
// TODO ^ 試しにこの行をアンコメントしてみましょう。
266279

267280
// Private items of a module cannot be directly accessed, even if
268281
// nested in a public module:
@@ -282,14 +295,16 @@ <h1 id="プライベートとパブリック"><a class="header" href="#プライ
282295
// TODO ^ 試しにこの行をアンコメントしてみましょう。
283296

284297
// Error! `private_nested` is a private module
285-
// エラー!`private_nested`はプライベートなモジュール
298+
// エラー!`private_nested`はプライベートなモジュール。
286299
//my_mod::private_nested::function();
287300
// TODO ^ Try uncommenting this line
288301
// TODO ^ 試しにこの行をアンコメントしてみましょう。
289302

290303
// Error! `private_nested` is a private module
304+
// エラー! `private_nested`はプライベートなモジュール。
291305
//my_mod::private_nested::restricted_function();
292306
// TODO ^ Try uncommenting this line
307+
// TODO ^ 試しにこの行をアンコメントしてみましょう。
293308
}</code></pre></pre>
294309

295310
</main>

docs/primitives/literals.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,12 @@ <h1 id="リテラルとオペレータ"><a class="header" href="#リテラルと
164164
`1_000` is the same as `1000`, and `0.000_001` is the same as `0.000001`.
165165
-->
166166
<p>可読性のため、<code>_</code>(アンダースコア)を数値リテラルの間に挿入することができます。例えば<code>1_000</code><code>1000</code>と、<code>0.000_001</code><code>0.000001</code>とそれぞれ同一です。</p>
167-
<p>Rust also supports scientific <a href="https://en.wikipedia.org/wiki/Scientific_notation#E_notation">E-notation</a>, e.g. <code>1e6</code>, <code>7.6e-4</code>. The
168-
associated type is <code>f64</code>.</p>
167+
<!--
168+
Rust also supports scientific [E-notation][enote], e.g. `1e6`, `7.6e-4`. The
169+
associated type is `f64`.
170+
-->
171+
<p>また、Rustは<code>1e6</code><code>7.6e-4</code>などの科学的な<a href="https://en.wikipedia.org/wiki/Scientific_notation#E_notation">E表記</a>をサポートしています。
172+
関連型は<code>f64</code>です。</p>
169173
<!--
170174
We need to tell the compiler the type of the literals we use. For now,
171175
we'll use the `u32` suffix to indicate that the literal is an unsigned 32-bit
@@ -189,6 +193,7 @@ <h1 id="リテラルとオペレータ"><a class="header" href="#リテラルと
189193
// TODO ^ 型が重要であることを実感するため`1i32`を`1u32`に変更してみましょう。
190194

191195
// Scientific notation
196+
// 科学的表記
192197
println!(&quot;1e4 is {}, -2.5e-3 is {}&quot;, 1e4, -2.5e-3);
193198

194199
// Short-circuiting boolean logic

docs/print.html

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,8 +1211,12 @@ <h1 id="リテラルとオペレータ"><a class="header" href="#リテラルと
12111211
`1_000` is the same as `1000`, and `0.000_001` is the same as `0.000001`.
12121212
-->
12131213
<p>可読性のため、<code>_</code>(アンダースコア)を数値リテラルの間に挿入することができます。例えば<code>1_000</code>は<code>1000</code>と、<code>0.000_001</code>は<code>0.000001</code>とそれぞれ同一です。</p>
1214-
<p>Rust also supports scientific <a href="https://en.wikipedia.org/wiki/Scientific_notation#E_notation">E-notation</a>, e.g. <code>1e6</code>, <code>7.6e-4</code>. The
1215-
associated type is <code>f64</code>.</p>
1214+
<!--
1215+
Rust also supports scientific [E-notation][enote], e.g. `1e6`, `7.6e-4`. The
1216+
associated type is `f64`.
1217+
-->
1218+
<p>また、Rustは<code>1e6</code>や<code>7.6e-4</code>などの科学的な<a href="https://en.wikipedia.org/wiki/Scientific_notation#E_notation">E表記</a>をサポートしています。
1219+
関連型は<code>f64</code>です。</p>
12161220
<!--
12171221
We need to tell the compiler the type of the literals we use. For now,
12181222
we'll use the `u32` suffix to indicate that the literal is an unsigned 32-bit
@@ -1236,6 +1240,7 @@ <h1 id="リテラルとオペレータ"><a class="header" href="#リテラルと
12361240
// TODO ^ 型が重要であることを実感するため`1i32`を`1u32`に変更してみましょう。
12371241

12381242
// Scientific notation
1243+
// 科学的表記
12391244
println!(&quot;1e4 is {}, -2.5e-3 is {}&quot;, 1e4, -2.5e-3);
12401245

12411246
// Short-circuiting boolean logic
@@ -4859,6 +4864,7 @@ <h1 id="プライベートとパブリック"><a class="header" href="#プライ
48594864
}
48604865

48614866
// Modules can also be nested
4867+
// モジュールもネストできる
48624868
pub mod nested {
48634869
pub fn function() {
48644870
println!(&quot;called `my_mod::nested::function()`&quot;);
@@ -4871,19 +4877,24 @@ <h1 id="プライベートとパブリック"><a class="header" href="#プライ
48714877

48724878
// Functions declared using `pub(in path)` syntax are only visible
48734879
// within the given path. `path` must be a parent or ancestor module
4880+
// `pub(in path)`形式で宣言された関数は該当のパス内でのみアクセスできる。
4881+
// `path`は親や先祖のモジュールでなくてはならない。
48744882
pub(in crate::my_mod) fn public_function_in_my_mod() {
48754883
print!(&quot;called `my_mod::nested::public_function_in_my_mod()`, that\n&gt; &quot;);
48764884
public_function_in_nested();
48774885
}
48784886

48794887
// Functions declared using `pub(self)` syntax are only visible within
48804888
// the current module, which is the same as leaving them private
4889+
// `pub(self)`形式で宣言された関数は現在のモジュール内でのみアクセスできる。
4890+
// つまり、プライベートにするのと同じである。
48814891
pub(self) fn public_function_in_nested() {
48824892
println!(&quot;called `my_mod::nested::public_function_in_nested()`&quot;);
48834893
}
48844894

48854895
// Functions declared using `pub(super)` syntax are only visible within
48864896
// the parent module
4897+
// `pub(super)`形式で宣言された関数は親モジュール内でのみアクセスできる。
48874898
pub(super) fn public_function_in_super_mod() {
48884899
println!(&quot;called `my_mod::nested::public_function_in_super_mod()`&quot;);
48894900
}
@@ -4897,6 +4908,7 @@ <h1 id="プライベートとパブリック"><a class="header" href="#プライ
48974908
}
48984909

48994910
// pub(crate) makes functions visible only within the current crate
4911+
// pub(crate)により関数は現在のクレート内でのみアクセスできる。
49004912
pub(crate) fn public_function_in_crate() {
49014913
println!(&quot;called `my_mod::public_function_in_crate()`&quot;);
49024914
}
@@ -4911,6 +4923,8 @@ <h1 id="プライベートとパブリック"><a class="header" href="#プライ
49114923

49124924
// Private parent items will still restrict the visibility of a child item,
49134925
// even if it is declared as visible within a bigger scope.
4926+
// 親がプライベートな場合、子要素がより大きなスコープでアクセスできるように宣言されていても、
4927+
// 子要素にアクセス可能な範囲は制限されます。
49144928
#[allow(dead_code)]
49154929
pub(crate) fn restricted_function() {
49164930
println!(&quot;called `my_mod::private_nested::restricted_function()`&quot;);
@@ -4937,12 +4951,16 @@ <h1 id="プライベートとパブリック"><a class="header" href="#プライ
49374951
my_mod::call_public_function_in_my_mod();
49384952

49394953
// pub(crate) items can be called from anywhere in the same crate
4954+
// pub(crate)の要素は同じクレートのどこからでも呼び出すことができる。
49404955
my_mod::public_function_in_crate();
49414956

49424957
// pub(in path) items can only be called from within the module specified
49434958
// Error! function `public_function_in_my_mod` is private
4959+
// pub(in path)の要素は指定されたモジュールからのみ呼び出すことができる。
4960+
// エラー! `public_function_in_my_mod`関数はプライベート。
49444961
//my_mod::nested::public_function_in_my_mod();
49454962
// TODO ^ Try uncommenting this line
4963+
// TODO ^ 試しにこの行をアンコメントしてみましょう。
49464964

49474965
// Private items of a module cannot be directly accessed, even if
49484966
// nested in a public module:
@@ -4962,14 +4980,16 @@ <h1 id="プライベートとパブリック"><a class="header" href="#プライ
49624980
// TODO ^ 試しにこの行をアンコメントしてみましょう。
49634981

49644982
// Error! `private_nested` is a private module
4965-
// エラー!`private_nested`はプライベートなモジュール
4983+
// エラー!`private_nested`はプライベートなモジュール。
49664984
//my_mod::private_nested::function();
49674985
// TODO ^ Try uncommenting this line
49684986
// TODO ^ 試しにこの行をアンコメントしてみましょう。
49694987

49704988
// Error! `private_nested` is a private module
4989+
// エラー! `private_nested`はプライベートなモジュール。
49714990
//my_mod::private_nested::restricted_function();
49724991
// TODO ^ Try uncommenting this line
4992+
// TODO ^ 試しにこの行をアンコメントしてみましょう。
49734993
}</code></pre></pre>
49744994
<div style="break-before: page; page-break-before: always;"></div><!--
49754995
# Struct visibility
@@ -7445,17 +7465,21 @@ <h1 id="エイリアス-1"><a class="header" href="#エイリアス-1">エイリ
74457465
// ミュータブルに借用することができない。
74467466
// let mutable_borrow = &amp;mut point;
74477467
// TODO ^ Try uncommenting this line
7468+
// TODO ^ この行をアンコメントしてみましょう。
74487469

74497470
// The borrowed values are used again here
7471+
// 借用された値はここで再び利用されます。
74507472
println!(&quot;Point has coordinates: ({}, {}, {})&quot;,
74517473
borrowed_point.x, another_borrow.y, point.z);
74527474

74537475
// The immutable references are no longer used for the rest of the code so
74547476
// it is possible to reborrow with a mutable reference.
7477+
// イミュータブルな参照がこれ以降のコードで利用されていないため、
7478+
// ミュータブルな参照として再借用できます。
74557479
let mutable_borrow = &amp;mut point;
74567480

74577481
// Change data via mutable reference
7458-
// ミュータブルなリファレンスを介してデータを変更する
7482+
// ミュータブルな参照を介してデータを変更する
74597483
mutable_borrow.x = 5;
74607484
mutable_borrow.y = 2;
74617485
mutable_borrow.z = 1;
@@ -7469,17 +7493,19 @@ <h1 id="エイリアス-1"><a class="header" href="#エイリアス-1">エイリ
74697493
// TODO ^ この行をアンコメントしてみましょう。
74707494

74717495
// Error! Can't print because `println!` takes an immutable reference.
7472-
// エラー!`println!`はイミュータブルなリファレンスを取るため、printできません。
7496+
// エラー!`println!`はイミュータブルな参照を取るため、printできません。
74737497
// println!(&quot;Point Z coordinate is {}&quot;, point.z);
74747498
// TODO ^ Try uncommenting this line
74757499
// TODO ^ この行をアンコメントしてみましょう。
74767500

74777501
// Ok! Mutable references can be passed as immutable to `println!`
7502+
// OK!ミュータブルな参照は`println!`にイミュータブルな参照として渡せます。
74787503
println!(&quot;Point has coordinates: ({}, {}, {})&quot;,
74797504
mutable_borrow.x, mutable_borrow.y, mutable_borrow.z);
74807505

74817506
// The mutable reference is no longer used for the rest of the code so it
74827507
// is possible to reborrow
7508+
// ミュータブルな参照がこれ以降のコードで利用されていないため、再借用できます。
74837509
let new_borrowed_point = &amp;point;
74847510
println!(&quot;Point now has coordinates: ({}, {}, {})&quot;,
74857511
new_borrowed_point.x, new_borrowed_point.y, new_borrowed_point.z);

docs/scope/borrow/alias.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,21 @@ <h1 id="エイリアス"><a class="header" href="#エイリアス">エイリア
175175
// ミュータブルに借用することができない。
176176
// let mutable_borrow = &amp;mut point;
177177
// TODO ^ Try uncommenting this line
178+
// TODO ^ この行をアンコメントしてみましょう。
178179

179180
// The borrowed values are used again here
181+
// 借用された値はここで再び利用されます。
180182
println!(&quot;Point has coordinates: ({}, {}, {})&quot;,
181183
borrowed_point.x, another_borrow.y, point.z);
182184

183185
// The immutable references are no longer used for the rest of the code so
184186
// it is possible to reborrow with a mutable reference.
187+
// イミュータブルな参照がこれ以降のコードで利用されていないため、
188+
// ミュータブルな参照として再借用できます。
185189
let mutable_borrow = &amp;mut point;
186190

187191
// Change data via mutable reference
188-
// ミュータブルなリファレンスを介してデータを変更する
192+
// ミュータブルな参照を介してデータを変更する
189193
mutable_borrow.x = 5;
190194
mutable_borrow.y = 2;
191195
mutable_borrow.z = 1;
@@ -199,17 +203,19 @@ <h1 id="エイリアス"><a class="header" href="#エイリアス">エイリア
199203
// TODO ^ この行をアンコメントしてみましょう。
200204

201205
// Error! Can't print because `println!` takes an immutable reference.
202-
// エラー!`println!`はイミュータブルなリファレンスを取るため、printできません。
206+
// エラー!`println!`はイミュータブルな参照を取るため、printできません。
203207
// println!(&quot;Point Z coordinate is {}&quot;, point.z);
204208
// TODO ^ Try uncommenting this line
205209
// TODO ^ この行をアンコメントしてみましょう。
206210

207211
// Ok! Mutable references can be passed as immutable to `println!`
212+
// OK!ミュータブルな参照は`println!`にイミュータブルな参照として渡せます。
208213
println!(&quot;Point has coordinates: ({}, {}, {})&quot;,
209214
mutable_borrow.x, mutable_borrow.y, mutable_borrow.z);
210215

211216
// The mutable reference is no longer used for the rest of the code so it
212217
// is possible to reborrow
218+
// ミュータブルな参照がこれ以降のコードで利用されていないため、再借用できます。
213219
let new_borrowed_point = &amp;point;
214220
println!(&quot;Point now has coordinates: ({}, {}, {})&quot;,
215221
new_borrowed_point.x, new_borrowed_point.y, new_borrowed_point.z);

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)