Nicholas Nethercote
ce2aa97cd6
Move has_self
field to hir::AssocKind::Fn
.
...
`hir::AssocItem` currently has a boolean `fn_has_self_parameter` field,
which is misplaced, because it's only relevant for associated fns, not
for associated consts or types. This commit moves it (and renames it) to
the `AssocKind::Fn` variant, where it belongs.
This requires introducing a new C-style enum, `AssocTag`, which is like
`AssocKind` but without the fields. This is because `AssocKind` values
are passed to various functions like `find_by_ident_and_kind` to
indicate what kind of associated item should be searched for, and having
to specify `has_self` isn't relevant there.
New methods:
- Predicates `AssocItem::is_fn` and `AssocItem::is_method`.
- `AssocItem::as_tag` which converts `AssocItem::kind` to `AssocTag`.
Removed `find_by_name_and_kinds`, which is unused.
`AssocItem::descr` can now distinguish between methods and associated
functions, which slightly improves some error messages.
2025-04-14 16:13:04 +10:00
..
2025-04-08 23:06:31 +03:00
2024-12-03 16:34:44 +00:00
2025-01-26 21:20:31 +01:00
2024-10-15 20:42:17 -04:00
2024-10-15 20:42:17 -04:00
2025-04-08 23:06:31 +03:00
2024-02-16 20:02:50 +00:00
2024-10-29 16:26:57 +00:00
2024-10-29 16:26:57 +00:00
2024-05-30 15:52:29 -04:00
2024-02-16 20:02:50 +00:00
2025-04-08 23:06:31 +03:00
2024-12-12 23:36:27 +00:00
2025-04-11 11:03:08 +10:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-03-07 14:26:31 +00:00
2024-02-08 00:26:42 +00:00
2024-02-08 00:26:42 +00:00
2024-02-16 20:02:50 +00:00
2025-01-22 09:20:57 -08:00
2025-01-26 21:20:31 +01:00
2025-04-08 23:06:31 +03:00
2025-01-26 21:20:31 +01:00
2024-08-10 00:54:16 +00:00
2024-08-10 00:54:16 +00:00
2025-01-22 09:20:57 -08:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2024-12-07 21:29:58 +00:00
2024-05-17 12:51:21 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-04-14 16:13:04 +10:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-01-22 09:20:57 -08:00
2025-01-26 21:20:31 +01:00
2025-01-22 09:20:57 -08:00
2025-01-26 21:20:31 +01:00
2024-12-07 21:29:58 +00:00
2024-12-07 21:29:58 +00:00
2024-12-07 21:29:58 +00:00
2024-12-07 21:29:58 +00:00
2024-12-07 21:29:58 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-12-07 22:18:51 +00:00
2024-02-16 20:02:50 +00:00
2024-05-29 09:27:07 +00:00
2025-02-10 20:21:39 +00:00
2025-01-22 09:20:57 -08:00
2025-01-26 21:20:31 +01:00
2024-02-08 08:10:43 +00:00
2024-03-11 21:28:16 +00:00
2024-05-30 15:52:29 -04:00
2024-05-30 15:52:29 -04:00
2025-04-08 23:06:31 +03:00
2024-12-07 21:29:58 +00:00
2024-12-07 21:29:58 +00:00
2024-05-30 15:52:29 -04:00
2024-02-16 20:02:50 +00:00
2024-12-03 16:34:44 +00:00
2025-01-26 21:20:31 +01:00
2024-02-16 20:02:50 +00:00
2025-04-08 23:06:31 +03:00
2025-01-22 09:20:57 -08:00
2025-01-26 21:20:31 +01:00
2024-12-03 16:34:44 +00:00
2025-01-26 21:20:31 +01:00
2024-02-19 23:54:49 +00:00
2024-02-19 23:54:49 +00:00
2024-02-16 20:02:50 +00:00
2024-05-29 09:27:07 +00:00
2024-05-29 09:27:07 +00:00
2024-02-16 20:02:50 +00:00
2024-03-20 13:00:34 -04:00
2024-03-20 13:00:34 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-04-08 23:06:31 +03:00
2025-04-03 11:13:10 +02:00
2025-04-03 11:13:10 +02:00
2025-04-03 11:13:10 +02:00
2025-04-03 11:13:10 +02:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-03-11 12:05:02 +00:00
2025-03-11 12:05:02 +00:00
2025-04-08 23:06:31 +03:00
2025-04-08 23:06:31 +03:00
2024-02-07 10:42:01 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-03-11 17:19:37 +00:00
2024-03-11 17:19:37 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-03-11 12:05:02 +00:00
2025-03-11 12:05:02 +00:00
2024-02-16 20:02:50 +00:00
2025-03-11 12:05:02 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-17 17:21:24 +00:00
2025-02-17 17:21:24 +00:00
2025-02-17 17:21:24 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-10-29 16:26:57 +00:00
2025-04-11 11:03:08 +10:00
2025-04-11 11:03:08 +10:00
2024-03-10 21:18:41 -04:00
2024-02-16 20:02:50 +00:00
2024-05-30 22:52:33 +02:00
2024-07-17 21:30:40 +00:00
2024-04-21 20:10:12 -04:00
2024-03-14 21:28:47 +01:00
2024-02-16 20:02:50 +00:00
2024-01-30 19:26:13 +00:00
2024-01-30 19:26:13 +00:00
2025-02-10 20:21:39 +00:00
2025-01-22 09:20:57 -08:00
2025-01-26 21:20:31 +01:00
2024-08-03 07:57:31 -04:00
2024-08-03 07:57:31 -04:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2025-04-08 23:06:31 +03:00
2025-04-11 11:03:08 +10:00
2025-04-11 11:03:08 +10:00
2024-07-22 22:51:53 +00:00
2024-02-16 20:02:50 +00:00
2024-03-14 17:19:40 +01:00
2025-04-08 23:06:31 +03:00
2024-10-02 08:28:45 +03:00
2024-05-25 21:57:17 +08:00
2024-05-25 21:57:17 +08:00
2024-02-16 20:02:50 +00:00
2025-04-08 23:06:31 +03:00
2025-01-26 21:20:31 +01:00
2025-04-08 23:06:31 +03:00
2024-03-07 14:26:31 +00:00
2024-03-07 14:26:31 +00:00
2024-04-09 12:17:34 -04:00
2024-04-09 12:17:34 -04:00
2024-02-16 20:02:50 +00:00