Skip to content

Commit a559577

Browse files
committed
Forward reference crates and modules chapter
1 parent 9624b68 commit a559577

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/doc/book/traits.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ it won’t affect you, unless you `use` that trait.
280280
There’s one more restriction on implementing traits: either the trait
281281
or the type you’re implementing it for must be defined by you. Or more
282282
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].
284285

285286
So, 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.
292293
What’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

0 commit comments

Comments
 (0)