mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Run rustfmt with respect to Cargo.toml edition
This commit is contained in:
parent
1fe0b8c03f
commit
b437dca4bd
4 changed files with 78 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue