derivable traits and trait inheritance
- Rust book - Appendix C: Derivable Traits
- questions about deriving traits in stack overflow
- 뭐라고? trait가 trait를 상속할 수 있다고? stack overflow
trait A {}
trait B: A {}
struct S;
impl B for S {}
impl A for S {} // separately implement both B and A
let x: &B = &S;