mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
pit-of-success API for unresolved code actions
This commit is contained in:
parent
1487f2f10e
commit
33384d289e
2 changed files with 14 additions and 14 deletions
|
@ -490,8 +490,18 @@ impl Analysis {
|
|||
.unwrap_or_default())
|
||||
}
|
||||
|
||||
/// Computes assists (aka code actions aka intentions) for the given
|
||||
/// position. Computes enough info to show the lightbulb list in the editor,
|
||||
/// but doesn't compute actual edits, to improve performance.
|
||||
///
|
||||
/// When the user clicks on the assist, call `resolve_assists` to get the
|
||||
/// edit.
|
||||
pub fn assists(&self, config: &AssistConfig, frange: FileRange) -> Cancelable<Vec<Assist>> {
|
||||
self.with_db(|db| Assist::unresolved(db, config, frange))
|
||||
}
|
||||
|
||||
/// Computes resolved assists with source changes for the given position.
|
||||
pub fn resolved_assists(
|
||||
pub fn resolve_assists(
|
||||
&self,
|
||||
config: &AssistConfig,
|
||||
frange: FileRange,
|
||||
|
@ -499,16 +509,6 @@ impl Analysis {
|
|||
self.with_db(|db| assists::Assist::resolved(db, config, frange))
|
||||
}
|
||||
|
||||
/// Computes unresolved assists (aka code actions aka intentions) for the given
|
||||
/// position.
|
||||
pub fn unresolved_assists(
|
||||
&self,
|
||||
config: &AssistConfig,
|
||||
frange: FileRange,
|
||||
) -> Cancelable<Vec<Assist>> {
|
||||
self.with_db(|db| Assist::unresolved(db, config, frange))
|
||||
}
|
||||
|
||||
/// Computes the set of diagnostics for the given file.
|
||||
pub fn diagnostics(
|
||||
&self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue