Skip to content

Commit 1c62395

Browse files
committed
Merge pull request #73 from ykomatsu/spaces
マークアップ前後のスペースの追加
2 parents 3f76e29 + bfe7bf6 commit 1c62395

File tree

8 files changed

+191
-191
lines changed

8 files changed

+191
-191
lines changed

1.6/ja/book/advanced-linking.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Rustにおけるリンクの一般的なケースについては本書の前の
1414
<!-- the `link_args` attribute. This attribute is applied to `extern` blocks and -->
1515
<!-- specifies raw flags which need to get passed to the linker when producing an -->
1616
<!-- artifact. An example usage would be: -->
17-
どのようにリンクをカスタマイズするかを`rustc`に指示するために、1つの方法があります。それは、`link_args`アトリビュートを使うことです。
18-
このアトリビュートは`extern`ブロックに適用され、生成物を作るときにリンカに渡したいフラグをそのまま指定します。
17+
どのようにリンクをカスタマイズするかを `rustc` に指示するために、1つの方法があります。それは、 `link_args` アトリビュートを使うことです。
18+
このアトリビュートは `extern` ブロックに適用され、生成物を作るときにリンカに渡したいフラグをそのまま指定します。
1919
使い方の例は次のようになります。
2020

2121
``` no_run
@@ -34,14 +34,14 @@ extern {}
3434
<!-- LLVM directly to link native libraries, in which case `link_args` will have no -->
3535
<!-- meaning. You can achieve the same effect as the `link_args` attribute with the -->
3636
<!-- `-C link-args` argument to `rustc`. -->
37-
これはリンクを実行するための認められた方法ではないため、この機能は現在`feature(link_args)`ゲートによって隠されているということに注意しましょう。
38-
今は`rustc`がシステムリンカ(多くのシステムでは`gcc`、MSVCでは`link.exe`)に渡すので、追加のコマンドライン引数を提供することには意味がありますが、それが今後もそうだとは限りません。
39-
将来、`rustc`がネイティブライブラリをリンクするためにLLVMを直接使うようになるかもしれませんし、そのような場合には`link_args`は意味がなくなるでしょう。
40-
`rustc``-C link-args`引数をつけることで、`link_args`アトリビュートと同じような効果を得ることができます。
37+
これはリンクを実行するための認められた方法ではないため、この機能は現在 `feature(link_args)` ゲートによって隠されているということに注意しましょう。
38+
今は `rustc` がシステムリンカ(多くのシステムでは `gcc` 、MSVCでは `link.exe` )に渡すので、追加のコマンドライン引数を提供することには意味がありますが、それが今後もそうだとは限りません。
39+
将来、 `rustc` がネイティブライブラリをリンクするためにLLVMを直接使うようになるかもしれませんし、そのような場合には `link_args` は意味がなくなるでしょう。
40+
`rustc``-C link-args` 引数をつけることで、 `link_args` アトリビュートと同じような効果を得ることができます。
4141

4242
<!-- It is highly recommended to *not* use this attribute, and rather use the more -->
4343
<!-- formal `#[link(...)]` attribute on `extern` blocks instead. -->
44-
このアトリビュートは使わ *ない* ことが強く推奨されているので、代わりにもっと正式な`#[link(...)]`アトリビュートを`extern`ブロックに使いましょう。
44+
このアトリビュートは使わ *ない* ことが強く推奨されているので、代わりにもっと正式な `#[link(...)]` アトリビュートを `extern` ブロックに使いましょう。
4545

4646
<!-- # Static linking -->
4747
# スタティックリンク
@@ -55,7 +55,7 @@ extern {}
5555
<!-- change this and statically link them as well. -->
5656
スタティックリンクとは全ての必要なライブラリを含めた成果物を生成する手順のことで、そうすればコンパイルされたプロジェクトを使いたいシステム全てにライブラリをインストールする必要がなくなります。
5757
Rustのみで構築された依存関係はデフォルトでスタティックリンクされます。そのため、Rustをインストールしなくても、作成されたバイナリやライブラリを使うことができます。
58-
対照的に、ネイティブライブラリ(例えば`libc``libm`)はダイナミックリンクされるのが普通です。しかし、これを変更してそれらを同様にスタティックリンクすることも可能です。
58+
対照的に、ネイティブライブラリ(例えば `libc``libm` )はダイナミックリンクされるのが普通です。しかし、これを変更してそれらを同様にスタティックリンクすることも可能です。
5959

6060
<!-- Linking is a very platform-dependent topic, and static linking may not even be -->
6161
<!-- possible on some platforms! This section assumes some basic familiarity with -->
@@ -69,8 +69,8 @@ Rustのみで構築された依存関係はデフォルトでスタティック
6969
<!-- By default, all Rust programs on Linux will link to the system `libc` along with -->
7070
<!-- a number of other libraries. Let's look at an example on a 64-bit Linux machine -->
7171
<!-- with GCC and `glibc` (by far the most common `libc` on Linux): -->
72-
デフォルトでは、Linux上の全てのRustのプログラムはシステムの`libc`とその他のいくつものライブラリとリンクされます。
73-
GCCと`glibc`(Linuxにおける最も一般的な`libc`)を使った64ビットLinuxマシンでの例を見てみましょう。
72+
デフォルトでは、Linux上の全てのRustのプログラムはシステムの `libc` とその他のいくつものライブラリとリンクされます。
73+
GCCと `glibc` (Linuxにおける最も一般的な `libc` )を使った64ビットLinuxマシンでの例を見てみましょう。
7474

