Skip to content
Navigation Menu
Toggle navigation
Sign in
Appearance settings
Platform
GitHub Copilot
Write better code with AI
GitHub Spark
New
Build and deploy intelligent apps
GitHub Models
New
Manage and compare prompts
GitHub Advanced Security
Find and fix vulnerabilities
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Discussions
Collaborate outside of code
Code Search
Find more, search less
Explore
Why GitHub
Documentation
GitHub Skills
Blog
Integrations
GitHub Marketplace
MCP Registry
View all features
Solutions
By company size
Enterprises
Small and medium teams
Startups
Nonprofits
By use case
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
By industry
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
Topics
AI
DevOps
Security
Software Development
View all
Explore
Learning Pathways
Events & Webinars
Ebooks & Whitepapers
Customer Stories
Partners
Executive Insights
Open Source
GitHub Sponsors
Fund open source developers
The ReadME Project
GitHub community articles
Repositories
Topics
Trending
Collections
Enterprise
Enterprise platform
AI-powered developer platform
Available add-ons
GitHub Advanced Security
Enterprise-grade security features
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
is:issue if_same_then_else
Search code, repositories, users, issues, pull requests...
Search syntax tips
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Sign in
Sign up
Appearance settings
Resetting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
rust-lang
/
rust-clippy
Public
Notifications
You must be signed in to change notification settings
Fork
1.8k
Star
12.5k
Code
Issues
2.3k
Pull requests
181
Discussions
Actions
Projects
0
Wiki
Security
Uh oh!
There was an error while loading.
Please reload this page
.
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security
Insights
Most commonly ignored lints on crates.io
#7666 ·
dtolnay
opened
on Sep 13, 2021
23
Issues
Search Issues
is
:
issue
if_same_then_else
is:issue if_same_then_else
Search
Labels
Milestones
New issue
Search results
Open
Closed
branches-sharing-code suggestion garbage when we actually try to assign the condition result
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Status: Open.
#15004
In rust-lang/rust-clippy;
·
matthiaskrgr
opened
on Jun 6, 2025
<code>match_same_arms</code>: FP if arms have different comments
C-bug
Category: Clippy is not doing the correct thing
Category: Clippy is not doing the correct thing
good first issue
These issues are a good way to get started with Clippy
These issues are a good way to get started with Clippy
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Issue: The lint was triggered on code it shouldn't have
Status: Closed (completed).
#12044
In rust-lang/rust-clippy;
·
by
xFrednet
was closed
on Jan 15, 2024
<code>if_same_then_else</code> false positive when using macros
C-bug
Category: Clippy is not doing the correct thing
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Issue: The lint was triggered on code it shouldn't have
Status: Closed (completed).
#11607
In rust-lang/rust-clippy;
·
by
Glamhoth
was closed
on Oct 4, 2023
<code>if-then-else</code>/<code>needless_bool</code> is breaking easily
C-bug
Category: Clippy is not doing the correct thing
Category: Clippy is not doing the correct thing
Status: Closed (completed).
#11248
In rust-lang/rust-clippy;
·
by
GuillaumeGomez
was closed
on Jul 28, 2023
Wrong <code>if_same_then_else</code> lint error when having two different integer
C-bug
Category: Clippy is not doing the correct thing
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Issue: The lint was triggered on code it shouldn't have
Status: Closed (completed).
#11213
In rust-lang/rust-clippy;
·
by
YouKnow-sys
was closed
on Jul 23, 2023
Lint that encourages people to implement <code>PartialOrd</code> in terms of <code>Ord</code> when applicable
A-lint
Area: New lints
Area: New lints
Status: Closed (completed).
#10744
In rust-lang/rust-clippy;
·
by
joseph-gio
was closed
on Jul 8, 2023
FP single-element-loop: nested control flow
C-bug
Category: Clippy is not doing the correct thing
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Issue: The lint was triggered on code it shouldn't have
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Status: Closed (completed).
#10018
In rust-lang/rust-clippy;
·
by
matthiaskrgr
was closed
on Jan 7, 2023
FP equatable_if_let: no longer able to infer type
C-bug
Category: Clippy is not doing the correct thing
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Issue: The lint was triggered on code it shouldn't have
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Issue: The suggestions provided by this Lint cause an ICE/error when applied
L-nursery
Lint: Currently in the nursery group
Lint: Currently in the nursery group
Status: Open.
#9888
In rust-lang/rust-clippy;
·
matthiaskrgr
opened
on Nov 19, 2022
if_same_then_else should ignore empty bodies
C-bug
Category: Clippy is not doing the correct thing
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Issue: The lint was triggered on code it shouldn't have
Status: Open.
#8926
In rust-lang/rust-clippy;
·
dhardy
opened
on Jun 1, 2022
<code>clippy::if_same_then_else</code> should ignore bodies containing <code>todo!()</code>
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
Category: Enhancement of lints, like adding more cases or adding help messages
good first issue
These issues are a good way to get started with Clippy
These issues are a good way to get started with Clippy
Status: Closed (completed).
#8836
In rust-lang/rust-clippy;
·
by
jjl
was closed
on Jun 20, 2022
If-same-then-else bug for unequal const generic argument
C-bug
Category: Clippy is not doing the correct thing
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Issue: The lint was triggered on code it shouldn't have
Status: Closed (completed).
#8680
In rust-lang/rust-clippy;
·
by
CurryPseudo
was closed
on Apr 12, 2022
if_same_then_else should not trigger when one branch is "if let <pattern> = thing"
C-bug
Category: Clippy is not doing the correct thing
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Issue: The lint was triggered on code it shouldn't have
Status: Closed (completed).
#7834
In rust-lang/rust-clippy;
·
by
DanielT
was closed
on Oct 18, 2021
You can’t perform that action at this time.