Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions compiler/rustc_pattern_analysis/src/constructor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,15 @@ impl Slice {
other.kind.covers_length(self.arity())
}

// Getters. They are used by rust-analyzer.
pub fn array_len(self) -> Option<usize> {
self.array_len
}

pub fn kind(self) -> SliceKind {
self.kind
}

/// This computes constructor splitting for variable-length slices, as explained at the top of
/// the file.
///
Expand Down
Loading