about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-03-17 16:34:47 +0100
committerGitHub <noreply@github.com>2025-03-17 16:34:47 +0100
commit9adf2189f55b6e20ab8b490cc75438ba5ef2e793 (patch)
treee9bd055031b655bbd005e0e89a28c00c6360ff8e /compiler/rustc_codegen_llvm/src
parent3d3f817ff92a9a59e6f2ed50ff76c01800614654 (diff)
parente250bd16da5d3016c45e91431fd7b97822f771c0 (diff)
downloadrust-9adf2189f55b6e20ab8b490cc75438ba5ef2e793.tar.gz
rust-9adf2189f55b6e20ab8b490cc75438ba5ef2e793.zip
Rollup merge of #137449 - compiler-errors:control-flow, r=Amanieu,lnicola
Denote `ControlFlow` as `#[must_use]`

I've repeatedly hit bugs in the compiler due to `ControlFlow` not being marked `#[must_use]`. There seems to be an accepted ACP to make the type `#[must_use]` (https://github.com/rust-lang/libs-team/issues/444), so this PR implements that part of it.

Most of the usages in the compiler that trigger this new warning are "root" usages (calling into an API that uses control-flow internally, but for which the callee doesn't really care) and have been suppressed by `let _ = ...`, but I did legitimately find one instance of a missing `?` and one for a never-used `ControlFlow` value in #137448.

Presumably this needs an FCP too, so I'm opening this and nominating it for T-libs-api.

This PR also touches the tools (incl. rust-analyzer), but if this went into FCP, I'd split those out into separate PRs which can land before this one does.

r? libs-api
`@rustbot` label: T-libs-api I-libs-api-nominated
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions