Introduction
In this lab, the compiler provides a dead_code
lint that warns about unused functions, but you can use attributes, such as #[allow(dead_code)]
, to disable the lint and prevent the warnings.
Note: If the lab does not specify a file name, you can use any file name you want. For example, you can use main.rs
, compile and run it with rustc main.rs && ./main
.
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
rust(("Rust")) -.-> rust/FunctionsandClosuresGroup(["Functions and Closures"])
rust/FunctionsandClosuresGroup -.-> rust/function_syntax("Function Syntax")
rust/FunctionsandClosuresGroup -.-> rust/expressions_statements("Expressions and Statements")
subgraph Lab Skills
rust/function_syntax -.-> lab-99340{{"Disabling Rust Unused Code Warnings"}}
rust/expressions_statements -.-> lab-99340{{"Disabling Rust Unused Code Warnings"}}
end