mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-05-23 10:50:18 +02:00
Add speaker note about multiple impl
blocks (#2606)
This commit is contained in:
parent
12fb4379f7
commit
8f01344757
@ -39,4 +39,9 @@ fn main() {
|
|||||||
implementations can rely on all the methods of the trait. In this case,
|
implementations can rely on all the methods of the trait. In this case,
|
||||||
`greet` is provided, and relies on `talk`.
|
`greet` is provided, and relies on `talk`.
|
||||||
|
|
||||||
|
- Multiple `impl` blocks are allowed for a given type. This includes both
|
||||||
|
inherent `impl` blocks and trait `impl` blocks. Likewise multiple traits can
|
||||||
|
be implemented for a given type (and often types implement many traits!).
|
||||||
|
`impl` blocks can even be spread across multiple modules/files.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user