rust/compiler
Guillaume Gomez 208f6ed95c
Rollup merge of #115972 - RalfJung:const-consistency, r=oli-obk
rename mir::Constant -> mir::ConstOperand, mir::ConstKind -> mir::Const

Also, be more consistent with the `to/eval_bits` methods... we had some that take a type and some that take a size, and then sometimes the one that takes a type is called `bits_for_ty`.

Turns out that `ty::Const`/`mir::ConstKind` carry their type with them, so we don't need to even pass the type to those `eval_bits` functions at all.

However this is not properly consistent yet: in `ty` we have most of the methods on `ty::Const`, but in `mir` we have them on `mir::ConstKind`. And indeed those two types are the ones that correspond to each other. So `mir::ConstantKind` should actually be renamed to `mir::Const`. But what to do with `mir::Constant`? It carries around a span, that's really more like a constant operand that appears as a MIR operand... it's more suited for `syntax.rs` than `consts.rs`, but the bigger question is, which name should it get if we want to align the `mir` and `ty` types? `ConstOperand`? `ConstOp`? `Literal`? It's not a literal but it has a field called `literal` so it would at least be consistently wrong-ish...

``@oli-obk`` any ideas?
2023-09-21 13:25:39 +02:00
..
rustc
rustc_abi
rustc_arena
rustc_ast
rustc_ast_lowering Auto merge of #113955 - cjgillot:name-apit, r=WaffleLapkin 2023-09-19 21:23:39 +00:00
rustc_ast_passes
rustc_ast_pretty
rustc_attr
rustc_baked_icu_data
rustc_borrowck Rollup merge of #115972 - RalfJung:const-consistency, r=oli-obk 2023-09-21 13:25:39 +02:00
rustc_builtin_macros
rustc_codegen_cranelift Rollup merge of #115972 - RalfJung:const-consistency, r=oli-obk 2023-09-21 13:25:39 +02:00
rustc_codegen_gcc
rustc_codegen_llvm
rustc_codegen_ssa Rollup merge of #115972 - RalfJung:const-consistency, r=oli-obk 2023-09-21 13:25:39 +02:00
rustc_const_eval Rollup merge of #115972 - RalfJung:const-consistency, r=oli-obk 2023-09-21 13:25:39 +02:00
rustc_data_structures
rustc_driver
rustc_driver_impl Auto merge of #115627 - compiler-errors:icedump-no-std, r=m-ou-se 2023-09-19 16:56:25 +00:00
rustc_error_codes
rustc_error_messages
rustc_errors Prevent promotion of const fn calls in inline consts 2023-09-21 09:00:22 +00:00
rustc_expand
rustc_feature
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Prevent promotion of const fn calls in inline consts 2023-09-21 09:00:22 +00:00
rustc_hir_analysis Rollup merge of #115566 - zirconium-n:issue-107250-clean-up-unused-to-predicate, r=oli-obk 2023-09-20 17:33:16 +02:00
rustc_hir_pretty
rustc_hir_typeck Prevent promotion of const fn calls in inline consts 2023-09-21 09:00:22 +00:00
rustc_incremental
rustc_index
rustc_infer
rustc_interface
rustc_lexer
rustc_lint Rollup merge of #115257 - Urgau:invalid-utf8-walk-up-hir, r=Nilstrieb 2023-09-21 13:25:38 +02:00
rustc_lint_defs
rustc_llvm
rustc_log
rustc_macros
rustc_metadata Auto merge of #115542 - saethlin:fileencoder-is-bufwriter, r=WaffleLapkin 2023-09-20 21:47:54 +00:00
rustc_middle Rollup merge of #115972 - RalfJung:const-consistency, r=oli-obk 2023-09-21 13:25:39 +02:00
rustc_mir_build Rollup merge of #115972 - RalfJung:const-consistency, r=oli-obk 2023-09-21 13:25:39 +02:00
rustc_mir_dataflow rename mir::Constant -> mir::ConstOperand, mir::ConstKind -> mir::Const 2023-09-21 08:12:30 +02:00
rustc_mir_transform Rollup merge of #115972 - RalfJung:const-consistency, r=oli-obk 2023-09-21 13:25:39 +02:00
rustc_monomorphize Rollup merge of #115972 - RalfJung:const-consistency, r=oli-obk 2023-09-21 13:25:39 +02:00
rustc_parse
rustc_parse_format
rustc_passes Prevent promotion of const fn calls in inline consts 2023-09-21 09:00:22 +00:00
rustc_plugin_impl
rustc_privacy
rustc_query_impl
rustc_query_system Auto merge of #115542 - saethlin:fileencoder-is-bufwriter, r=WaffleLapkin 2023-09-20 21:47:54 +00:00
rustc_resolve fix confusing let chain indentation in rustc_resolve 2023-09-19 21:21:01 +01:00
rustc_serialize PR feedback 2023-09-20 16:49:13 -04:00
rustc_session coverage: Remove debug code from the instrumentor 2023-09-20 17:24:10 +10:00
rustc_smir Rollup merge of #115972 - RalfJung:const-consistency, r=oli-obk 2023-09-21 13:25:39 +02:00
rustc_span Auto merge of #115549 - saethlin:include-bytes-resilient, r=jackh726 2023-09-21 02:50:54 +00:00
rustc_symbol_mangling the Const::eval_bits methods don't need to be given the Ty 2023-09-20 07:27:21 +02:00
rustc_target rustc_target/loongarch: Fix passing of transparent unions with only one non-ZST member 2023-09-20 09:22:02 +08:00
rustc_trait_selection review 2023-09-21 08:57:47 +02:00
rustc_traits
rustc_transmute
rustc_ty_utils remove impl<'tcx> ToPredicate<'tcx, Clause<'tcx>> for PolyProjectionPredicate<'tcx> 2023-09-20 04:03:02 +08:00
rustc_type_ir