File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
branches/stable/src/doc/book Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
29
29
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
30
30
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
31
31
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32
- refs/heads/stable: 9624b68207c8c8d216e6e981088cb54d46aa1152
32
+ refs/heads/stable: a559577c2f2030df89f9f8b245d49e86a4f90d93
33
33
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
34
34
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
35
35
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e
Original file line number Diff line number Diff line change @@ -280,7 +280,8 @@ it won’t affect you, unless you `use` that trait.
280
280
There’s one more restriction on implementing traits: either the trait
281
281
or the type you’re implementing it for must be defined by you. Or more
282
282
precisely, one of them must be defined in the same crate as the ` impl `
283
- you're writing.
283
+ you're writing. For more on Rust's module and package system, see the
284
+ chapter on [ crates and modules] [ cm ] .
284
285
285
286
So, we could implement the ` HasArea ` type for ` i32 ` , because we defined
286
287
` HasArea ` in our code. But if we tried to implement ` ToString ` , a trait
@@ -291,6 +292,7 @@ One last thing about traits: generic functions with a trait bound use
291
292
‘monomorphization’ (mono: one, morph: form), so they are statically dispatched.
292
293
What’s that mean? Check out the chapter on [ trait objects] [ to ] for more details.
293
294
295
+ [ cm ] : crates-and-modules.html
294
296
[ to ] : trait-objects.html
295
297
296
298
# Multiple trait bounds
You can’t perform that action at this time.
0 commit comments