Lint against iterator functions that panics when N is zero #153563
Lint against iterator functions that panics when N is zero #153563Urgau wants to merge 3 commits intorust-lang:mainfrom
N is zero #153563Conversation
|
Some changes occurred in compiler/rustc_hir/src/attrs cc @jdonszelmann, @JonathanBrouwer This PR changes MIR cc @oli-obk, @RalfJung, @JakobDegen, @vakaras Some changes occurred in compiler/rustc_passes/src/check_attr.rs cc @jdonszelmann, @JonathanBrouwer This PR changes rustc_public cc @oli-obk, @celinval, @ouz-a, @makai410 Some changes occurred to the CTFE machinery Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in compiler/rustc_attr_parsing |
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
ff233d2 to
44380ea
Compare
This seems to do much more than that. It adds a new language primitive, a new kind of built-in assertion. Could you motivate that? |
The code is unfortunately tangled, it doesn't add a new language primitive per se, but I could probably modify that function so it doesn't take an |
|
Given that |
44380ea to
36de202
Compare
|
Understandable, I've reworked the PR to avoid touching at |
There was a problem hiding this comment.
I love the idea but it should better for someone more familiar with this topic other than me to review. @RalfJung Could you take over? Otherwise I'd reroll.
|
I'm afraid not, I don't have capacity at the moment. @rustbot reroll |
This PR adds new kind of variant to the deny-by-default
unconditional_paniclint, by linting on iterator functions that panics whenN(chunks/windows size) is zero.cc @rust-lang/libs-api