diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-02-04 19:59:21 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-04 19:59:21 +0000 |
commit | de046bf4572a75cf534a2342358a422b2f18d01c (patch) | |
tree | 87f58e72537569806e689a6be4c404a496431360 /crates/hir_ty/src | |
parent | 4c1fcda0f8183060de5a341fffa2b30e65bdb52f (diff) | |
parent | 5d99ba1d9a5acf02a5cd50e456f164bd80b523b5 (diff) |
Merge #7559
7559: Make `ModPath`'s representation private r=jonas-schievink a=jonas-schievink
This lets us switch out the `Vec` for something more efficient
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_ty/src')
-rw-r--r-- | crates/hir_ty/src/infer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs index d08867c70..4b683c5a7 100644 --- a/crates/hir_ty/src/infer.rs +++ b/crates/hir_ty/src/infer.rs | |||
@@ -461,7 +461,7 @@ impl<'a> InferenceContext<'a> { | |||
461 | (ty, variant) | 461 | (ty, variant) |
462 | } | 462 | } |
463 | Some(1) => { | 463 | Some(1) => { |
464 | let segment = path.mod_path().segments.last().unwrap(); | 464 | let segment = path.mod_path().segments().last().unwrap(); |
465 | // this could be an enum variant or associated type | 465 | // this could be an enum variant or associated type |
466 | if let Some((AdtId::EnumId(enum_id), _)) = ty.as_adt() { | 466 | if let Some((AdtId::EnumId(enum_id), _)) = ty.as_adt() { |
467 | let enum_data = self.db.enum_data(enum_id); | 467 | let enum_data = self.db.enum_data(enum_id); |