Skip to content

Commit a43d10c

Browse files
authored
Merge pull request #176 from kdnakt/translate-trait
Translate untranslated lines in trait.md
2 parents d0462bd + a5c8bb1 commit a43d10c

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268
- [関数](scope/lifetime/fn.md)
269269
- [メソッド](scope/lifetime/methods.md)
270270
- [構造体](scope/lifetime/struct.md)
271-
- [Traits](scope/lifetime/trait.md)
271+
- [トレイト](scope/lifetime/trait.md)
272272
- [ライフタイム境界](scope/lifetime/lifetime_bounds.md)
273273
- [圧縮](scope/lifetime/lifetime_coercion.md)
274274
- [スタティックライフタイム](scope/lifetime/static_lifetime.md)

src/scope/lifetime/trait.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
1+
<!--
12
# Traits
3+
-->
4+
# トレイト
25

6+
<!--
37
Annotation of lifetimes in trait methods basically are similar to functions.
48
Note that `impl` may have annotation of lifetimes too.
9+
-->
10+
トレイトのメソッドにおけるライフタイムのアノテーションは、
11+
基本的には関数に似ています。
12+
`impl`にもライフタイムのアノテーションがあることに注意してください。
513

614
```rust,editable
715
// A struct with annotation of lifetimes.
16+
// ライフタイムのアノテーションつき構造体。
817
#[derive(Debug)]
918
struct Borrowed<'a> {
1019
x: &'a i32,
1120
}
1221
1322
// Annotate lifetimes to impl.
23+
// ライフタイムのアノテーションつきimpl。
1424
impl<'a> Default for Borrowed<'a> {
1525
fn default() -> Self {
1626
Self {
@@ -30,7 +40,10 @@ fn main() {
3040
-->
3141
### 参照
3242

43+
<!--
3344
[`trait`s][trait]
45+
-->
46+
[トレイト][trait]
3447

3548

3649
[trait]: ../../trait.md

0 commit comments

Comments
 (0)