Merge pull request #771 from 769344359/patch-1

Update ch10-02-traits.md
pull/772/head
KaiserY 9 months ago committed by GitHub
commit c26a869662
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -116,7 +116,7 @@ trait 体中可以有多个方法:一行一个方法签名且都以分号结
#### Trait Bound 语法 #### Trait Bound 语法
`impl Trait` 语法适用于直观的例子,它实际上是一种较长形式语法的语法糖。我们称为 *trait bound*它看起来像: `impl Trait` 语法适用于直观的例子,它实际上是一种较长形式我们称为 *trait bound*语法的语法糖。它看起来像:
```rust,ignore ```rust,ignore
pub fn notify<T: Summary>(item: &T) { pub fn notify<T: Summary>(item: &T) {

Loading…
Cancel
Save