Skip to content

Commit 093a312

Browse files
committed
Update Using Rust without the Standard Library to 1.9
1 parent 66a52ad commit 093a312

File tree

2 files changed

+7
-31
lines changed

2 files changed

+7
-31
lines changed

1.9/ja/book/using-rust-without-the-standard-library.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<!-- allocation, and others. There are systems that do not have these features, -->
77
<!-- however, and Rust can work with those too! To do so, we tell Rust that we -->
88
<!-- don’t want to use the standard library via an attribute: `#![no_std]`. -->
9-
Rustの標準ライブラリは多くの便利な機能を提供している一方で、
10-
スレッド、ネットワーク、ヒープアロケーション、その他の多くの機能をホストシステムが提供していることを前提としています
11-
一方で、それらの機能を提供していないシステムも存在します。しかし、Rustはそれらの上でも利用することができます!
9+
Rustの標準ライブラリは多くの便利な機能を提供している一方で、スレッド、ネットワーク、ヒープアロケーション、その他の多くの機能をホストシステムが提供していることを前提としています。
10+
一方で、それらの機能を提供していないシステムも存在します
11+
しかし、Rustはそれらの上でも利用することができます
1212
それは、Rustに標準ライブラリを利用しないということを `#![no_std]` アトリビュートを利用して伝えることで可能となります。
1313

1414

@@ -20,7 +20,7 @@ Rustの標準ライブラリは多くの便利な機能を提供している一
2020
> 例えば、 `#![no_std]` を含んだ _ライブラリ_ は 安定版でビルド可能ですが、 _バイナリ_ はビルド不可能です。
2121
> 標準ライブラリを利用しないバイナリについては [`#![no_std]` についての不安定版のドキュメント](no-stdlib.html) を確認してください。
2222
23-
<!-- To use `#![no_std]`, add a it to your crate root: -->
23+
<!-- To use `#![no_std]`, add it to your crate root: -->
2424
`#![no_std]` アトリビュートを利用するには、クレートのトップに以下のように追加します:
2525

2626
```rust
@@ -35,16 +35,13 @@ fn plus_one(x: i32) -> i32 {
3535
<!-- available via the [`core` crate](../core/). When we’re using the standard -->
3636
<!-- library, Rust automatically brings `std` into scope, allowing you to use -->
3737
<!-- its features without an explicit import. By the same token, when using -->
38-
<!-- `!#[no_std]`, Rust will bring `core` into scope for you, as well as [its -->
38+
<!-- `#![no_std]`, Rust will bring `core` into scope for you, as well as [its -->
3939
<!-- prelude](../core/prelude/v1/). This means that a lot of code will Just Work: -->
4040
標準ライブラリで提供されている多くの機能は [`core` クレート](../core/) を用いることでも利用できます。
41-
標準ライブラリを利用しているとき、Rustは自動的に `std` をスコープに導入し、
42-
標準ライブラリの機能を明示的にインポートすること無しに利用可能にします。
43-
それと同じように、もし `#![no_std]` を利用しているときは、
44-
Rustは自動的に `core`[そのプレリュード](../core/prelude/v1/) をスコープに導入します。
41+
標準ライブラリを利用しているとき、Rustは自動的に `std` をスコープに導入し、標準ライブラリの機能を明示的にインポートすること無しに利用可能にします。
42+
それと同じように、もし `#![no_std]` を利用しているときは、Rustは自動的に `core`[そのプレリュード](../core/prelude/v1/) をスコープに導入します。
4543
これは、例えば多くの以下のようなコードが動作することを意味しています:
4644

47-
4845
```rust
4946
#![no_std]
5047

diff-1.6.0..1.9.0/src/doc/book/using-rust-without-the-standard-library.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)