Skip to content

Commit b428574

Browse files
authored
Merge pull request #147 from kdnakt/translate-using_lib
Translate untranslated lines in using_lib.md
2 parents 50c8d5d + 00aab9d commit b428574

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/SUMMARY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@
180180
- [Using a Library](crates/using_lib.md)
181181
-->
182182
- [クレート](crates.md)
183-
- [Creating a Library](crates/lib.md)
184-
- [Using a Library](crates/using_lib.md)
183+
- [ライブラリ](crates/lib.md)
184+
- [ライブラリの利用](crates/using_lib.md)
185185

186186
- [Cargo](cargo.md)
187187
- [Dependencies](cargo/deps.md)

src/crates/using_lib.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
1+
<!--
12
# Using a Library
3+
-->
4+
# ライブラリの利用
25

6+
<!--
37
To link a crate to this new library you may use `rustc`'s `--extern` flag. All
48
of its items will then be imported under a module named the same as the library.
59
This module generally behaves the same way as any other module.
10+
-->
11+
クレートをこの新しいライブラリにリンクするには、`rustc``--extern`フラグを利用します。
12+
クレートの要素を全てライブラリと同じ名前のモジュールにインポートします。
13+
一般に、このモジュールは他のモジュールと同じように振る舞います。
614

715
```rust,ignore
816
// extern crate rary; // May be required for Rust 2015 edition or earlier
17+
// Rust 2015以前で必要
918
1019
fn main() {
1120
rary::public_function();
1221
1322
// Error! `private_function` is private
23+
// エラー!`private_function`はプライベート
1424
//rary::private_function();
1525
1626
rary::indirect_access();
@@ -20,6 +30,8 @@ fn main() {
2030
```txt
2131
# Where library.rlib is the path to the compiled library, assumed that it's
2232
# in the same directory here:
33+
# library.rlibがコンパイルされたライブラリのパスで、
34+
# 同じディレクトリにあるものとする:
2335
$ rustc executable.rs --extern rary=library.rlib && ./executable
2436
called rary's `public_function()`
2537
called rary's `indirect_access()`, that

0 commit comments

Comments
 (0)