diff options
| author | Philipp Krones <hello@philkrones.com> | 2025-05-12 08:42:41 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-12 08:42:41 +0000 |
| commit | 74fd9edc49ad7bcc57173c8e0fc388c3ed5eff9f (patch) | |
| tree | 1faec8b3529f8149a200e02dd376762dfdf65faa | |
| parent | 48337da4a178e7140d97640819a99bb88e75cd6e (diff) | |
| parent | 18eb2934357d253da68503716ea0bd21dcb61310 (diff) | |
| download | rust-74fd9edc49ad7bcc57173c8e0fc388c3ed5eff9f.tar.gz rust-74fd9edc49ad7bcc57173c8e0fc388c3ed5eff9f.zip | |
book: modify FnKind::Fn matching (#14780)
This PR update the sample code in the development guide because `ident` was moved to the struct `Fn` in https://github.com/rust-lang/rust/pull/138740 . changelog: none
| -rw-r--r-- | book/src/development/adding_lints.md | 2 |
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" } |
