Skip to content

Commit 18eb293

Browse files
authored
update dev doc: update FnKind::Fn matching
Ident was moved to the struct Fn in rust-lang/rust#138740
1 parent 7f6d507 commit 18eb293

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/src/development/adding_lints.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ In our example, `is_foo_fn` looks like:
416416

417417
fn is_foo_fn(fn_kind: FnKind<'_>) -> bool {
418418
match fn_kind {
419-
FnKind::Fn(_, ident, ..) => {
419+
FnKind::Fn(_, _, Fn { ident, .. }) => {
420420
// check if `fn` name is `foo`
421421
ident.name.as_str() == "foo"
422422
}

0 commit comments

Comments
 (0)