about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2022-12-09 15:21:12 -0800
committerEsteban Küber <esteban@kuber.com.ar>2022-12-09 15:21:12 -0800
commitfb3e4b349a7b9e7bceb1f222551483550ee42ab7 (patch)
tree239e2853406de141b996f3d250e03fd85445bb90 /compiler/rustc_lint/src
parente10201c9bb8e225095d76e6650dcfe8dadc50327 (diff)
downloadrust-fb3e4b349a7b9e7bceb1f222551483550ee42ab7.tar.gz
rust-fb3e4b349a7b9e7bceb1f222551483550ee42ab7.zip
Account for macros in const generics
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 b5db94f8c06..4699f7487e6 100644
--- a/compiler/rustc_lint/src/unused.rs
+++ b/compiler/rustc_lint/src/unused.rs
@@ -1138,6 +1138,7 @@ impl UnusedDelimLint for UnusedBraces {
                             && !cx.sess().source_map().is_multiline(value.span)
                             && value.attrs.is_empty()
                             && !value.span.from_expansion()
+                            && !inner.span.from_expansion()
                         {
                             self.emit_unused_delims_expr(cx, value, ctx, left_pos, right_pos)
                         }