Closed
Description
I find this tower annoying:
Lines 1 to 36 in 5cbaf77
Reasoning:
- 36 (and more in the future) lines of code in the root before the interesting part
- This prevents local compilation from continuing after a warning
- Depending on the warning, it can be detected before real errors and prevent them from showing
- Often times when iterating I care more about correctness than eliminating warnings right now
- It's beneficial to the compiler UI to have a visual separation between warnings and errors
I fully agree that warnings should be treated as errors on CI. So how do we get cargo build
to treat warnings as errors? By the RUSTFLAGS
environment variable!
With RUSTFLAGS=-D warnings
you can deny the warning group warnings
. (For the same reason that we don't use !#[deny(warnings)]
, this is dangerous. Though we're still technically not free from warnings introduced by new versions of the compiler; deprecation of symbols can introduce deprecation warnings. (As such that one should probably be excluded from our exclusion list.)) With RUSTFLAGS=-D const_err -D dead_code ...
you can specify warning (groups) individually.