Skip to content

Commit 3a34ad7

Browse files
committed
allow unused_parens and unused_braces when run ui test
1 parent 34a5ea9 commit 3a34ad7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/tools/compiletest/src/runtest.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1713,6 +1713,12 @@ impl<'test> TestCx<'test> {
17131713
// Allow tests to use internal features.
17141714
rustc.args(&["-A", "internal_features"]);
17151715

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

0 commit comments

Comments
 (0)