weird condition "if obligation.recursion_depth >= 0" #68251
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
As far as I can tell from
src/librustc/traits/mod.rs:132:
recursion_depth
is usize, thus the conditionif obligation.recursion_depth >= 0
at src/librustc/traits/select.rs:3770:12 is alwaystrue
Does this point out some kind of logic error (or should the unreachable code just be deleted?).
Found via clippy.
The text was updated successfully, but these errors were encountered: