rust/tests
Jonathan Brouwer ef835a83ee
Rollup merge of #149667 - Shinonn23:fix-ice-constblock-148138, r=dianne
Fix ICE by rejecting const blocks in patterns during AST lowering (closes #148138)

This PR fixes the ICE reported in rust-lang/rust#148138.

The root cause is that `const` blocks aren’t allowed in pattern position, but the AST lowering logic still attempted to create `PatExprKind::ConstBlock`, allowing invalid HIR to reach type checking and trigger a `span_bug!`.

Following the discussion in the issue, this patch removes the `ConstBlock` lowering path from `lower_expr_within_pat`. Any `ExprKind::ConstBlock` inside a pattern is now handled consistently with other invalid pattern expressions.

A new UI test is included to ensure the compiler reports a proper error and to prevent regressions.

Closes rust-lang/rust#148138.
2025-12-28 22:52:31 +01:00
..
assembly-llvm Nvptx: Use llbc as default linker 2025-12-19 21:39:48 +01:00
auxiliary Rework c_variadic 2025-12-04 10:51:34 +01:00
codegen-llvm Auto merge of #148766 - cjgillot:mir-const-runtime-checks, r=RalfJung,saethlin 2025-12-22 06:58:28 +00:00
codegen-units Don't treat asserts as a call in cross-crate inlining 2025-12-18 19:12:09 -05:00
coverage Create place and value indices on-demand. 2025-12-14 16:33:24 +00:00
coverage-run-rustdoc
crashes Lower hir::ConstArgKind::Struct to a ValTree 2025-12-23 13:54:59 +00:00
debuginfo tests/debuginfo/function-arg-initialization.rs: Stop disabling SingleUseConsts MIR pass 2025-12-20 20:35:30 +01:00
incremental Add unsafe to no_mangle incremental tests 2025-12-03 17:00:22 +01:00
mir-opt Auto merge of #149775 - WaffleLapkin:core-mem-maybe-dangling, r=Mark-Simulacrum 2025-12-27 09:45:21 +00:00
pretty Recursive delegation improvements 2025-12-25 14:49:01 +03:00
run-make Rollup merge of #150311 - ChrisDenton:no-temp, r=Kivooeo 2025-12-24 14:19:22 +01:00
run-make-cargo tests/run-make-cargo/same-crate-name-and-macro-name: New regression test 2025-12-17 11:21:27 +01:00
rustdoc rustdoc: fix duplicate Re-exports sections 2025-12-25 12:31:23 -05:00
rustdoc-gui Add GUI test for copying code when line numbers are displayed in code examples 2025-12-26 20:24:50 +01:00
rustdoc-js Auto merge of #149370 - Zalathar:rollup-6fkk5x4, r=Zalathar 2025-11-27 07:30:25 +00:00
rustdoc-js-std std: Use more unix.rs code on WASI targets 2025-12-08 06:46:28 -08:00
rustdoc-json Add tests for doc(attribute = "...") attribute 2025-08-28 15:56:30 +02:00
rustdoc-ui Rollup merge of #149949 - JonathanBrouwer:error_cleanup, r=jdonszelmann 2025-12-14 20:04:56 +01:00
ui Rollup merge of #149667 - Shinonn23:fix-ice-constblock-148138, r=dianne 2025-12-28 22:52:31 +01:00
ui-fulldeps lexer/parser: ensure deps use the same unicode version 2025-12-27 11:20:42 +01:00
COMPILER_TESTS.md