rust/compiler/rustc_middle/src
bors d9b4598d7e Auto merge of #135753 - compiler-errors:from-ty-const, r=oli-obk
Get rid of `mir::Const::from_ty_const`

This function is strange, because it turns valtrees into `mir::Const::Value`, but the rest of the const variants stay as type system consts.

All of the callsites except for one in `instsimplify` (array length simplification of `ptr_metadata` call) just go through the valtree arm of the function, so it's easier to just create a `mir::Const` directly for those.

For the instsimplify case, if we have a type system const we should *keep* having a type system const, rather than turning it into a `mir::Const::Value`; it doesn't really matter in practice, though, bc `usize` has no padding, but it feels more principled.
2025-01-26 09:26:34 +00:00
..
dep_graph Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
hir Auto merge of #134478 - compiler-errors:attr-span, r=oli-obk 2025-01-22 14:46:41 +00:00
hooks Move some code from Compiler::enter to GlobalCtxt::finish 2024-11-09 17:55:39 +00:00
infer remove non-borrowck member constraints 2024-12-20 10:04:01 +01:00
middle Rename OptimizeAttr::None to Default 2025-01-24 19:34:01 +00:00
mir Auto merge of #135753 - compiler-errors:from-ty-const, r=oli-obk 2025-01-26 09:26:34 +00:00
query coverage: Make query coverage_ids_info return an Option 2025-01-24 16:13:11 +11:00
thir Introduce default_field_values feature 2024-12-09 21:55:01 +00:00
traits remove support for the #[start] attribute 2025-01-21 06:59:15 -07:00
ty Auto merge of #135753 - compiler-errors:from-ty-const, r=oli-obk 2025-01-26 09:26:34 +00:00
util Assert that Instance::try_resolve is only used on body-like things 2025-01-13 02:20:08 +00:00
arena.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
error.rs Move some code from Compiler::enter to GlobalCtxt::finish 2024-11-09 17:55:39 +00:00
lib.rs use fmt::from_fn in more places, instead of using structs that impl formatting traits 2025-01-24 14:45:56 +00:00
lint.rs make it possible to silence linker warnings with a crate-level attribute 2025-01-20 16:46:00 -05:00
macros.rs Improve const traits diagnostics for new desugaring 2024-10-02 19:45:17 +08:00
metadata.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
tests.rs Give an item related to issue 27438 a more meaningful name 2024-04-30 22:27:19 +02:00
thir.rs Introduce default_field_values feature 2024-12-09 21:55:01 +00:00
values.rs Split hir TyKind and ConstArgKind in two and update hir::Visitor 2025-01-23 06:01:36 +00:00