rust/compiler
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
..
rustc Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_abi Remove redundant words 2025-04-09 18:46:50 +08:00
rustc_arena Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_ast Rename some name variables as ident. 2025-04-10 09:30:55 +10:00
rustc_ast_ir Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_ast_lowering Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_ast_passes Rollup merge of #139035 - nnethercote:PatKind-Missing, r=oli-obk 2025-04-07 22:29:17 +10:00
rustc_ast_pretty Rename some name variables as ident. 2025-04-10 09:30:55 +10:00
rustc_attr_data_structures add rustc_macro_edition_2021 2025-03-19 17:37:35 +01:00
rustc_attr_parsing Avoid kw::Empty when dealing with rustc_allowed_through_unstable_modules. 2025-03-25 16:48:03 +11:00
rustc_baked_icu_data Add unreachable_pub to RUSTC_LINT_FLAGS for compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_borrowck Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_builtin_macros Rollup merge of #139510 - nnethercote:name-to-ident, r=fee1-dead 2025-04-10 17:27:14 +02:00
rustc_codegen_cranelift Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_codegen_gcc Prepend temp files with a string per invocation of rustc 2025-04-07 20:48:40 +00:00
rustc_codegen_llvm Rollup merge of #139664 - oli-obk:push-tkmurytmnsyw, r=RalfJung 2025-04-11 21:21:02 +02:00
rustc_codegen_ssa Auto merge of #139453 - compiler-errors:incr, r=jieyouxu 2025-04-11 13:59:33 +00:00
rustc_const_eval Make LevelAndSource a struct 2025-04-03 09:17:55 +00:00
rustc_data_structures Rollup merge of #139584 - oli-obk:horrible-experiment-1, r=petrochenkov 2025-04-11 21:20:59 +02:00
rustc_driver Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_driver_impl Rollup merge of #139315 - clubby789:deranged-bump, r=Mark-Simulacrum 2025-04-12 21:05:28 +00:00
rustc_error_codes Remove some dead or leftover code related to rustc-intrinsic abi removal 2025-04-09 07:57:13 +00:00
rustc_error_messages update cfgs 2025-04-09 12:29:59 +01:00
rustc_errors Rollup merge of #139468 - compiler-errors:has_stashed_diagnostic, r=oli-obk 2025-04-09 14:52:38 +02:00
rustc_expand Address review comments. 2025-04-10 09:39:21 +10:00
rustc_feature replace version placeholder 2025-04-09 12:29:59 +01:00
rustc_fluent_macro Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_fs_util Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_graphviz Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_hashes Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_hir Fix name of field in doc comment 2025-04-12 11:34:04 +02:00
rustc_hir_analysis Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_hir_pretty Rename some name variables as ident. 2025-04-10 09:30:55 +10:00
rustc_hir_typeck Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_incremental Auto merge of #138629 - Zoxc:graph-anon-hashmap, r=oli-obk 2025-03-24 15:02:09 +00:00
rustc_index Use {Decodable,Encodable}_NoContext in type_ir 2025-03-15 06:34:36 +00:00
rustc_index_macros Add unreachable_pub to RUSTC_LINT_FLAGS for compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_infer clean code: remove Deref<Target=RegionKind> impl for Region and use .kind() 2025-04-08 10:51:41 +08:00
rustc_interface Auto merge of #139453 - compiler-errors:incr, r=jieyouxu 2025-04-11 13:59:33 +00:00
rustc_lexer Replace rustc_lexer/unescape with rustc-literal-escaper crate 2025-04-04 14:44:45 +02:00
rustc_lint Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_lint_defs impl !PartialOrd for HirId 2025-04-03 09:22:21 +00:00
rustc_llvm Update the minimum external LLVM to 19 2025-04-05 11:44:38 -07:00
rustc_log Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_macros Allow drivers to supply a list of extra symbols to intern 2025-04-10 13:39:23 +00:00
rustc_metadata Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_middle Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_mir_build Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_mir_dataflow Auto merge of #138414 - matthiaskrgr:rollup-9ablqdb, r=matthiaskrgr 2025-03-12 17:27:43 +00:00
rustc_mir_transform Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_monomorphize Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_next_trait_solver Auto merge of #139000 - compiler-errors:rigid-missing-item, r=lcnr 2025-04-10 04:03:59 +00:00
rustc_parse Rollup merge of #139653 - nnethercote:fix-139495, r=petrochenkov 2025-04-11 21:21:01 +02:00
rustc_parse_format Update rustc-literal-escaper version to 0.0.2 2025-04-04 22:26:10 +02:00
rustc_passes rustdoc-search: add unbox flag to Result aliases 2025-04-11 11:36:40 -07:00
rustc_pattern_analysis Fix stack overflow in exhaustiveness due to recursive HIR opaque type values 2025-04-07 22:41:48 +00:00
rustc_privacy privacy: Visit types and traits in impls in type privacy lints 2025-03-25 12:40:02 +03:00
rustc_query_impl Add a dep kind for use of the anon node with zero dependencies 2025-04-02 07:35:05 +02:00
rustc_query_system Reuse the index from promoted nodes when coloring executed tasks 2025-04-05 14:41:08 +02:00
rustc_resolve Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_sanitizers Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_serialize Bump FileEncoder buffer size to 64 kB 2025-04-10 18:52:03 +02:00
rustc_session Prepend temp files with a string per invocation of rustc 2025-04-07 20:48:40 +00:00
rustc_smir Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_span Rollup merge of #139662 - nnethercote:tweak-DefPathData, r=compiler-errors 2025-04-11 21:21:01 +02:00
rustc_symbol_mangling Introduce DefPathData::AnonAssocTy. 2025-04-11 19:08:14 +10:00
rustc_target remove compiler support for extern "rust-intrinsic" blocks 2025-04-06 21:32:58 +02:00
rustc_trait_selection Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_traits Rollup merge of #138394 - lcnr:yeet-variant, r=compiler-errors 2025-03-12 10:19:32 -07:00
rustc_transmute Add #[cfg(test)] for Transition in dfa 2025-03-18 07:17:16 +00:00
rustc_ty_utils Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_type_ir Auto merge of #139000 - compiler-errors:rigid-missing-item, r=lcnr 2025-04-10 04:03:59 +00:00
rustc_type_ir_macros Fold visit into ty 2025-03-15 06:34:36 +00:00
stable_mir let rustc_smir host stable_mir for refactoring 2025-04-05 18:23:07 +08:00