From cc0092b2c66e57db2b26bda569a2e165f8375d0c Mon Sep 17 00:00:00 2001 From: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:13:27 +0100 Subject: [PATCH] Clarify that both crate and super are keywords (#236) --- book/src/03_ticket_v1/03_modules.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/book/src/03_ticket_v1/03_modules.md b/book/src/03_ticket_v1/03_modules.md index 01cc993..c6645ea 100644 --- a/book/src/03_ticket_v1/03_modules.md +++ b/book/src/03_ticket_v1/03_modules.md @@ -85,6 +85,9 @@ You can compose the path in various ways: - starting from the parent module, e.g. `super::my_function` - starting from the current module, e.g. `sub_module_1::MyStruct` +Both `crate` and `super` are **keywords**.\ +`crate` refers to the root of the current crate, while `super` refers to the parent of the current module. + Having to write the full path every time you want to refer to a type can be cumbersome. To make your life easier, you can introduce a `use` statement to bring the entity into scope.