Skip to content

Commit 081bfb8

Browse files
authored
Merge pull request #1349 from zancas/swap_super_sub_trait
This explanation incorrectly inverts the meaning of SuperTrait
2 parents 7aa8212 + 64f9126 commit 081bfb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/trait/supertraits.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ trait Person {
88
fn name(&self) -> String;
99
}
1010
11-
// Student is a supertrait of Person.
11+
// Person is a supertrait of Student.
1212
// Implementing Student requires you to also impl Person.
1313
trait Student: Person {
1414
fn university(&self) -> String;
@@ -18,8 +18,8 @@ trait Programmer {
1818
fn fav_language(&self) -> String;
1919
}
2020
21-
// CompSciStudent (computer science student) is a supertrait of both Programmer
22-
// and Student. Implementing CompSciStudent requires you to impl both subtraits.
21+
// CompSciStudent (computer science student) is a subtrait of both Programmer
22+
// and Student. Implementing CompSciStudent requires you to impl both supertraits.
2323
trait CompSciStudent: Programmer + Student {
2424
fn git_username(&self) -> String;
2525
}

0 commit comments

Comments
 (0)