rust/compiler
Stuart Cook dbc2193d37
Rollup merge of #152729 - Enselic:single_use_consts-not-required, r=cjgillot
compiler: Don't mark `SingleUseConsts` MIR pass as "required for soundness"

I don't think this MIR pass is required for soundness. The reasons are:
* Something like it was not enabled by default before PR rust-lang/rust#107404 which was the precursor to `SingleUseConsts` (see rust-lang/rust#125910 for the switch).
* By following the advice from https://github.com/rust-lang/rust/pull/128657#discussion_r1705114015 we can conclude it is not required for soundness since it has only ever run on MIR opt level > 0.
* Its [`MirPass::can_be_overridden()`](0ee7d96253/compiler/rustc_mir_transform/src/pass_manager.rs (L98-L102)) is unchanged and thus returns `true`, indicating that it is not a required MIR pass.
* PR CI pass in rust-lang/rust#151426 which stops enabling it by default in non-optimized builds.

As shown in the updated test `tests/mir-opt/optimize_none.rs`, `#[optimize(none)]` functions become even less optimized, as expected and desired.

Unblocks https://github.com/rust-lang/rust/pull/151426.
2026-02-18 17:29:43 +11:00
..
rustc Return ExitCode from rustc_driver::main 2026-01-23 21:04:27 +00:00
rustc_abi Rollup merge of #152469 - mu001999-contrib:cleanup/unused-features, r=nadrieril,jdonszelmann 2026-02-13 13:34:58 +01:00
rustc_arena Replace some feature(core_intrinsics) with stable hints 2026-02-08 18:21:47 +11:00
rustc_ast Parse and lower final for methods 2026-02-12 15:12:29 +08: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 #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustc_ast_passes Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustc_ast_pretty Parse and lower final for methods 2026-02-12 15:12:29 +08:00
rustc_attr_parsing Port #![default_lib_allocator] to the new attribute parser 2026-02-16 19:42:12 +00:00
rustc_baked_icu_data Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_borrowck Rename inline_fluent! to msg! 2026-02-14 13:47:52 +01:00
rustc_builtin_macros Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustc_codegen_cranelift Rollup merge of #152512 - okaneco:exact_integer, r=tgross35 2026-02-17 13:02:22 +11:00
rustc_codegen_gcc add write_box_via_move intrinsic and use it for vec! 2026-02-16 17:27:40 +01:00
rustc_codegen_llvm Remove last remnants of rustc_query_system. 2026-02-16 22:56:47 +11:00
rustc_codegen_ssa Remove code for ThinLTO from cg_gcc 2026-02-15 10:05:48 +00:00
rustc_const_eval tail calls: fix copying non-scalar arguments to callee 2026-02-17 22:17:58 +01:00
rustc_data_structures Fix wrong par_slice implementation 2026-02-16 17:49:42 +03:00
rustc_driver Unify the configuration of the compiler docs 2025-11-05 11:25:27 +00:00
rustc_driver_impl Rollup merge of #152250 - JonathanBrouwer:convert_finish, r=jdonszelmann 2026-02-08 19:15:25 +01:00
rustc_error_codes Rollup merge of #152206 - tshepang:misc, r=davidtwco 2026-02-17 13:02:23 +11:00
rustc_error_messages Remove SubdiagMessage in favour of the identical DiagMessage 2026-02-10 09:13:45 +00:00
rustc_errors Rename inline_fluent! to msg! 2026-02-14 13:47:52 +01:00
rustc_expand Rollup merge of #152206 - tshepang:misc, r=davidtwco 2026-02-17 13:02:23 +11:00
rustc_feature remove the issue_5723_bootstrap feature 2026-02-17 10:54:04 +00: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 Rollup merge of #152728 - Ozzy1423:default-lib, r=JonathanBrouwer 2026-02-17 13:02:25 +11:00
rustc_hir_analysis Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustc_hir_id
rustc_hir_pretty Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
rustc_hir_typeck Rollup merge of #152727 - lcnr:method-ambig-err-taint, r=jackh726 2026-02-17 13:02:25 +11:00
rustc_incremental De-genericize the dep graph. 2026-02-15 13:07:37 +11:00
rustc_index Remove unused features in compiler 2026-02-13 09:25:39 +08:00
rustc_index_macros
rustc_infer Auto merge of #151380 - ShoyuVanilla:shallow-resolve-to-root-var, r=lcnr 2026-02-15 03:04:28 +00:00
rustc_interface Remove wrapper struct QueryCtxt 2026-02-17 17:30:55 +11:00
rustc_lexer Remove rustc_lexer::cursor module. 2026-01-27 12:06:55 +11:00
rustc_lint Port rustc_nonnull_optimization_guaranteed to the new attribute parser 2026-02-16 09:46:04 +01:00
rustc_lint_defs Rollup merge of #152206 - tshepang:misc, r=davidtwco 2026-02-17 13:02:23 +11:00
rustc_llvm Fix multi-cgu+debug builds using autodiff by delaying autodiff till lto 2026-02-11 14:08:56 -05:00
rustc_log Restrict sysroot crate imports to those defined in this repo. 2025-10-15 13:17:25 +01:00
rustc_macros Remove last remnants of rustc_query_system. 2026-02-16 22:56:47 +11:00
rustc_metadata Rollup merge of #152609 - mati865:gnullvm-llvm-dll, r=bjorn3 2026-02-17 14:18:43 +01:00
rustc_middle Remove unnecessary trait HasDepContext 2026-02-17 17:30:56 +11:00
rustc_mir_build add helper to project to a field of a place 2026-02-16 17:27:40 +01:00
rustc_mir_dataflow Stabilize assert_matches 2026-02-11 14:13:44 +01:00
rustc_mir_transform Rollup merge of #152729 - Enselic:single_use_consts-not-required, r=cjgillot 2026-02-18 17:29:43 +11:00
rustc_monomorphize Rollup merge of #152329 - Zoxc:simple-parallel-macro, r=nnethercote 2026-02-13 15:19:12 +11:00
rustc_next_trait_solver Rollup merge of #152383 - RalfJung:BikeshedGuaranteedNoDrop, r=TaKO8Ki 2026-02-11 13:48:50 +01:00
rustc_parse Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustc_parse_format rustc_parse_format: improve diagnostics for unsupported debug = syntax 2026-02-06 00:44:03 +05:30
rustc_passes Port #![default_lib_allocator] to the new attribute parser 2026-02-16 19:42:12 +00:00
rustc_pattern_analysis Rollup merge of #152469 - mu001999-contrib:cleanup/unused-features, r=nadrieril,jdonszelmann 2026-02-13 13:34:58 +01:00
rustc_privacy Rollup merge of #151887 - scottmcm:homogeneous-try-in-compiler, r=jackh726 2026-02-08 16:58:23 +11: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 Remove unused features in compiler 2026-02-13 09:25:39 +08:00
rustc_query_impl Don't use HasDepContext in DepGraph::with_task 2026-02-17 17:30:55 +11:00
rustc_resolve Make suggestion verbose and fix incorrect suggestion usage 2026-02-17 16:51:53 +00:00
rustc_sanitizers Include assoc const projections in CFI trait object 2026-02-01 22:45:43 +08:00
rustc_serialize Remove unused features in compiler 2026-02-13 09:25:39 +08:00
rustc_session Remove code for ThinLTO from cg_gcc 2026-02-15 10:05:48 +00:00
rustc_span Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustc_symbol_mangling Stabilize assert_matches 2026-02-11 14:13:44 +01:00
rustc_target Rollup merge of #152552 - androm3da:hexagon-hvx-abi-rules, r=madsmtm 2026-02-13 15:19:15 +11:00
rustc_thread_pool Fix typos and grammar in compiler and build documentation 2026-02-10 10:22:05 -05:00
rustc_trait_selection Rollup merge of #152637 - JohnTitor:issue-65866, r=estebank 2026-02-18 17:29:42 +11: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 Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead 2026-02-17 13:02:21 +11:00
rustc_type_ir Rollup merge of #149904 - ShoyuVanilla:ns-remove-sg-hack, r=lcnr 2026-02-17 14:18:44 +01: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