update dev doc: update FnKind::Fn matching

Ident was moved to the struct Fn in https://github.com/rust-lang/rust/pull/138740
This commit is contained in:
Kazuki Obata 2025-05-11 16:05:31 +09:00 committed by GitHub
parent 7f6d507bba
commit 18eb293435
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"
}