File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 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.
280280There’s one more restriction on implementing traits: either the trait
281281or the type you’re implementing it for must be defined by you. Or more
282282precisely, 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 ] .
284285
285286So, we could implement the ` HasArea ` type for ` i32 ` , because we defined
286287` 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
291292‘monomorphization’ (mono: one, morph: form), so they are statically dispatched.
292293What’s that mean? Check out the chapter on [ trait objects] [ to ] for more details.
293294
295+ [ cm ] : crates-and-modules.html
294296[ to ] : trait-objects.html
295297
296298# Multiple trait bounds
You can’t perform that action at this time.
0 commit comments