rust/compiler
Jonathan Brouwer cb6eb81c91
Rollup merge of #151874 - khyperia:error-unsized-anonconst, r=BoxyUwU
error on unsized AnonConsts

The constant evaluator does not support unsized types, however, unsized AnonConsts were never checked to be Sized, so no errors were generated on them and the constant was attempted to be constant evaluated. This caused the constant evaluator to ICE.

Add a special case for AnonConsts in rustc_hir_typeck, as suggested by @BoxyUwU in rust-lang/rust#137582. There is no checking for `#![feature(unsized_const_params)]` which should eventually revert this check when the feature becomes more implemented.

That issue is assigned to @el-ev but I started looking into this as a jumping off point / motivation to learn some compiler stuff, and I eventually got to the point of fixing it, so I'm submitting a PR anyway. So just a ping/FYI to @el-ev that I'm submitting this, sorry!

There are three relevant github issues to this ICE that I could find:

- fixes rust-lang/rust#137582
- fixes rust-lang/rust#151591

The similar issue rust-lang/rust#104685 is NOT fixed, it might be good to glance at that before verifying this particular fix, to make sure this fix is actually in the right place. (I haven't looked at it much)

r? @BoxyUwU
2026-02-03 18:54:49 +01:00
..
rustc Auto merge of #148925 - madsmtm:jemalloc-perf, r=Kobzol 2025-11-23 20:34:07 +00:00
rustc_abi Auto merge of #151065 - nagisa:add-preserve-none-abi, r=petrochenkov 2026-01-25 02:49:32 +00:00
rustc_arena Remove unused method DroplessArena::contains_slice 2026-01-31 22:56:49 +11:00
rustc_ast Handle unbalanced delimiters gracefully in make_attr_token_stream 2026-02-01 13:16:32 +00:00
rustc_ast_ir Implement &pin patterns and ref pin bindings 2025-11-10 09:57:08 +08:00
rustc_ast_lowering Rollup merge of #147996 - pmur:murp/stabilize-ppc-inlineasm, r=Amanieu 2026-01-27 12:50:49 +11:00
rustc_ast_passes Auto merge of #151065 - nagisa:add-preserve-none-abi, r=petrochenkov 2026-01-25 02:49:32 +00:00
rustc_ast_pretty Fix missing syntax context in lifetime hygiene debug output 2026-01-29 12:07:01 +00:00
rustc_attr_parsing Port rustc_mir to attribute parser 2026-02-03 13:55:45 +00:00
rustc_baked_icu_data Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_borrowck Rollup merge of #151172 - estebank:default-field-values, r=dianne 2026-02-02 18:52:13 +01:00
rustc_builtin_macros Use rustc_parse's Recovery instead of a boolean 2026-02-02 15:01:32 +01:00
rustc_codegen_cranelift Auto merge of #151065 - nagisa:add-preserve-none-abi, r=petrochenkov 2026-01-25 02:49:32 +00:00
rustc_codegen_gcc Omit standard copyright notice 2026-01-26 17:31:34 +00:00
rustc_codegen_llvm Rollup merge of #150893 - ZuseZ4:move-un-register-lib, r=oli-obk 2026-01-28 19:03:51 +11:00
rustc_codegen_ssa Use Rustc prefix for rustc attrs in AttributeKind 2026-01-29 14:52:09 +00:00
rustc_const_eval fix issues and ui tests, address reviews 2026-01-30 15:59:34 +00:00
rustc_data_structures Auto merge of #138405 - Zoxc:vec-cache-tweaks, r=Mark-Simulacrum 2026-02-01 18:57:12 +00:00
rustc_driver Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_driver_impl Rollup merge of #152045 - JonathanBrouwer:rustc_infer_convert, r=lqd 2026-02-03 18:54:47 +01:00
rustc_error_codes Fix tidy formatting manually for E0423.md 2026-01-31 10:46:58 +05:30
rustc_error_messages Add inline syntax for diagnostic messages 2026-02-01 11:11:59 +01:00
rustc_errors Add inline syntax for diagnostic messages 2026-02-01 11:11:59 +01:00
rustc_expand Use rustc_parse's Recovery instead of a boolean 2026-02-02 15:01:32 +01:00
rustc_feature fix issues and ui tests, address reviews 2026-01-30 15:59:34 +00:00
rustc_fluent_macro Bump stage0 2026-01-21 20:03:56 -05:00
rustc_fs_util Avoid using env::temp when linking a binary 2025-12-24 06:41:42 +00:00
rustc_graphviz change non-canonical clone impl to {*self}, fix some doc comments 2025-12-20 13:46:22 +00:00
rustc_hashes some cleanups in compiler 2025-10-12 08:08:30 +00:00
rustc_hir Port rustc_mir to attribute parser 2026-02-03 13:55:45 +00:00
rustc_hir_analysis Rollup merge of #149263 - frank-king:feature/unpin-check, r=BoxyUwU 2026-02-03 18:54:47 +01:00
rustc_hir_id
rustc_hir_pretty Introduce hir::ConstArgKind::Array 2026-01-10 12:41:50 +09:00
rustc_hir_typeck Rollup merge of #151874 - khyperia:error-unsized-anonconst, r=BoxyUwU 2026-02-03 18:54:49 +01:00
rustc_incremental Make Deps::name lookup a non-self associated function 2026-01-21 12:02:26 +11:00
rustc_index simplify words initialization using Rc::new_zeroed 2026-01-16 04:25:12 +05:30
rustc_index_macros
rustc_infer Convert to inline diagnostics in rustc_infer 2026-02-03 15:14:49 +01:00
rustc_interface Rename collect_active_jobs to several distinct names 2026-02-03 20:10:22 +11:00
rustc_lexer lexer/parser: ensure deps use the same unicode version 2025-12-27 11:20:42 +01:00
rustc_lint Rollup merge of #151886 - chenyukang:yukang-fix-151846-unused-allocation-box-ref, r=petrochenkov 2026-01-31 21:42:45 +01:00
rustc_lint_defs resolve: Report more early resolution ambiguities for imports 2026-02-02 14:44:13 +03:00
rustc_llvm Rollup merge of #150780 - fzakaria:fzakaria/section-threshold, r=jackh726 2026-01-23 11:07:55 +01:00
rustc_log Restrict sysroot crate imports to those defined in this repo. 2025-10-15 13:17:25 +01:00
rustc_macros Rollup merge of #152017 - Zoxc:query-rem-with_no_trimmed_paths, r=lqd 2026-02-03 21:58:41 +11:00
rustc_metadata Port crate_type to attribute parser 2026-01-22 02:34:28 +00:00
rustc_middle Auto merge of #151853 - Zalathar:feed-vtable, r=oli-obk 2026-02-03 14:09:42 +00:00
rustc_mir_build refactor: add an enum DerefAdjustKind in favor of Option<OverloadedDeref> 2026-01-31 16:25:32 +08:00
rustc_mir_dataflow Port rustc_mir to attribute parser 2026-02-03 13:55:45 +00:00
rustc_mir_transform coverage: Add a test case for a previously-unknown span mismatch 2026-02-03 22:53:38 +11:00
rustc_monomorphize Rollup merge of #151441 - Keith-Cancel:mgca3, r=BoxyUwU 2026-01-22 13:35:42 +01:00
rustc_next_trait_solver Part 2 refactoring of moving placeholder types to rustc_type_ir 2026-01-29 11:11:40 +00:00
rustc_parse Rollup merge of #151102 - zachs18:mut-ref-in-struct-pattern-shorthand-gate, r=JonathanBrouwer 2026-01-31 21:42:46 +01:00
rustc_parse_format Rollup merge of #151013 - ehuss:fmt-clarification, r=joboet 2026-01-28 19:03:51 +11:00
rustc_passes Port rustc_mir to attribute parser 2026-02-03 13:55:45 +00:00
rustc_pattern_analysis refactor: remove Ty::pinned_ref in favor of Ty::maybe_pinned_ref 2026-01-30 14:22:41 +08:00
rustc_privacy Auto merge of #151168 - petrochenkov:rprivtit, r=eholk 2026-01-30 01:45:52 +00:00
rustc_proc_macro Update literal-escaper version to 0.0.7 2026-01-08 14:10:33 +01:00
rustc_public Rollup merge of #150271 - Jamesbarford:chore/refactor-struct-placeholder-pt2, r=lcnr 2026-01-29 17:47:29 +01:00
rustc_public_bridge Overhaul filename handling for cross-compiler consistency 2025-12-12 07:33:09 +01:00
rustc_query_impl Rename collect_active_jobs to several distinct names 2026-02-03 20:10:22 +11:00
rustc_query_system Auto merge of #151853 - Zalathar:feed-vtable, r=oli-obk 2026-02-03 14:09:42 +00:00
rustc_resolve Auto merge of #152025 - jhpratt:rollup-Kxb6k3Y, r=jhpratt 2026-02-03 04:44:02 +00:00
rustc_sanitizers Include assoc const projections in CFI trait object 2026-02-01 22:45:43 +08:00
rustc_serialize Allow internal_features lint in doc tests 2025-11-05 11:25:29 +00:00
rustc_session Rollup merge of #151589 - Urgau:documentation-scope, r=GuillaumeGomez 2026-01-26 14:36:22 +11:00
rustc_span resolve: Avoid double normalization in resolve_ident_in_module 2026-01-31 10:03:25 +03:00
rustc_symbol_mangling Fix v0 symbol mangling for assoc const bindings 2026-01-21 12:53:45 +01:00
rustc_target Rollup merge of #151568 - androm3da:bcain/hexagon_linker_cfg, r=Noratrieb 2026-02-02 10:28:32 +11:00
rustc_thread_pool change non-canonical clone impl to {*self}, fix some doc comments 2025-12-20 13:46:22 +00:00
rustc_trait_selection Rollup merge of #151754 - mu001999-contrib:fix/151708, r=BoxyUwU 2026-02-03 18:54:48 +01:00
rustc_traits implied bounds comments 2026-01-19 16:08:54 +00:00
rustc_transmute Clean up src/dst transmute mess. 2026-01-12 09:22:58 +11:00
rustc_ty_utils Part 2 refactoring of moving placeholder types to rustc_type_ir 2026-01-29 11:11:40 +00:00
rustc_type_ir Part 2 refactoring of moving placeholder types to rustc_type_ir 2026-01-29 11:11:40 +00:00
rustc_type_ir_macros Provide an extended framework for type visit, for use in rust-analyzer 2025-12-16 01:47:28 +02:00
rustc_windows_rc [win] Use find-msvc-tools instead of cc to find the linker and rc on Windows 2025-09-19 12:00:30 -07:00