7575
``` text
7676
$ cat example.rs
@@ -95,8 +95,8 @@ $ ldd example
9595
<!-- Static linking is supported via an alternative `libc`, [`musl`](http://www.musl-libc.org). You can compile -->
9696
<!-- your own version of Rust with `musl` enabled and install it into a custom -->
9797
<!-- directory with the instructions below: -->
98-
スタティックリンクは代わりの`libc`である[`musl`](http://www.musl-libc.org/)によってサポートされています。
99-
以下の手順に従い、`musl`を有効にした独自バージョンのRustをコンパイルして独自のディレクトリにインストールすることができます。
98+
スタティックリンクは代わりの `libc` である [`musl`](http://www.musl-libc.org/) によってサポートされています。
99+
以下の手順に従い、 `musl` を有効にした独自バージョンのRustをコンパイルして独自のディレクトリにインストールすることができます。
100100

101101
```text
102102
$ mkdir musldist
@@ -142,7 +142,7 @@ $ du -h musldist/bin/rustc
142142
<!-- You now have a build of a `musl`-enabled Rust! Because we've installed it to a -->
143143
<!-- custom prefix we need to make sure our system can find the binaries and appropriate -->
144144
<!-- libraries when we try and run it: -->
145-
これで`musl`が有効になったRustのビルドが手に入りました!
145+
これで `musl` が有効になったRustのビルドが手に入りました!
146146
独自のプレフィックスを付けてインストールしたので、試しに実行するときにはシステムがバイナリと適切なライブラリを見付けられることを確かめなければなりません。
147147

148148
```text
@@ -171,5 +171,5 @@ thread '<main>' panicked at 'failed', example.rs:1
171171
<!-- `cargo build` also permits the `--target` option so you should be able to build -->
172172
<!-- your crates as normal. However, you may need to recompile your native libraries -->
173173
<!-- against `musl` before they can be linked against. -->
174-
`cargo build``--target`オプションを受け付けるので、あなたのクレートも普通にビルドできるはずです。
175-
ただし、リンクする前にネイティブライブラリを`musl`向けにリコンパイルする必要はあるかもしれません。
174+
`cargo build``--target` オプションを受け付けるので、あなたのクレートも普通にビルドできるはずです。
175+
ただし、リンクする前にネイティブライブラリを `musl` 向けにリコンパイルする必要はあるかもしれません。

1.6/ja/book/comments.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ let x = 5; // this is also a line comment.
2828
<!-- The other kind of comment is a doc comment. Doc comments use `///` instead of -->
2929
<!-- `//`, and support Markdown notation inside: -->
3030
その他の種類のコメントはドキュメンテーションコメントです。
31-
ドキュメンテーションコメントは`//`の代わりに`///`を使い、その中でMarkdown記法をサポートします。
31+
ドキュメンテーションコメントは `//` の代わりに `///` を使い、その中でMarkdown記法をサポートします。
3232

3333
```rust
3434
# /// Adds one to the number given.
@@ -52,7 +52,7 @@ fn add_one(x: i32) -> i32 {
5252
<!-- There is another style of doc comment, `//!`, to comment containing items (e.g. -->
5353
<!-- crates, modules or functions), instead of the items following it. Commonly used -->
5454
<!-- inside crates root (lib.rs) or modules root (mod.rs): -->
55-
もう1つのスタイルのドキュメンテーションコメントに`//!`があります。これは、その後に続く要素ではなく、それを含んでいる要素(例えばクレート、モジュール、関数)にコメントを付けます。
55+
もう1つのスタイルのドキュメンテーションコメントに `//!` があります。これは、その後に続く要素ではなく、それを含んでいる要素(例えばクレート、モジュール、関数)にコメントを付けます。
5656
一般的にはクレートルート(lib.rs)やモジュールルート(mod.rs)の中で使われます。
5757

5858
```
@@ -68,11 +68,11 @@ fn add_one(x: i32) -> i32 {
6868
<!-- in documentation. There’s another macro, `assert!`, which `panic!`s if the -->
6969
<!-- value passed to it is `false`. -->
7070
ドキュメンテーションコメントを書いているとき、いくつかの使い方の例を提供することは非常に非常に有用です。
71-
ここでは新しいマクロ、`assert_eq!`を使っていることに気付くでしょう。
72-
これは2つの値を比較し、もしそれらが互いに等しくなければ`panic!`します。
71+
ここでは新しいマクロ、 `assert_eq!` を使っていることに気付くでしょう。
72+
これは2つの値を比較し、もしそれらが互いに等しくなければ `panic!` します。
7373
これはドキュメントの中で非常に便利です。
74-
もう1つのマクロ、`assert!`は、それに渡された値が`false`であれば`panic!`します。
74+
もう1つのマクロ、 `assert!` は、それに渡された値が `false` であれば `panic!` します。
7575

7676
<!-- You can use the [`rustdoc`](documentation.html) tool to generate HTML documentation -->
7777
<!-- from these doc comments, and also to run the code examples as tests! -->
78-
それらのドキュメンテーションコメントからHTMLドキュメントを生成するため、そしてコード例をテストとして実行するためにも[`rustdoc`](documentation.html)ツールを使うことができます!
78+
それらのドキュメンテーションコメントからHTMLドキュメントを生成するため、そしてコード例をテストとして実行するためにも [`rustdoc`](documentation.html) ツールを使うことができます!

0 commit comments

Comments
 (0)