Run rustfmt with respect to Cargo.toml edition

This commit is contained in:
Vincent Rouillé 2019-12-04 23:05:01 +01:00
parent 1fe0b8c03f
commit b437dca4bd
No known key found for this signature in database
GPG key ID: FCA513373403B851
4 changed files with 78 additions and 0 deletions

View file

@ -422,6 +422,11 @@ impl Analysis {
self.with_db(|db| parent_module::crate_for(db, file_id))
}
/// Returns the edition of the given crate.
pub fn crate_edition(&self, crate_id: CrateId) -> Cancelable<Edition> {
self.with_db(|db| db.crate_graph().edition(crate_id))
}
/// Returns the root file of the given crate.
pub fn crate_root(&self, crate_id: CrateId) -> Cancelable<FileId> {
self.with_db(|db| db.crate_graph().crate_root(crate_id))