Skip to content

Commit

Permalink
allow unused_parens and unused_braces when run ui test
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Feb 13, 2025
1 parent 34a5ea9 commit 3a34ad7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,12 @@ impl<'test> TestCx<'test> {
// Allow tests to use internal features.
rustc.args(&["-A", "internal_features"]);

// Allow tests to have unused parens and braces.
// Add #![deny(unused_parens, unused_braces)] to the test file if you want to
// test that these lints are working.
rustc.args(&["-A", "unused_parens"]);
rustc.args(&["-A", "unused_braces"]);

if self.props.force_host {
self.maybe_add_external_args(&mut rustc, &self.config.host_rustcflags);
if !is_rustdoc {
Expand Down

0 comments on commit 3a34ad7

Please sign in to comment.