pull/1558/head
383494 4 months ago committed by GitHub
parent e60a32f838
commit d448498dc4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -84,7 +84,7 @@ fn difference<C: Container>(container: &C) {}
关联类型还可以被其它特征进行约束,例如: 关联类型还可以被其它特征进行约束,例如:
```rust ```rust
trait Container{ trait Container{
type ADisplay; type A: Display;
type B; type B;
fn contains(&self, a: &Self::A, b: &Self::B) -> bool; fn contains(&self, a: &Self::A, b: &Self::B) -> bool;
} }

Loading…
Cancel
Save