diff options
| author | bors <bors@rust-lang.org> | 2024-01-21 02:12:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-01-21 02:12:57 +0000 |
| commit | 64d08a8b1dffb70a238c8ecb587c859d66517961 (patch) | |
| tree | bf7e74eacfab8eacf7a9dd5be6eec72f53955d1f /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 73868563eddf1dede97d4cc80741a9ca8f076dc5 (diff) | |
| parent | f73879e096301b921cc763c15f7020ff72736988 (diff) | |
| download | rust-64d08a8b1dffb70a238c8ecb587c859d66517961.tar.gz rust-64d08a8b1dffb70a238c8ecb587c859d66517961.zip | |
Auto merge of #12005 - PartiallyTyped:11713, r=blyxyas
`unused_io_amount` captures `Ok(_)`s Partial rewrite of `unused_io_amount` to lint over `Ok(_)` and `Ok(..)`. Moved the check to `check_block` to simplify context checking for expressions and allow us to check only some expressions. For match (expr, arms) we emit a lint for io ops used on `expr` when an arm is `Ok(_)|Ok(..)`. Also considers the cases when there are guards in the arms and `if let Ok(_) = ...` cases. For `Ok(_)` and `Ok(..)` it emits a note indicating where the value is ignored. changelog: False Negatives [`unused_io_amount`]: Extended `unused_io_amount` to catch `Ok(_)`s in `If let` and match exprs. Closes #11713 r? `@giraffate`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
