Split out ast::ItemKind::Const into its own struct
This commit is contained in:
parent
e3828777a6
commit
ec74653652
14 changed files with 89 additions and 61 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue