Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/closure.rs')
| -rw-r--r-- | crates/hir-ty/src/infer/closure.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir-ty/src/infer/closure.rs b/crates/hir-ty/src/infer/closure.rs index 9283c46d0f..50cac034e4 100644 --- a/crates/hir-ty/src/infer/closure.rs +++ b/crates/hir-ty/src/infer/closure.rs @@ -307,7 +307,7 @@ impl CapturedItem { } } } - if is_raw_identifier(&result, db.crate_graph()[owner.module(db.upcast()).krate()].edition) { + if is_raw_identifier(&result, owner.module(db.upcast()).krate().data(db).edition) { result.insert_str(0, "r#"); } result @@ -316,7 +316,7 @@ impl CapturedItem { pub fn display_place_source_code(&self, owner: DefWithBodyId, db: &dyn HirDatabase) -> String { let body = db.body(owner); let krate = owner.krate(db.upcast()); - let edition = db.crate_graph()[krate].edition; + let edition = krate.data(db).edition; let mut result = body[self.place.local].name.display(db.upcast(), edition).to_string(); for proj in &self.place.projections { match proj { @@ -368,7 +368,7 @@ impl CapturedItem { pub fn display_place(&self, owner: DefWithBodyId, db: &dyn HirDatabase) -> String { let body = db.body(owner); let krate = owner.krate(db.upcast()); - let edition = db.crate_graph()[krate].edition; + let edition = krate.data(db).edition; let mut result = body[self.place.local].name.display(db.upcast(), edition).to_string(); let mut field_need_paren = false; for proj in &self.place.projections { |