diff options
author | Seivan Heidari <[email protected]> | 2019-12-23 14:35:31 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-12-23 14:35:31 +0000 |
commit | b21d9337d9200e2cfdc90b386591c72c302dc03e (patch) | |
tree | f81f5c08f821115cee26fa4d3ceaae88c7807fd5 /crates/ra_ide/src/lib.rs | |
parent | 18a0937585b836ec5ed054b9ae48e0156ab6d9ef (diff) | |
parent | ce07a2daa9e53aa86a769f8641b14c2878444fbc (diff) |
Merge branch 'master' into feature/themes
Diffstat (limited to 'crates/ra_ide/src/lib.rs')
-rw-r--r-- | crates/ra_ide/src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs index d1bff4a76..779a81b2c 100644 --- a/crates/ra_ide/src/lib.rs +++ b/crates/ra_ide/src/lib.rs | |||
@@ -422,6 +422,11 @@ impl Analysis { | |||
422 | self.with_db(|db| parent_module::crate_for(db, file_id)) | 422 | self.with_db(|db| parent_module::crate_for(db, file_id)) |
423 | } | 423 | } |
424 | 424 | ||
425 | /// Returns the edition of the given crate. | ||
426 | pub fn crate_edition(&self, crate_id: CrateId) -> Cancelable<Edition> { | ||
427 | self.with_db(|db| db.crate_graph().edition(crate_id)) | ||
428 | } | ||
429 | |||
425 | /// Returns the root file of the given crate. | 430 | /// Returns the root file of the given crate. |
426 | pub fn crate_root(&self, crate_id: CrateId) -> Cancelable<FileId> { | 431 | pub fn crate_root(&self, crate_id: CrateId) -> Cancelable<FileId> { |
427 | self.with_db(|db| db.crate_graph().crate_root(crate_id)) | 432 | self.with_db(|db| db.crate_graph().crate_root(crate_id)) |