rust/tests
Stuart Cook 061f854d07
Rollup merge of #147382 - joshtriplett:unused-must-use-ignore-result-unit-uninhabited, r=fmease
unused_must_use: Don't warn on `Result<(), Uninhabited>` or `ControlFlow<Uninhabited, ()>`

This suppresses warnings on things like `Result<(), !>`, which helps simplify code using the common pattern of having an `Error` associated type: code will only have to check the error if there is a possibility of error.

This will, for instance, help with future refactorings of `write!` in the standard library.

As this is a user-visible change to lint behavior, it'll require a lang FCP.

---

My proposal, here, is that we handle this simple case to make common patterns more usable. This does not rule out the possibility of adding more cases in the future, including general trait-based cases. However, I don't think we should make this common case wait on the more general cases. In particular, this solution does not close any doors on replacing this special case with a general case.

This would unblock some planned work in the standard library to make `write!` more usable for infallible cases (e.g. writing into a `Vec` or `String`).
2025-10-20 16:12:54 +11:00
..
assembly-llvm Allow vector-scalar (vs) registers in ppc inline assembly 2025-10-14 09:52:56 -05:00
auxiliary Add test for addrspacecasting global vars 2025-09-03 08:40:51 +02:00
codegen-llvm Generalize the non-freeze and needs_drop handling. 2025-10-17 16:28:37 +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 Auto merge of #145882 - m-ou-se:format-args-extend-1-arg, r=petrochenkov 2025-09-26 04:34:09 +00:00
coverage-run-rustdoc
crashes Rollup merge of #147724 - chenyukang:yukang-fix-139815-ice, r=jdonszelmann 2025-10-18 23:54:45 +02:00
debuginfo Auto merge of #146414 - GuillaumeGomez:run-test-with-gcc-backend, r=Kobzol 2025-10-14 09:21:23 +00:00
incremental Ignore failing incremental tests for GCC backend 2025-10-13 15:20:49 +02:00
mir-opt GVN: Preserve derefs at terminators that cannot write to memory 2025-10-16 23:03:05 +08:00
pretty Update autodiff tests for the new intrinsics impl 2025-08-14 18:33:43 +00:00
run-make Rollup merge of #147526 - bjorn3:alloc_shim_weak_shape, r=petrochenkov,RalfJung 2025-10-14 19:47: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 Add regression test for doc cfg applied on public items inside private items 2025-09-29 18:08:51 +02:00
rustdoc-gui rustdoc-search: add test case for throbber 2025-10-07 12:59:58 -07:00
rustdoc-js rustdoc: add testcase for traitParent deduplication 2025-10-02 15:29:22 -05:00
rustdoc-js-std fix rustdoc tests broke by trait item filtering 2025-10-02 15:28:00 -05:00
rustdoc-json Add tests for doc(attribute = "...") attribute 2025-08-28 15:56:30 +02:00
rustdoc-ui Add regression tests for intra-doc links 2025-10-17 15:55:28 +02:00
ui Rollup merge of #147382 - joshtriplett:unused-must-use-ignore-result-unit-uninhabited, r=fmease 2025-10-20 16:12:54 +11:00
ui-fulldeps use declarative macro for #[derive(TryFromU32)] 2025-10-06 14:54:38 +00:00
COMPILER_TESTS.md