diff options
| author | bors <bors@rust-lang.org> | 2022-11-18 16:56:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-18 16:56:12 +0000 |
| commit | 70fe5f08fffd16dc20506f7d140e47b074f77964 (patch) | |
| tree | ecd74afdbcaec5b26090a88115a860b202986dc6 /compiler/rustc_lint/src | |
| parent | fd3bfb35511cbcff59ce1454d3db627b576d7e92 (diff) | |
| parent | 67d5cc0462f33773f042dc3c5ec9bd710095b1b4 (diff) | |
| download | rust-70fe5f08fffd16dc20506f7d140e47b074f77964.tar.gz rust-70fe5f08fffd16dc20506f7d140e47b074f77964.zip | |
Auto merge of #101562 - nnethercote:shrink-ast-Expr-harder, r=petrochenkov
Shrink `ast::Expr` harder r? `@ghost`
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/early.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/unused.rs | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/early.rs b/compiler/rustc_lint/src/early.rs index aee870dd29d..fc760ee3b8f 100644 --- a/compiler/rustc_lint/src/early.rs +++ b/compiler/rustc_lint/src/early.rs @@ -212,7 +212,10 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T> // Explicitly check for lints associated with 'closure_id', since // it does not have a corresponding AST node match e.kind { - ast::ExprKind::Closure(_, _, ast::Async::Yes { closure_id, .. }, ..) + ast::ExprKind::Closure(box ast::Closure { + asyncness: ast::Async::Yes { closure_id, .. }, + .. + }) | ast::ExprKind::Async(_, closure_id, ..) => self.check_id(closure_id), _ => {} } diff --git a/compiler/rustc_lint/src/unused.rs b/compiler/rustc_lint/src/unused.rs index 9ae34013ecb..50f9cb0b56f 100644 --- a/compiler/rustc_lint/src/unused.rs +++ b/compiler/rustc_lint/src/unused.rs @@ -651,7 +651,7 @@ trait UnusedDelimLint { ref call_or_other => { let (args_to_check, ctx) = match *call_or_other { Call(_, ref args) => (&args[..], UnusedDelimsCtx::FunctionArg), - MethodCall(_, _, ref args, _) => (&args[..], UnusedDelimsCtx::MethodArg), + MethodCall(ref call) => (&call.args[..], UnusedDelimsCtx::MethodArg), // actual catch-all arm _ => { return; |
