Skip to content

Commit 6671d3c

Browse files
committed
Auto merge of rust-lang#16499 - Nadrieril:update-pat-ana, r=lnicola
internal: Update rustc_pattern_analysis dependency Just bumping the dependency, as I've been making API changes over on the rustc side. More API changes incoming in the coming weeks. One benefit of this: we no longer abort in the `DeconstructedPat: Debug` impl, which means we can use `tracing` to investigate issues.
2 parents 64411a4 + d2d4119 commit 6671d3c

File tree

4 files changed

+93
-102
lines changed

4 files changed

+93
-102
lines changed

Cargo.lock

Lines changed: 23 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ ra-ap-rustc_lexer = { version = "0.35.0", default-features = false }
8383
ra-ap-rustc_parse_format = { version = "0.35.0", default-features = false }
8484
ra-ap-rustc_index = { version = "0.35.0", default-features = false }
8585
ra-ap-rustc_abi = { version = "0.35.0", default-features = false }
86-
ra-ap-rustc_pattern_analysis = { version = "0.33.0", default-features = false }
86+
ra-ap-rustc_pattern_analysis = { version = "0.36.0", default-features = false }
8787

8888
# local crates that aren't published to crates.io. These should not have versions.
8989
sourcegen = { path = "./crates/sourcegen" }

crates/hir-ty/src/diagnostics/expr.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,7 @@ impl ExprValidator {
153153
}
154154

155155
let pattern_arena = Arena::new();
156-
let ty_arena = Arena::new();
157-
let cx = MatchCheckCtx::new(
158-
self.owner.module(db.upcast()),
159-
self.owner,
160-
db,
161-
&pattern_arena,
162-
&ty_arena,
163-
);
156+
let cx = MatchCheckCtx::new(self.owner.module(db.upcast()), self.owner, db, &pattern_arena);
164157

165158
let mut m_arms = Vec::with_capacity(arms.len());
166159
let mut has_lowering_errors = false;
@@ -207,7 +200,7 @@ impl ExprValidator {
207200
}
208201

209202
let report = match compute_match_usefulness(
210-
rustc_pattern_analysis::MatchCtxt { tycx: &cx },
203+
&cx,
211204
m_arms.as_slice(),
212205
scrut_ty.clone(),
213206
ValidityConstraint::ValidOnly,

0 commit comments

Comments
 (0)