Warn on unused_attributes in tests
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
This commit is contained in:
parent
6380899f32
commit
e3dd4c1987
1 changed files with 2 additions and 1 deletions
|
|
@ -1838,8 +1838,9 @@ impl<'test> TestCx<'test> {
|
|||
|
||||
// Add `-A unused` before `config` flags and in-test (`props`) flags, so that they can
|
||||
// overwrite this.
|
||||
// Don't allow `unused_attributes` since these are usually actual mistakes, rather than just unused code.
|
||||
if let AllowUnused::Yes = allow_unused {
|
||||
rustc.args(&["-A", "unused"]);
|
||||
rustc.args(&["-A", "unused", "-W", "unused_attributes"]);
|
||||
}
|
||||
|
||||
// Allow tests to use internal features.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue