Skip to content

Commit 63ef672

Browse files
committed
Vendor rustc_pattern_analysis
Version of rust-lang/rust#120027
1 parent e2df3f2 commit 63ef672

File tree

9 files changed

+4396
-0
lines changed

9 files changed

+4396
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
name = "rustc_pattern_analysis"
3+
version = "0.0.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
derivative = "2.2.0"
8+
rustc_apfloat = "0.2.0"
9+
rustc_index = { path = "../rustc_index", default-features = false }
10+
smallvec = { version = "1.8.1", features = ["union"] }
11+
tracing = "0.1"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
pattern_analysis_non_exhaustive_omitted_pattern = some variants are not matched explicitly
2+
.help = ensure that all variants are matched explicitly by adding the suggested match arms
3+
.note = the matched value is of type `{$scrut_ty}` and the `non_exhaustive_omitted_patterns` attribute was found
4+
5+
pattern_analysis_non_exhaustive_omitted_pattern_lint_on_arm = the lint level must be set on the whole match
6+
.help = it no longer has any effect to set the lint level on an individual match arm
7+
.label = remove this attribute
8+
.suggestion = set the lint level on the whole match
9+
10+
pattern_analysis_overlapping_range_endpoints = multiple patterns overlap on their endpoints
11+
.label = ... with this range
12+
.note = you likely meant to write mutually exclusive ranges
13+
14+
pattern_analysis_uncovered = {$count ->
15+
[1] pattern `{$witness_1}`
16+
[2] patterns `{$witness_1}` and `{$witness_2}`
17+
[3] patterns `{$witness_1}`, `{$witness_2}` and `{$witness_3}`
18+
*[other] patterns `{$witness_1}`, `{$witness_2}`, `{$witness_3}` and {$remainder} more
19+
} not covered

0 commit comments

Comments
 (0)