mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-16 17:58:16 +00:00
Merge #9293
9293: fix: Show diagnostic fixes before assists r=matklad a=lnicola Closes #9212 Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
This commit is contained in:
commit
5ba5e6348f
1 changed files with 4 additions and 3 deletions
|
@ -567,7 +567,6 @@ impl Analysis {
|
|||
};
|
||||
|
||||
self.with_db(|db| {
|
||||
let ssr_assists = ssr::ssr_assists(db, &resolve, frange);
|
||||
let diagnostic_assists = if include_fixes {
|
||||
ide_diagnostics::diagnostics(db, diagnostics_config, &resolve, frange.file_id)
|
||||
.into_iter()
|
||||
|
@ -577,10 +576,12 @@ impl Analysis {
|
|||
} else {
|
||||
Vec::new()
|
||||
};
|
||||
let ssr_assists = ssr::ssr_assists(db, &resolve, frange);
|
||||
let assists = ide_assists::assists(db, assist_config, resolve, frange);
|
||||
|
||||
let mut res = ide_assists::assists(db, assist_config, resolve, frange);
|
||||
let mut res = diagnostic_assists;
|
||||
res.extend(ssr_assists.into_iter());
|
||||
res.extend(diagnostic_assists.into_iter());
|
||||
res.extend(assists.into_iter());
|
||||
|
||||
res
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue