rust/compiler
Jubilee 6da4221d96
Rollup merge of #132385 - workingjubilee:move-abi-to-rustc-abi, r=jieyouxu,compiler-errors
compiler: Move `rustc_target::spec::abi::Abi` to `rustc_abi::ExternAbi`

Lift `enum Abi` from its rather odd place in the middle of rustc_target, and make it available again from rustc_abi. You know, the crate where you would expect the enum that describes all the ABIs to be? The platform-neutral ones, at least. This will help further refactoring of how we handle ABIs in the near future[^0].

Rename `Abi` to `ExternAbi` because quite a lot of the compiler overloads the concept of "ABI" enough that the existing name is imprecise and it is often renamed _anyway_. Often this was to avoid conflicts with the *other* type formerly known as `Abi` (now named BackendRepr[^1]), but sometimes it is just for clarity, and this name seems more self-explanatory. It does get reexported, though, using its old name, to reduce the odds of merge-conflicting over the entire tree.

All of `ExternAbi`'s friends come along for the ride, which costs adding some optional dependencies to the rustc_abi crate. However, all of this also allows simply moving three crates entirely off rustc_target:
- rustc_hir_pretty
- rustc_lint_defs
- rustc_mir_build

This odd selection is mostly to demonstrate a secondary motivation: The majority of the front-end of the compiler should be as target-agnostic as possible, and it is easier to assure this if they simply don't depend on the crate that describes targets. Note that I didn't migrate crates that don't benefit from it in this way yet, and I didn't survey every last crate.

[^0]: This is being undertaken as part of https://github.com/rust-lang/rust/issues/119183
[^1]: https://github.com/rust-lang/rust/pull/132246
2024-10-31 17:50:42 -07:00
..
rustc disable size asserts in the compiler when randomizing layouts 2024-08-31 23:56:45 +02:00
rustc_abi compiler: Lift rustc_target::spec::abi::Abi to rustc_abi::ExternAbi 2024-10-30 22:38:49 -07:00
rustc_arena move strict provenance lints to new feature gate, remove old feature gates 2024-10-21 15:22:17 +01:00
rustc_ast Improve the missing_abi lint. 2024-10-31 10:55:45 +01:00
rustc_ast_ir Add sugar for &pin (const|mut) types 2024-10-07 11:15:04 -07:00
rustc_ast_lowering Encode cross-crate opaque type origin 2024-10-31 01:35:13 +00:00
rustc_ast_passes Improve the missing_abi lint. 2024-10-31 10:55:45 +01:00
rustc_ast_pretty fix clippy::clone_on_ref_ptr for compiler 2024-10-28 18:05:08 +03:00
rustc_attr Re-do recursive const stability checks 2024-10-25 20:31:40 +02:00
rustc_baked_icu_data
rustc_borrowck Auto merge of #132301 - compiler-errors:adjust, r=lcnr 2024-10-31 10:17:49 +00:00
rustc_builtin_macros Auto merge of #131284 - dingxiangfei2009:rename-smart-ptr-to-coerce-referent, r=compiler-errors 2024-10-27 17:04:12 +00:00
rustc_codegen_cranelift cg_clif: rustc_abi::Abi => BackendRepr 2024-10-29 15:01:01 -07:00
rustc_codegen_gcc cg_gcc: rustc_abi::Abi => BackendRepr 2024-10-29 15:01:01 -07:00
rustc_codegen_llvm coverage: Avoid ICE when coverage_cx is unexpectedly unavailable 2024-10-31 21:25:43 +11:00
rustc_codegen_ssa Rollup merge of #132354 - koute:master, r=workingjubilee 2024-10-31 12:35:56 +01:00
rustc_const_eval Rollup merge of #132246 - workingjubilee:campaign-on-irform, r=compiler-errors 2024-10-30 14:01:37 -07:00
rustc_data_structures Replace an FTP link in comments with an equivalent HTTPS link 2024-10-24 17:02:11 +11:00
rustc_driver
rustc_driver_impl fix clippy::clone_on_ref_ptr for compiler 2024-10-28 18:05:08 +03:00
rustc_error_codes Reject generic self types. 2024-10-30 10:48:08 +00:00
rustc_error_messages Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_errors Rollup merge of #131375 - klensy:clone_on_ref_ptr, r=cjgillot 2024-10-29 03:11:39 -07:00
rustc_expand Rollup merge of #132332 - nnethercote:use-token_descr-more, r=estebank 2024-10-30 06:40:36 +01:00
rustc_feature Rollup merge of #131984 - dingxiangfei2009:stabilize-if-let-rescope, r=traviscross,lcnr 2024-10-29 18:38:57 +01:00
rustc_fluent_macro use tracked_path in rustc_fluent_macro 2024-10-19 22:32:38 +08:00
rustc_fs_util Couple of changes to make it easier to compile rustc for wasm 2024-09-26 19:51:14 +00:00
rustc_graphviz Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_hir Encode cross-crate opaque type origin 2024-10-31 01:35:13 +00:00
rustc_hir_analysis Rollup merge of #132209 - compiler-errors:modifiers, r=fmease 2024-10-31 17:50:40 -07:00
rustc_hir_pretty compiler: Switch to rustc_abi in hir_pretty, lint_defs, and mir_build 2024-10-30 22:38:49 -07:00
rustc_hir_typeck Auto merge of #132301 - compiler-errors:adjust, r=lcnr 2024-10-31 10:17:49 +00:00
rustc_incremental nightly feature tracking: get rid of the per-feature bool fields 2024-10-23 09:14:41 +01:00
rustc_index Rollup merge of #130625 - heiseish:issue-124028-fix, r=jieyouxu 2024-10-10 12:49:18 +02:00
rustc_index_macros Remove 'apostrophes' from rustc_parse_format 2024-10-14 23:22:51 +02:00
rustc_infer Encode cross-crate opaque type origin 2024-10-31 01:35:13 +00:00
rustc_interface fix clippy::clone_on_ref_ptr for compiler 2024-10-28 18:05:08 +03:00
rustc_lexer Reserve guarded string literals (RFC 3593) 2024-10-08 18:21:16 -06:00
rustc_lint Rollup merge of #132357 - m-ou-se:explicit-abi, r=compiler-errors 2024-10-31 17:50:41 -07:00
rustc_lint_defs compiler: Switch to rustc_abi in hir_pretty, lint_defs, and mir_build 2024-10-30 22:38:49 -07:00
rustc_llvm Rollup merge of #132342 - Zalathar:operand-bundle, r=workingjubilee 2024-10-30 06:40:38 +01:00
rustc_log Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_macros give a better error for tuple structs in derive(Diagnostic) 2024-10-27 21:23:28 -04:00
rustc_metadata Auto merge of #131186 - compiler-errors:precise-capturing-borrowck, r=estebank 2024-10-31 03:36:06 +00:00
rustc_middle Auto merge of #132301 - compiler-errors:adjust, r=lcnr 2024-10-31 10:17:49 +00:00
rustc_mir_build Rollup merge of #132385 - workingjubilee:move-abi-to-rustc-abi, r=jieyouxu,compiler-errors 2024-10-31 17:50:42 -07:00
rustc_mir_dataflow Remove ValueAnalysis and ValueAnalysisWrapper. 2024-10-31 12:46:26 +11:00
rustc_mir_transform Auto merge of #132356 - jieyouxu:unsound-simplify_aggregate_to_copy, r=cjgillot,DianQK 2024-10-31 15:29:14 +00:00
rustc_monomorphize Auto merge of #132171 - matthiaskrgr:rollup-tp75ge7, r=matthiaskrgr 2024-10-26 06:53:53 +00:00
rustc_next_trait_solver Merge HostPolarity and BoundConstness 2024-10-30 16:23:16 +00:00
rustc_parse Improve the missing_abi lint. 2024-10-31 10:55:45 +01:00
rustc_parse_format Remove 'apostrophes' from rustc_parse_format 2024-10-14 23:22:51 +02:00
rustc_passes Rollup merge of #132246 - workingjubilee:campaign-on-irform, r=compiler-errors 2024-10-30 14:01:37 -07:00
rustc_pattern_analysis compiler: Add rustc_abi dependence to the compiler 2024-10-27 21:10:58 -07:00
rustc_privacy Merge HostPolarity and BoundConstness 2024-10-30 16:23:16 +00:00
rustc_query_impl Handle rustc_query_impl cases of rustc::potential_query_instability lint 2024-10-03 12:47:08 +03:00
rustc_query_system fix clippy::clone_on_ref_ptr for compiler 2024-10-28 18:05:08 +03:00
rustc_resolve Review comments. 2024-10-30 16:20:49 +00:00
rustc_sanitizers Rollup merge of #131049 - compiler-errors:more-validation, r=spastorino 2024-10-22 15:28:38 +02:00
rustc_serialize Fix explicit_iter_loop in rustc_serialize 2024-10-16 15:44:16 +02:00
rustc_session fix libc call from i8 to u8 2024-10-30 09:17:44 -04:00
rustc_smir compiler: rustc_abi::Abi => BackendRepr 2024-10-29 14:56:00 -07:00
rustc_span Rollup merge of #131375 - klensy:clone_on_ref_ptr, r=cjgillot 2024-10-29 03:11:39 -07:00
rustc_symbol_mangling compiler: Add rustc_abi dependence to the compiler 2024-10-27 21:10:58 -07:00
rustc_target Rollup merge of #132385 - workingjubilee:move-abi-to-rustc-abi, r=jieyouxu,compiler-errors 2024-10-31 17:50:42 -07:00
rustc_trait_selection Auto merge of #132301 - compiler-errors:adjust, r=lcnr 2024-10-31 10:17:49 +00:00
rustc_traits TypingMode 🤔 2024-10-29 17:01:24 +01:00
rustc_transmute Rollup merge of #132255 - workingjubilee:layout-is-🏚️, r=compiler-errors 2024-10-28 10:18:50 -07:00
rustc_ty_utils Auto merge of #131186 - compiler-errors:precise-capturing-borrowck, r=estebank 2024-10-31 03:36:06 +00:00
rustc_type_ir Merge HostPolarity and BoundConstness 2024-10-30 16:23:16 +00:00
rustc_type_ir_macros do not relate Abi and Safety 2024-10-22 23:13:04 +02:00
stable_mir Rollup merge of #132085 - celinval:update-smir-doc, r=compiler-errors 2024-10-24 23:23:55 -07:00