rust/library
Matthias Krüger 9adf2189f5
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
2025-03-17 16:34:47 +01:00
..
alloc Rollup merge of #138341 - xizheyin:issue-138322, r=joboet 2025-03-17 05:47:50 -04:00
alloctests Add comments 2025-03-07 19:11:13 +00:00
backtrace@9d2c34e7e6 Update backtrace 2025-02-13 14:32:50 -08:00
core Rollup merge of #137449 - compiler-errors:control-flow, r=Amanieu,lnicola 2025-03-17 16:34:47 +01:00
coretests Rollup merge of #135080 - Enselic:debug-ptr-metadata, r=thomcc 2025-03-16 13:19:51 +08:00
literal-escaper Add test for new proc_macro literal methods 2025-03-16 14:28:45 +01:00
panic_abort Migrate panic_abort to Rust 2024 2025-03-11 09:46:34 -07:00
panic_unwind Migrate panic_unwind to Rust 2024 2025-03-11 09:46:34 -07:00
portable-simd Remove ignored #[must_use] attributes from portable-simd 2025-02-12 13:59:22 +01:00
proc_macro Rollup merge of #136355 - GuillaumeGomez:proc-macro_add_value_retrieval_methods, r=Amanieu 2025-03-17 05:47:48 -04:00
profiler_builtins Migrate profiler_builtins to Rust 2024 2025-03-11 09:46:35 -07:00
rtstartup Revert changes for rtstartup 2025-03-10 21:23:31 +08:00
rustc-std-workspace-alloc Migrated the rustc-std-workspace crates to Rust 2024 2025-03-11 09:46:35 -07:00
rustc-std-workspace-core Migrated the rustc-std-workspace crates to Rust 2024 2025-03-11 09:46:35 -07:00
rustc-std-workspace-std Migrated the rustc-std-workspace crates to Rust 2024 2025-03-11 09:46:35 -07:00
std Rollup merge of #137793 - NobodyXu:stablise-annoymous-pipe, r=joshtriplett 2025-03-17 05:47:50 -04:00
stdarch@9426bb5658 Update stdarch 2025-03-06 11:11:55 -08:00
sysroot Migrate the sysroot crate to Rust 2024 2025-03-11 09:46:35 -07:00
test Migrate test to Rust 2024 2025-03-11 09:46:34 -07:00
unwind Rollup merge of #137621 - Berrysoft:cygwin-std, r=joboet 2025-03-17 05:47:49 -04:00
windows_targets Migrate windows-targets to Rust 2024 2025-03-11 09:46:35 -07:00
Cargo.lock Rollup merge of #136355 - GuillaumeGomez:proc-macro_add_value_retrieval_methods, r=Amanieu 2025-03-17 05:47:48 -04:00
Cargo.toml Rollup merge of #136355 - GuillaumeGomez:proc-macro_add_value_retrieval_methods, r=Amanieu 2025-03-17 05:47:48 -04:00