We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f5c61a7 + 70bf029 commit 760f870Copy full SHA for 760f870
src/doc/trpl/crates-and-modules.md
@@ -562,6 +562,11 @@ place in the hierarchy instead. There's one more special form of `use`: you can
562
people like to think of `self` as `.` and `super` as `..`, from many shells'
563
display for the current directory and the parent directory.
564
565
+Outside of `use`, paths are relative: `foo::bar()` refers to a function inside
566
+of `foo` relative to where we are. If that's prefixed with `::`, as in
567
+`::foo::bar()`, it refers to a different `foo`, an absolute path from your
568
+crate root.
569
+
570
Also, note that we `pub use`d before we declared our `mod`s. Rust requires that
571
`use` declarations go first.
572
0 commit comments