aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/diagnostics/match_check/usefulness.rs
diff options
context:
space:
mode:
authorDawer <[email protected]>2021-05-12 07:04:56 +0100
committerDawer <[email protected]>2021-05-31 20:49:44 +0100
commit4cce7a6407821f456741a8d512ae31da3128c84f (patch)
treee7baddfdf72bcef8477fe20de090590b34932a3c /crates/hir_ty/src/diagnostics/match_check/usefulness.rs
parentf46a42f73aa92ab66800c70d525ddc7e6529edd6 (diff)
Box field detection; test #[non-exhaustive] attribute
Diffstat (limited to 'crates/hir_ty/src/diagnostics/match_check/usefulness.rs')
-rw-r--r--crates/hir_ty/src/diagnostics/match_check/usefulness.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_ty/src/diagnostics/match_check/usefulness.rs b/crates/hir_ty/src/diagnostics/match_check/usefulness.rs
index b01e3557c..44e08b6e9 100644
--- a/crates/hir_ty/src/diagnostics/match_check/usefulness.rs
+++ b/crates/hir_ty/src/diagnostics/match_check/usefulness.rs
@@ -293,7 +293,7 @@ pub(crate) struct MatchCheckCtx<'a> {
293 pub(crate) match_expr: ExprId, 293 pub(crate) match_expr: ExprId,
294 pub(crate) infer: &'a InferenceResult, 294 pub(crate) infer: &'a InferenceResult,
295 pub(crate) db: &'a dyn HirDatabase, 295 pub(crate) db: &'a dyn HirDatabase,
296 /// Lowered patterns from self.body.pats plus generated by the check. 296 /// Lowered patterns from arms plus generated by the check.
297 pub(crate) pattern_arena: &'a RefCell<PatternArena>, 297 pub(crate) pattern_arena: &'a RefCell<PatternArena>,
298} 298}
299 299
@@ -315,7 +315,7 @@ impl<'a> MatchCheckCtx<'a> {
315 315
316 // Rust feature described as "Allows exhaustive pattern matching on types that contain uninhabited types." 316 // Rust feature described as "Allows exhaustive pattern matching on types that contain uninhabited types."
317 pub(super) fn feature_exhaustive_patterns(&self) -> bool { 317 pub(super) fn feature_exhaustive_patterns(&self) -> bool {
318 // TODO 318 // FIXME see MatchCheckCtx::is_uninhabited
319 false 319 false
320 } 320 }
321 321