Skip to content

Commit 07dfaa0

Browse files
authored
Merge pull request #152 from kdnakt/translate-supertraits
Translate untranslated lines in supertraits.md
2 parents 5ce1b28 + 192a848 commit 07dfaa0

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

TranslationTable.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@
195195
| struct | 構造体
196196
| structure | 構造体
197197
| sum type | 直和型
198+
| subtrait | サブトレイト
199+
| supertrait | スーパートレイト
198200
| symbol | シンボル
199201
| syntactic sugar | 糖衣構文
200202
| syntax tree | 構文木

src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@
294294
- [イテレータ](trait/iter.md)
295295
- [`impl Trait`](trait/impl_trait.md)
296296
- [クローン](trait/clone.md)
297-
- [Supertraits](trait/supertraits.md)
297+
- [スーパートレイト](trait/supertraits.md)
298298
- [Disambiguating overlapping traits](trait/disambiguating.md)
299299

300300
<!--

src/trait/supertraits.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
<!--
12
# Supertraits
3+
-->
4+
# スーパートレイト
25

6+
<!--
37
Rust doesn't have "inheritance", but you can define a trait as being a superset
48
of another trait. For example:
9+
-->
10+
Rustには"継承"はありませんが、あるトレイトを別のトレイトの上位集合として定義できます。
11+
例えば:
512

613
```rust,editable
714
trait Person {
@@ -10,6 +17,8 @@ trait Person {
1017
1118
// Person is a supertrait of Student.
1219
// Implementing Student requires you to also impl Person.
20+
// PersonはStudentのスーパートレイトです。
21+
// Studentを実装するにはPersonも実装する必要があります。
1322
trait Student: Person {
1423
fn university(&self) -> String;
1524
}
@@ -20,6 +29,8 @@ trait Programmer {
2029
2130
// CompSciStudent (computer science student) is a subtrait of both Programmer
2231
// and Student. Implementing CompSciStudent requires you to impl both supertraits.
32+
// CompSciStudent(コンピュータサイエンスの学生)はProgrammerとStudent両方のサブトレイトです。
33+
// CompSciStudentを実装するには、両方のスーパートレイトを実装する必要があります。
2334
trait CompSciStudent: Programmer + Student {
2435
fn git_username(&self) -> String;
2536
}

0 commit comments

Comments
 (0)