Lints
In software, a "lint" is a tool used to help improve your source code. TheRust compiler contains a number of lints, and when it compiles your code, it willalso run the lints. These lints may produce a warning, an error, or nothing at all,depending on how you've configured things.
Here's a small example:
$ cat main.rs
fn main() {
let x = 5;
}
$ rustc main.rs
warning: unused variable: `x`
--> main.rs:2:9
|
2 | let x = 5;
| ^
|
= note: `#[warn(unused_variables)]` on by default
= note: to avoid this warning, consider using `_x` instead
This is the unusedvariables
lint, and it tells you that you've introduceda variable that you don't use in your code. That's not _wrong, so it's notan error, but it might be a bug, so you get a warning.