How to convert warnings to errors in ``?

For code not in build script,
I can use environment variable CARGO_ENCODED_RUSTFLAGS="-D\x1fwarnings"
to convert warnings into errors.

But this does not work for build scripts because I do not find a similar env variable for them.
CARGO_ENCODED_RUSTFLAGS has no effect for build script.

I do not want to change the source code of

Any ideas?

For dependencies from all lints are capped to allow by cargo so they will never cause compilation to fail. For a local crate yoi can pass RUSTFLAGS or use #![deny(warnings)] at the top of your or

1 Like

RUSTFLAGS not work for
and I prefer not to #![deny(warnings] in source code,
so I can use different script wrapper (call cargo with different env vars),
to choose whether or not treat warnings as errors

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.