rust/tests
Matthias Krüger 1fe148371a
Rollup merge of #148173 - tiif:fix-opaque-ice, r=BoxyUwU
Emit delayed bug during wfck for stranded opaque

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/235

## Problem

The fundamental issue here is ``OpaqueTypeCollector`` operates on ``rustc_middle::Ty``, but ``check_type_wf`` operates on HIR.

Since [check_type_wf](2f7620a5cc/compiler/rustc_hir_analysis/src/check/wfcheck.rs (L2262)) operates on HIR, it can see the stranded opaque and tries to infer it's hidden type. But ``OpaqueTypeCollector`` operates on ``rustc_middle::Ty``, so the ``OpaqueTypeCollector`` can no longer see a stranded opaque, hence its hidden type could not be inferred.

As a result, the tests ICE'ed at 34a8c7368c/compiler/rustc_hir_analysis/src/collect/type_of/opaque.rs (L253)

## Proposed solution

This PR detects stranded opaque types during wf check and emit a delayed bug for it.

## Alternative solution

`@BoxyUwU` and I had considered rewriting ``OpaqueTypeCollector`` to be a HIR visitor instead of a ``rustc_middle::Ty`` visitor, but we believe a HIR-based ``OpaqueTypeCollector`` will not work and might not worth the cost of rewriting.

## Acknowledgement

This PR is a joint effort with `@BoxyUwU` :3
2025-10-28 17:49:29 +01:00
..
assembly-llvm Add support for //@ ignore-i586 2025-10-21 12:39:49 +11:00
auxiliary Add test for addrspacecasting global vars 2025-09-03 08:40:51 +02:00
codegen-llvm Auto merge of #147890 - tmiasko:deduce-captures-none, r=cjgillot 2025-10-26 20:37:03 +00:00
codegen-units pub async fn implementation coroutine (func::{closure#0}) is monomorphized, when func itself is monomorphized 2025-09-01 13:45:00 +07:00
coverage Add coverage scope for controlling paths in code coverage 2025-10-27 12:54:24 +01:00
coverage-run-rustdoc
crashes add crashes tests for overlapping spans 2025-10-23 22:15:34 +00:00
debuginfo Re-enable macro-stepping test for AArch64 2025-10-27 10:26:57 +00:00
incremental Add a fast path for lowering trivial consts 2025-10-25 16:59:53 -04:00
mir-opt Auto merge of #147083 - dianne:non-extended-indices, r=matthewjasper 2025-10-28 03:02:00 +00:00
pretty Update autodiff tests for the new intrinsics impl 2025-08-14 18:33:43 +00:00
run-make fix panic when rustc tries to reduce intermediate filenames length with multi byte chars 2025-10-24 16:20:29 +02:00
run-make-cargo Skip the panic-immediate-abort-works test when cross-compiling 2025-09-22 21:13:38 -04:00
rustdoc Fix invalid jump to def link generated on derive attributes 2025-10-22 16:59:57 +02:00
rustdoc-gui rustdoc-search: add test case for throbber 2025-10-07 12:59:58 -07:00
rustdoc-js rustdoc-search: add an integration test for CCI 2025-10-27 11:57:32 -07:00
rustdoc-js-std rustdoc search: relax rules for identifiers 2025-10-20 12:58:55 -05:00
rustdoc-json Add tests for doc(attribute = "...") attribute 2025-08-28 15:56:30 +02:00
rustdoc-ui [rustdoc] Check doc(cfg()) even of private/hidden items 2025-10-22 17:32:20 +02:00
ui Rollup merge of #148173 - tiif:fix-opaque-ice, r=BoxyUwU 2025-10-28 17:49:29 +01:00
ui-fulldeps Replace NullOp::SizeOf and NullOp::AlignOf by lang items. 2025-10-23 00:38:28 +00:00
COMPILER_TESTS.md