试图解决Trait bound Sized is not satisfied for Sized trait中描述的问题时,我发现以下代码给出了以下错误:
trait SizedTrait: Sized {
fn me() -> Self;
}
trait AnotherTrait: Sized {
fn another_me() -> Self;
}
impl AnotherTrait for SizedTrait + Sized {
fn another_me() {
Self::me()
}
}
error[E0225]: only auto traits can be used as additional traits in a trait object
--> src/main.rs:9:36
|
9 | impl AnotherTrait for SizedTrait + Sized {
| ^^^^^ non-auto additional trait
但Rust Book人根本没有提到auto trait
人.
rust 病中的自体特征是什么?它与非自体特征有何不同?