about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
authorclubby789 <jamie@hill-daniel.co.uk>2023-01-07 15:41:32 +0000
committerclubby789 <jamie@hill-daniel.co.uk>2023-01-14 15:49:08 +0000
commit4f64de83bc5731946c9acdd4f572e24bfbaef4b9 (patch)
tree98fd0c6fa226f00fa5d10c14facc378aa94e54cb /compiler/rustc_lint/src
parent44a500c8c187b245638684748f54bd6ec67e0b25 (diff)
downloadrust-4f64de83bc5731946c9acdd4f572e24bfbaef4b9.tar.gz
rust-4f64de83bc5731946c9acdd4f572e24bfbaef4b9.zip
Fix `unused_braces` on generic const expr macro call
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/unused.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/unused.rs b/compiler/rustc_lint/src/unused.rs
index ac2b32b44e6..f2ee9ab1a19 100644
--- a/compiler/rustc_lint/src/unused.rs
+++ b/compiler/rustc_lint/src/unused.rs
@@ -1105,6 +1105,7 @@ impl UnusedDelimLint for UnusedBraces {
                                 || matches!(expr.kind, ast::ExprKind::Lit(_)))
                             && !cx.sess().source_map().is_multiline(value.span)
                             && value.attrs.is_empty()
+                            && !expr.span.from_expansion()
                             && !value.span.from_expansion()
                             && !inner.span.from_expansion()
                         {