Rust-GCC / gccrs

GCC Front-End for Rust
https://rust-gcc.github.io/
GNU General Public License v2.0
2.44k stars 157 forks source link

Add --cap-lints option #575

Open CohenArthur opened 3 years ago

CohenArthur commented 3 years ago
> rustc --help
...
        --cap-lints LEVEL
                        Set the most restrictive lint level. More restrictive
                        lints are capped at this level
...

I believe that this option allows the compilation of crates while ignoring some errors, for backward compatibility. More information about the option can be found in the RFC introducing it.

I think the paragraph that resumes the behavior of the option the best is the following:

For example when --cap-lints allow is passed, all instances of #[warn], #[deny], and #[forbid] are ignored. If, however --cap-lints warn is passed only deny and forbid directives are ignored. The acceptable values for LEVEL will be allow, warn, deny, or forbid.

Using something like -frust-cap-lints=LEVEL would also probably make sense and be easy to use. I think this also relies a bit on macros being implemented in order to handle different level of lints directly in the source using the aforementioned directives

mathstuf commented 3 years ago

Same as #574 here. Where is this on master?