about summary refs log tree commit diff
path: root/compiler/rustc_lint
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-03-29 09:20:45 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-04-04 09:44:50 +0000
commitec74653652e59fc209506c084357ccee922a2d73 (patch)
treeaa3b502664d0028db8443f96466d856942bc853a /compiler/rustc_lint
parente3828777a6b669c33fc59f2bddde44e888d304af (diff)
downloadrust-ec74653652e59fc209506c084357ccee922a2d73.tar.gz
rust-ec74653652e59fc209506c084357ccee922a2d73.zip
Split out ast::ItemKind::Const into its own struct
Diffstat (limited to 'compiler/rustc_lint')
-rw-r--r--compiler/rustc_lint/src/unused.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/unused.rs b/compiler/rustc_lint/src/unused.rs
index 8f652511459..d920e237508 100644
--- a/compiler/rustc_lint/src/unused.rs
+++ b/compiler/rustc_lint/src/unused.rs
@@ -805,7 +805,9 @@ trait UnusedDelimLint {
     fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) {
         use ast::ItemKind::*;
 
-        if let Const(.., Some(expr)) | Static(ast::Static { expr: Some(expr), .. }) = &item.kind {
+        if let Const(ast::ConstItem { expr: Some(expr), .. })
+        | Static(ast::Static { expr: Some(expr), .. }) = &item.kind
+        {
             self.check_unused_delims_expr(
                 cx,
                 expr,