about summary refs log tree commit diff
path: root/src/tools/compiletest
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-07-10 06:57:45 +0000
committerGitHub <noreply@github.com>2025-07-10 06:57:45 +0000
commit317f59dfebb3ca584c4ab7c137208bbb23601eb2 (patch)
tree4475de7055ec501bfa7d9789536894ddafe1dc6b /src/tools/compiletest
parenta09cf9cc5a7fd4e2e19d937ef03bfeec34993a49 (diff)
parent17b240e04f8d14e5563b6afb2ed3b842f87d1c78 (diff)
Merge pull request #4458 from rust-lang/rustup-2025-07-10
Automatic Rustup
Diffstat (limited to 'src/tools/compiletest')
-rw-r--r--src/tools/compiletest/src/runtest.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 3e879e0e4bb..933a32392bd 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -1777,6 +1777,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 {