- Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
@eddyb noticed these cases:
pub fn foo(x: bool) { // WARN function cannot return without recurring if x { foo(x); } else { loop {} } }
pub fn foo(x: bool) { // WARN function cannot return without recursing if x { foo(!x); } else { panic!("foo"); } }
@eddyb thinks the way to resolve this is to reimplement the lint on top of the dataflow
analysis stuff.
https://discordapp.com/channels/442252698964721669/443151243398086667/492702651759329280
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.