There are some optional lints disabled by default, or someone may disable some lints that are enabled by default. But if I forgot what settings I changed, how to restore default settings for Rust?
Lints are usually only controlled by the
#[deny(…)] attributes in your code, or by command line arguments to
rustc (which can be controlled by certain environment variables like “
RUSTFLAGS”). Once none of these controls are present anymore, you should already be seeing default behavior again, there’s no permanent settings, unless perhaps you have made changes to environment variables persist in one way or another.
Possibly, you might also be talking about some way your IDE offers to influence lints. In any case, you should try to give a lot more context. E.g. how do you know that some settings are’t default in the first place? (E.g. name the lint and confirm you tested it isn’t set to its default lint level.) And how are you running the compiler? (Cargo? IDEs? Some other way? What’s the command, and the source code?)