about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKazuki Obata <koiru3822fs@gmail.com>2025-05-11 16:05:31 +0900
committerGitHub <noreply@github.com>2025-05-11 16:05:31 +0900
commit18eb2934357d253da68503716ea0bd21dcb61310 (patch)
tree20c5042ee58931771174feb0ce3c8edae2be641b
parent7f6d507bba4ed88e996b84b642e661a9672440a4 (diff)
downloadrust-18eb2934357d253da68503716ea0bd21dcb61310.tar.gz
rust-18eb2934357d253da68503716ea0bd21dcb61310.zip
update dev doc: update FnKind::Fn matching
Ident was moved to the struct Fn in https://github.com/rust-lang/rust/pull/138740
-rw-r--r--book/src/development/adding_lints.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/book/src/development/adding_lints.md b/book/src/development/adding_lints.md
index e5e82ede4fd..2b89e94cf8f 100644
--- a/book/src/development/adding_lints.md
+++ b/book/src/development/adding_lints.md
@@ -416,7 +416,7 @@ In our example, `is_foo_fn` looks like:
 
 fn is_foo_fn(fn_kind: FnKind<'_>) -> bool {
     match fn_kind {
-        FnKind::Fn(_, ident, ..) => {
+        FnKind::Fn(_, _, Fn { ident, .. }) => {
             // check if `fn` name is `foo`
             ident.name.as_str() == "foo"
         }