Skip to content

Commit 9e66c19

Browse files
committed
allow unused_parens and unused_braces when run ui test
1 parent 9fb94b3 commit 9e66c19

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,6 +1715,12 @@ impl<'test> TestCx<'test> {
17151715
// Allow tests to use internal features.
17161716
rustc.args(&["-A", "internal_features"]);
17171717

1718+
// Allow tests to have unused parens and braces.
1719+
// Add #![deny(unused_parens, unused_braces)] to the test file if you want to
1720+
// test that these lints are working.
1721+
rustc.args(&["-A", "unused_parens"]);
1722+
rustc.args(&["-A", "unused_braces"]);
1723+
17181724
if self.props.force_host {
17191725
self.maybe_add_external_args(&mut rustc, &self.config.host_rustcflags);
17201726
if !is_rustdoc {

0 commit comments

Comments
 (0)