Skip to content

Commit cc0092b

Browse files
Clarify that both crate and super are keywords (#236)
1 parent d5e1c00 commit cc0092b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

book/src/03_ticket_v1/03_modules.md

+3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ You can compose the path in various ways:
8585
- starting from the parent module, e.g. `super::my_function`
8686
- starting from the current module, e.g. `sub_module_1::MyStruct`
8787

88+
Both `crate` and `super` are **keywords**.\
89+
`crate` refers to the root of the current crate, while `super` refers to the parent of the current module.
90+
8891
Having to write the full path every time you want to refer to a type can be cumbersome.
8992
To make your life easier, you can introduce a `use` statement to bring the entity into scope.
9093

0 commit comments

Comments
 (0)