File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed 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