forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#6843 - Jarcho:match_on_same_arms_macro, r=Man…
…ishearth Compare empty blocks for equality based on tokens fixes: rust-lang#1390 This only considers empty blocks for now, though we should also catch something like this: ```rust match 0 { 0 => { do_something(); trace!(0); 0 } 1 => { do_something(); trace!(1); 1 } x => x, } ``` As far as I can tell there aren't any negative effects on other lints. These blocks only happen to be the same for a given compilation, not all compilations. changelog: Fix `match_on_same_arms` and others. Only consider empty blocks equal if the tokens contained are the same.
- Loading branch information
Showing
4 changed files
with
130 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters