Skip to main content

Module pat_column

Module pat_column 

Source

Re-exports§

use crate::constructor::Constructor; 🔒
use crate::constructor::SplitConstructorSet; 🔒
use crate::pat::DeconstructedPat; 🔒
use crate::pat::PatOrWild; 🔒
use crate::MatchArm; 🔒
use crate::PatCx; 🔒

Structs§

PatternColumn
A column of patterns in a match, where a column is the intuitive notion of “subpatterns that inspect the same subvalue/place”. This is used to traverse patterns column-by-column for lints. Despite similarities with the algorithm in crate::usefulness, this does a different traversal. Notably this is linear in the depth of patterns, whereas compute_exhaustiveness_and_usefulness is worst-case exponential (exhaustiveness is NP-complete). The core difference is that we treat sub-columns separately.