]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/ptr.rs
Auto merge of #101241 - camsteffen:refactor-binding-annotations, r=cjgillot
[rust.git] / src / tools / clippy / clippy_lints / src / ptr.rs
index 63c9faf0396fd3d8ffdd6a610113147827b552df..0028e0bc6c517e79e13f3b57452972f013da44c0 100644 (file)
@@ -571,7 +571,7 @@ fn visit_expr(&mut self, e: &'tcx Expr<'_>) {
                 Some((Node::Stmt(_), _)) => (),
                 Some((Node::Local(l), _)) => {
                     // Only trace simple bindings. e.g `let x = y;`
-                    if let PatKind::Binding(BindingAnnotation::Unannotated, id, _, None) = l.pat.kind {
+                    if let PatKind::Binding(BindingAnnotation::NONE, id, _, None) = l.pat.kind {
                         self.bindings.insert(id, args_idx);
                     } else {
                         set_skip_flag();
@@ -647,7 +647,7 @@ fn visit_expr(&mut self, e: &'tcx Expr<'_>) {
             .filter_map(|(i, arg)| {
                 let param = &body.params[arg.idx];
                 match param.pat.kind {
-                    PatKind::Binding(BindingAnnotation::Unannotated, id, _, None)
+                    PatKind::Binding(BindingAnnotation::NONE, id, _, None)
                         if !is_lint_allowed(cx, PTR_ARG, param.hir_id) =>
                     {
                         Some((id, i))