diff options
author | Laurențiu Nicola <[email protected]> | 2021-06-15 18:55:27 +0100 |
---|---|---|
committer | Laurențiu Nicola <[email protected]> | 2021-06-15 18:55:27 +0100 |
commit | e58f63dc631abcc0cb9eb9f3bdc8991b320dbbd1 (patch) | |
tree | b5ee7f55b0d8faf627ee31ed07dca31513f3ef84 /crates/ide/src | |
parent | 7f482afada7519e828b8dbe8fafe063885256516 (diff) |
Show diagnostic fixes before assists
Diffstat (limited to 'crates/ide/src')
-rw-r--r-- | crates/ide/src/lib.rs | 7 |
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 | }) |