aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-15 21:38:29 +0100
committerGitHub <[email protected]>2021-06-15 21:38:29 +0100
commit5ba5e6348f18d56cce37b71b0c18a8f9b3728eeb (patch)
tree3b752be50d5369223f390d1993be0da8361635d7 /crates/ide/src
parent9bddd2af551702e472fb1a678466bc620b8973fa (diff)
parente58f63dc631abcc0cb9eb9f3bdc8991b320dbbd1 (diff)
Merge #9293
9293: fix: Show diagnostic fixes before assists r=matklad a=lnicola Closes #9212 Co-authored-by: LaurenČ›iu Nicola <[email protected]>
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs
index 9db387d26..4bd073cc3 100644
--- a/crates/ide/src/lib.rs
+++ b/crates/ide/src/lib.rs
@@ -567,7 +567,6 @@ impl Analysis {
567 }; 567 };
568 568
569 self.with_db(|db| { 569 self.with_db(|db| {
570 let ssr_assists = ssr::ssr_assists(db, &resolve, frange);
571 let diagnostic_assists = if include_fixes { 570 let diagnostic_assists = if include_fixes {
572 ide_diagnostics::diagnostics(db, diagnostics_config, &resolve, frange.file_id) 571 ide_diagnostics::diagnostics(db, diagnostics_config, &resolve, frange.file_id)
573 .into_iter() 572 .into_iter()
@@ -577,10 +576,12 @@ impl Analysis {
577 } else { 576 } else {
578 Vec::new() 577 Vec::new()
579 }; 578 };
579 let ssr_assists = ssr::ssr_assists(db, &resolve, frange);
580 let assists = ide_assists::assists(db, assist_config, resolve, frange);
580 581
581 let mut res = ide_assists::assists(db, assist_config, resolve, frange); 582 let mut res = diagnostic_assists;
582 res.extend(ssr_assists.into_iter()); 583 res.extend(ssr_assists.into_iter());
583 res.extend(diagnostic_assists.into_iter()); 584 res.extend(assists.into_iter());
584 585
585 res 586 res
586 }) 587 })