Skip to content

Commit 4101c15

Browse files
bors[bot]kjeremy
andauthored
Merge #1879
1879: A few doc comments r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
2 parents 58dc3b1 + e26c41d commit 4101c15

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

crates/ra_ide_api/src/lib.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ impl Query {
223223
}
224224
}
225225

226+
/// Info associated with a text range.
226227
#[derive(Debug)]
227228
pub struct RangeInfo<T> {
228229
pub range: TextRange,
@@ -235,6 +236,8 @@ impl<T> RangeInfo<T> {
235236
}
236237
}
237238

239+
/// Contains information about a call site. Specifically the
240+
/// `FunctionSignature`and current parameter.
238241
#[derive(Debug)]
239242
pub struct CallInfo {
240243
pub signature: FunctionSignature,
@@ -325,11 +328,12 @@ impl Analysis {
325328
(host.analysis(), file_id)
326329
}
327330

331+
/// Features for Analysis.
328332
pub fn feature_flags(&self) -> &FeatureFlags {
329333
&self.db.feature_flags
330334
}
331335

332-
/// Debug info about the current state of the analysis
336+
/// Debug info about the current state of the analysis.
333337
pub fn status(&self) -> Cancelable<String> {
334338
self.with_db(|db| status::status(&*db))
335339
}
@@ -440,20 +444,23 @@ impl Analysis {
440444
})
441445
}
442446

447+
/// Returns the definitions from the symbol at `position`.
443448
pub fn goto_definition(
444449
&self,
445450
position: FilePosition,
446451
) -> Cancelable<Option<RangeInfo<Vec<NavigationTarget>>>> {
447452
self.with_db(|db| goto_definition::goto_definition(db, position))
448453
}
449454

455+
/// Returns the impls from the symbol at `position`.
450456
pub fn goto_implementation(
451457
&self,
452458
position: FilePosition,
453459
) -> Cancelable<Option<RangeInfo<Vec<NavigationTarget>>>> {
454460
self.with_db(|db| impls::goto_implementation(db, position))
455461
}
456462

463+
/// Returns the type definitions for the symbol at `position`.
457464
pub fn goto_type_definition(
458465
&self,
459466
position: FilePosition,
@@ -540,6 +547,7 @@ impl Analysis {
540547
self.with_db(|db| references::rename(db, position, new_name))
541548
}
542549

550+
/// Performs an operation on that may be Canceled.
543551
fn with_db<F: FnOnce(&db::RootDatabase) -> T + std::panic::UnwindSafe, T>(
544552
&self,
545553
f: F,

0 commit comments

Comments
 (0)