Disable warnings in specific configuration/profile

Following the:

Is there a way to use profiles/features or anything really to disable warnings only in specific profile/cfg?

You could put this at the top of your lib.rs or main.rs:

#![cfg_attr(debug_assertions, allow(warnings))]

This will allow warnings only if debug assertions are enabled, which by default happens only in the debug profile.

I love it!
Thanks!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.