diff options
| author | bors <bors@rust-lang.org> | 2023-09-02 12:34:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-02 12:34:47 +0000 |
| commit | b9906aca5ac29d6b4bfeda81fc44a40b24c1c392 (patch) | |
| tree | f940e2c6bc95f2d6b41b8614677499a6112903dd /compiler/rustc_mir_transform/src/coverage/debug.rs | |
| parent | b65e5445351ed80dfb7cab4ddc2c1c575292d9ca (diff) | |
| parent | 44f64acb7e28ee914b8feb131b1ba382711be465 (diff) | |
| download | rust-b9906aca5ac29d6b4bfeda81fc44a40b24c1c392.tar.gz rust-b9906aca5ac29d6b4bfeda81fc44a40b24c1c392.zip | |
Auto merge of #11450 - digama0:never_loop2, r=llogiq
`never_loop` catches `loop { panic!() }`
* Depends on: #11447
This is an outgrowth of #11447 which I felt would best be done as a separate PR because it yields significant new results.
This uses typecheck results to determine divergence, meaning we can now detect cases like `loop { std::process::abort() }` or `loop { panic!() }`. A downside is that `loop { unimplemented!() }` is also being linted, which is arguably a false positive. I'm not really sure how to check this from HIR though, and it seems best to leave this epicycle for a later PR.
changelog: [`never_loop`]: Now lints on `loop { panic!() }` and similar constructs
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions
