rust-unofficial / patterns

A catalogue of Rust design patterns, anti-patterns and idioms
https://rust-unofficial.github.io/patterns/
Mozilla Public License 2.0
7.85k stars 354 forks source link

Contradiction with the rustc book on --cap-lints and forbid #281

Closed josephcsible closed 2 years ago

josephcsible commented 2 years ago

https://github.com/rust-unofficial/patterns/blob/66d7e6c7daea2b6cf50f6cb230c7203ece0d8678/anti_patterns/deny-warnings.md#L39-L42

This seems to contradict this:

https://github.com/rust-lang/rust/blob/3bf55753c680e653eaa9d11dd66e56844bd04d32/src/doc/rustc/src/lints/levels.md#L102-L105

However, lint levels may still be capped with --cap-lints (see below) so rustc --cap-lints warn will make lints set to 'forbid' just warn.

MarcoIeni commented 2 years ago

Thanks, I have done a PR to fix this. Can you review #282?

josephcsible commented 2 years ago

I just reviewed it. I don't have write access to this project, though, so my approval doesn't count towards being able to merge it.

MarcoIeni commented 2 years ago

Yes, I know, don't worry, I just wanted to make sure you liked my change :) Let's wait for simonsan