Diagnostics Improvement: Same Body in Branches #79210
Labels
A-control-flow
Area: Control flow
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
I tried this code:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=cc7599a28cfe7dd105f3f4d609c47b47
I expected to see this happen:
A compiler warning/diagnostic that both of my branches were equivalent.
Instead, this happened:
No warning was emitted
Meta
This happens on Rust 1.47.0 stable and Rust nightly 2020-11-18
CC @estebank, and the related discussion on twitter
The text was updated successfully, but these errors were encountered: