An allow attribute tells Rust to stay quiet about a specified warning, such as unused variables or dead code. Use it when code is intentionally unfinished, demonstrated, or temporarily unused. section 13.1.5
Suppressing unused-code warnings
Place attributes before the code they affect: #[allow(dead_code)] suppresses dead-code warnings, while #[allow(unused_variables)] suppresses unused-variable warnings. To allow all unused-code warnings in a file, write #![allow(unused)]. section 13.1.5
Choose the attribute scope carefully:
- Use #[...] as an outer attribute for the item that follows it. section 13.1.5
- Use #![...] as an inner attribute for everything inside a file or module, placing it at the very top. section 13.1.5
- Alternatively, prefix an intentionally unused name with an underscore, such as _some_char. section 13.1.5
