Is there way to ignore #[deny(warnings)]?

#1

Hello,

We are maintaining more than 500 crates inside distribution (Fedora) and it is really annoying to see some crate failing to build (we run cargo build on all of them) because compiler added new lint or some of dependencies deprecated some function ([1], [2]).

Is there way/flag to ignore such denials coming from *.rs files but still displaying them?

0 Likes

#2

You can use --cap-lints warn - https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints

0 Likes

#3

Will it also set compiler lints to warn too (which are set to deny now)?

For example, this one:

duplicate-macro-exports  deny     detects duplicate macro exports
0 Likes

#4

It sets everything to that level.

If you wanted to still let those ones break, I think combining it with the other flags described on that page (-W, etc) would work.

0 Likes