okay yes it is
(but its better after an alpha rename. :smiley: )
Should we just demote
unused_attributesto warn-only at stage0?
It's getting pretty boring to nuke
stage0-stdevery time I rebase and something has changed in libstd (looks even more frequent nowadays), and I've heard people say they don't set
incremental = truein
cargo.tomlbecause of these "unused attribute" errors, which is a shame.
The only reason I can think of to not do what eddyb suggests (namely demoting
unused_attributes to warn-only at stage0) is the question of whether we should be doing something more invasive to fix the problem. And the only reason to do something more invasive would be if we expect users outside of rustbuild to be running into this
but even then, we can wait until someone actually complains
we should do something more invasive but the UX is getting worse
warn-only would be temporary (famous last words) until we know the problem is fixed
that is, the only drawback to doing what eddyb suggests is that it would demotivate the more invasive fix, but the wins from doing what eddyb suggests are so significant
that we would be foolish to not do it
and it's also probably trivial, depending how lint overriding works it could be exactly one line in one crate
or a few lines in
whereas fixing the incremental side of this... seems hard
(and if we have to do it on a case-by-case basis, it has to be fixed in beta, because that's the only compiler used incrementally when building Rust)
what do you mean by "case by case" basis?
some of the comments on the issue looked like they were talking about changing the definition of the attribute to
Whitelisted or something like that
ugh I can't change
libstd at all without hitting this
/me is playing with moving
str into the library
-D unused-attributesimplied by
#![cfg_attr(bootstrap, warn(unused_attributes))] still causes warnings to turn into errors :(
because of what "warn" means there
it's "error" with "deny warnings"
maybe I can do it through the CLI?
If anything I'd expect us to allow them
You can edit rustbuild to do so, look in fn cargo in builder.rs
yeah testing that now
-Wunused-attributes doesn't work either sigh
All warnings are promoted to errors when
-Dwarnings is used, even when you explicitly said
-Aunused-attributes will work.
-Dwarnings is enabled by default when
deny-warnings is set to true in
found that out the "hard" way
Maybe add a
--cap-lint=unused-attributes=warn to rustc to cap only specific lints?
I forgot about cap-lint
Rustc only has
--cap-lints to cap all lints. I was proposing to add a
--cap-lint to only cap a single lint.
opened #70881 FWIW