Rename BindingAnnotation to BindingMode
This commit is contained in:
parent
432bce6583
commit
876d5f00a0
47 changed files with 104 additions and 104 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use clippy_utils::diagnostics::span_lint_and_help;
|
||||
use rustc_ast::ast::{BindingAnnotation, Pat, PatKind};
|
||||
use rustc_ast::ast::{BindingMode, Pat, PatKind};
|
||||
use rustc_lint::{EarlyContext, EarlyLintPass};
|
||||
use rustc_session::declare_lint_pass;
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ declare_lint_pass!(RefPatterns => [REF_PATTERNS]);
|
|||
|
||||
impl EarlyLintPass for RefPatterns {
|
||||
fn check_pat(&mut self, cx: &EarlyContext<'_>, pat: &Pat) {
|
||||
if let PatKind::Ident(BindingAnnotation::REF, _, _) = pat.kind
|
||||
if let PatKind::Ident(BindingMode::REF, _, _) = pat.kind
|
||||
&& !pat.span.from_expansion()
|
||||
{
|
||||
span_lint_and_help(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue