Module pat

Source

StructsΒ§

PatInfo πŸ”’
ResolvedPat πŸ”’
When checking patterns containing paths, we need to know the path’s resolution to determine whether to apply match ergonomics and implicitly dereference the scrutinee. For instance, when the deref_patterns feature is enabled and we’re matching against a scrutinee of type Cow<'a, Option<u8>>, we insert an implicit dereference to allow the pattern Some(_) to type, but we must not dereference it when checking the pattern Cow::Borrowed(_).
TopInfo πŸ”’
Information about the expected type at the top level of type checking a pattern.

EnumsΒ§

AdjustMode πŸ”’
Mode for adjusting the expected type and binding mode.
InheritedRefMatchRule πŸ”’
Variations on RFC 3627’s Rule 4: when do reference patterns match against inherited references?
MutblCap πŸ”’
ref mut bindings (explicit or match-ergonomics) are not allowed behind an & reference. Normally, the borrow checker enforces this, but for (currently experimental) match ergonomics, we track this when typing patterns for two purposes:
PeelKind πŸ”’
Restrictions on what types to peel when adjusting the expected type and binding mode.
ResolvedPatKind πŸ”’

ConstantsΒ§

CANNOT_IMPLICITLY_DEREF_POINTER_TRAIT_OBJ πŸ”’

FunctionsΒ§

is_number πŸ”’