rust/tests
Jonathan Brouwer 4c9451bff8
Rollup merge of #150102 - jdonszelmann:fix-149982, r=Kivooeo
Fixed ICE for EII with multiple defaults due to duplicate definition in nameres

r? ``@jieyouxu`` (since you looked at the other one)

Fixes https://github.com/rust-lang/rust/issues/149982

Previously a [fix was proposed](https://github.com/rust-lang/rust/pull/149985) by ``@SATVIKsynopsis`` which I marked as co-author on the first commit for the test they contributed. I'm closing this previous PR.

Duplicate definitions of EII defaults shouldn't be possible. I want to still panic on them, since I want to know when other bugs exist. However, in this case the duplicate was caused by something more subtle: both eiis have the same name, and as such a "duplicate definition" error is given. However, the compiler gracefully continues compiling despite that, assuming only one of the two EIIs is actually defined.

Both defaults then name resolve, and find the same single remaining EII, and both register themselves to be its default, breaking the single-default assumption.

The solution: I added a span-delayed-bug, to make sure we only panic if we hadn't previously had this duplicate definition name resolution error.

Thanks to ``@SATVIKsynopsis`` for their attempt. Adding a diagnostic here could make some sense, but nonetheless I think this is the better solution here <3
Also thanks to ``@yaahc`` for debugging help, she made me understand the name resolution of the situation so much better and is just lovely in general :3

The last commit is something I tried during debugging, which felt like a relevant test to add (one where both eiis also have the same function name)
2025-12-18 18:37:21 +01:00
..
assembly-llvm Rollup merge of #148849 - saethlin:windows-stack-protectors, r=wesleywiser 2025-12-18 18:37:14 +01:00
auxiliary Rework c_variadic 2025-12-04 10:51:34 +01:00
codegen-llvm Auto merge of #143924 - davidtwco:sve-infrastructure, r=workingjubilee 2025-12-16 12:53:53 +00:00
codegen-units Add #[inline] to Layout::is_size_align_valid 2025-12-06 19:47:13 -06:00
coverage Auto merge of #142821 - cjgillot:jump-threading-single, r=saethlin 2025-12-01 23:44:49 +00:00
coverage-run-rustdoc
crashes Mark crash 140011 as fixed 2025-12-17 20:47:48 +01:00
debuginfo debuginfo/macro-stepping test: extend comments 2025-12-01 22:32:36 +01:00
incremental Add unsafe to no_mangle incremental tests 2025-12-03 17:00:22 +01:00
mir-opt ExprUseVisitor: remove maybe_read_scrutinee 2025-12-17 20:47:47 +01:00
pretty Support attribute inheritance in delegation 2025-12-12 20:34:54 +03:00
run-make Rollup merge of #149994 - Flakebi:amdgpu-vectors, r=jieyouxu 2025-12-15 08:08:04 +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 Fix invalid handling of field followed by negated macro call 2025-12-17 17:06:47 +01:00
rustdoc-gui Make implementors list visible only when filled 2025-12-10 16:18:22 +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 #150102 - jdonszelmann:fix-149982, r=Kivooeo 2025-12-18 18:37:21 +01:00
ui-fulldeps Point at span within local macros even when error happens in nested external macro 2025-12-10 19:27:40 +00:00
COMPILER_TESTS.md