1
Fork 0

Split out ast::ItemKind::Const into its own struct

This commit is contained in:
Oli Scherer 2023-03-29 09:20:45 +00:00
parent e3828777a6
commit ec74653652
14 changed files with 89 additions and 61 deletions

View file

@ -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,