diff options
| author | yukang <moorekang@gmail.com> | 2025-06-29 11:40:59 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2025-07-10 09:25:56 +0800 |
| commit | 93db9e7ee01d61cb97b4f7b3d61903477910cae2 (patch) | |
| tree | 1769ebc661756b170deb03ce2bc48c9616a89d9f /src/tools/compiletest | |
| parent | e43d139a82620a268d3828a73e12a8679339e8f8 (diff) | |
Remove uncessary parens in closure body with unused lint
Diffstat (limited to 'src/tools/compiletest')
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 6 |
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 { |
