This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Answer the following questions to demonstrate what you've learned:
Which of the following statements does not describe modules in Rust?
A module is a (possibly nested) unit of code organization inside a crate.
There are two ways to declare modules in Rust: inline or in another file.
A module is a compilation unit, which is the smallest amount of code that the Rust compiler can operate on.
Which of the following statements does not describe third-party modules in Rust?
Dependencies can be fetched and compiled by Cargo.
Third-party crates and their intended versions should be declared in the src/main.rs file.
src/main.rs
Dependencies are normally fetched from the Crates.io repository.
Only public items can be accessed from third-party crates.
Which of the following statements best describes a crate?
A crate is a compilation unit, which is the smallest amount of code that the Rust compiler can operate on.
A crate contains a Cargo.toml file that describes how to build it.
A crate is a collection of items that includes constants, type aliases, functions, structs, and more.
Crates control the privacy of items and whether they can be used by external code.
You must answer all questions before checking your work.
Continue
Was this page helpful?