Is there an equivalent to rustc -Wall -Werror?

The first 10 minutes of studying rust, I have 58 lint options, and I think: gcc has a solution to this problem. For clarity: I want to include all warnings / notes ( -Wall) and treat all warnings as serious errors ( -Werror).

Something that will be in the file .toml? Workaround

+7
source share
1 answer

gccs -Werrorbecomes rustc --deny warningseither a box attribute #![deny(warnings)]. You can also pass through the environment variable flag: RUSTFLAGS="--deny warnings".

-Wall -Weverything Rust; , , , . , - . , , , . , , : , . (, box-pointers: : " , ", - .)

rustc ; Clippy.

+12

Source: https://habr.com/ru/post/1584167/


All Articles