From 18eb2934357d253da68503716ea0bd21dcb61310 Mon Sep 17 00:00:00 2001 From: Kazuki Obata Date: Sun, 11 May 2025 16:05:31 +0900 Subject: [PATCH] update dev doc: update FnKind::Fn matching Ident was moved to the struct Fn in https://github.com/rust-lang/rust/pull/138740 --- book/src/development/adding_lints.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/development/adding_lints.md b/book/src/development/adding_lints.md index e5e82ede4fdf..2b89e94cf8f4 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" }