diff --git a/crates/ra_hir_ty/src/expr.rs b/crates/ra_hir_ty/src/expr.rs index 72577d114c..d44562b227 100644 --- a/crates/ra_hir_ty/src/expr.rs +++ b/crates/ra_hir_ty/src/expr.rs @@ -12,9 +12,9 @@ use crate::{ diagnostics::{ MismatchedArgCount, MissingFields, MissingMatchArms, MissingOkInTailExpr, MissingPatFields, }, + match_checking::{is_useful, MatchCheckCtx, Matrix, PatStack, Usefulness}, utils::variant_data, ApplicationTy, InferenceResult, Ty, TypeCtor, - _match::{is_useful, MatchCheckCtx, Matrix, PatStack, Usefulness}, }; pub use hir_def::{ diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs index c12bed4af3..34f0bd4ce4 100644 --- a/crates/ra_hir_ty/src/lib.rs +++ b/crates/ra_hir_ty/src/lib.rs @@ -31,9 +31,11 @@ pub mod traits; pub mod method_resolution; mod op; mod lower; +mod match_checking; pub(crate) mod infer; -pub mod display; pub(crate) mod utils; + +pub mod display; pub mod db; pub mod diagnostics; pub mod expr; @@ -43,11 +45,8 @@ pub mod unsafe_validation; mod tests; #[cfg(test)] mod test_db; -mod _match; -use std::ops::Deref; -use std::sync::Arc; -use std::{iter, mem}; +use std::{iter, mem, ops::Deref, sync::Arc}; use hir_def::{ expr::ExprId, @@ -55,14 +54,15 @@ use hir_def::{ AdtId, AssocContainerId, DefWithBodyId, GenericDefId, HasModule, Lookup, TraitId, TypeAliasId, TypeParamId, }; +use itertools::Itertools; use ra_db::{impl_intern_key, salsa, CrateId}; use crate::{ db::HirDatabase, + display::HirDisplay, primitive::{FloatTy, IntTy}, utils::{generics, make_mut_slice, Generics}, }; -use display::HirDisplay; pub use autoderef::autoderef; pub use infer::{InferTy, InferenceResult}; @@ -74,7 +74,6 @@ pub use lower::{ pub use traits::{InEnvironment, Obligation, ProjectionPredicate, TraitEnvironment}; pub use chalk_ir::{BoundVar, DebruijnIndex}; -use itertools::Itertools; /// A type constructor or type name: this might be something like the primitive /// type `bool`, a struct like `Vec`, or things like function pointers or diff --git a/crates/ra_hir_ty/src/_match.rs b/crates/ra_hir_ty/src/match_checking.rs similarity index 100% rename from crates/ra_hir_ty/src/_match.rs rename to crates/ra_hir_ty/src/match_checking.rs