Skip to content

Commit

Permalink
Auto merge of #79284 - Nadrieril:constructor-module, r=varkor
Browse files Browse the repository at this point in the history
Split match exhaustiveness into two files

I feel the constructor-related things in the `_match` module make enough sense on their own so I split them off. It makes `_match` feel less like a complicated mess. I'm not aware of PRs in progress against this module apart from my own so hopefully I'm not annoying too many people.
I have a lot of questions about the conventions in naming and modules around the compiler. Like, why is the module named `_match`? Could I rename it to `usefulness` maybe? Should `deconstruct_pat` be a submodule of `_match` since only `_match` uses it? Is it ok to move big piles of code around even if it makes git blame more difficult?

r? `@varkor`
`@rustbot` modify labels: +A-exhaustiveness-checking
  • Loading branch information
bors committed Nov 27, 2020
2 parents 6a88957 + 941c6ac commit fd6b537
Show file tree
Hide file tree
Showing 4 changed files with 1,737 additions and 1,712 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_mir_build/src/thir/pattern/check_match.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::_match::Usefulness::*;
use super::_match::{
use super::usefulness::Usefulness::*;
use super::usefulness::{
compute_match_usefulness, expand_pattern, MatchArm, MatchCheckCtxt, UsefulnessReport,
};
use super::{PatCtxt, PatKind, PatternError};
Expand Down
Loading

0 comments on commit fd6b537

Please sign in to comment.