diff options
| author | bors <bors@rust-lang.org> | 2024-11-26 10:12:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-11-26 10:12:09 +0000 |
| commit | 90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf (patch) | |
| tree | 21b21d8a88ed129d3f4fcf7d5a7e82facd8f14b5 /src/tools/rust-analyzer/crates/ide-completion | |
| parent | 8bfa98634a70dfaeae176a8b7fe98e778f715dd3 (diff) | |
| parent | f7c53a2df0aea1187879a37653480b31afb11417 (diff) | |
| download | rust-1.83.0.tar.gz rust-1.83.0.zip | |
Auto merge of #133476 - SomeoneToIgnore:stable, r=BoxyUwU,davidbarsky 1.83.0
[stable(not yet) backport] Revert r-a completions breakage This PR revers recent completion-related changes in r-a, which caused nvim and helix to malfunction. Changes reverted: 1. https://github.com/rust-lang/rust-analyzer/pull/18167 2. https://github.com/rust-lang/rust-analyzer/pull/18247 3. https://github.com/rust-lang/rust-analyzer/pull/18503 See https://github.com/rust-lang/rust-analyzer/pull/18503#issuecomment-2498920382 for more context cc `@BoxyUwU`
Diffstat (limited to 'src/tools/rust-analyzer/crates/ide-completion')
3 files changed, 3 insertions, 30 deletions
diff --git a/src/tools/rust-analyzer/crates/ide-completion/src/config.rs b/src/tools/rust-analyzer/crates/ide-completion/src/config.rs index 1d05419c96d..0d403f49b7a 100644 --- a/src/tools/rust-analyzer/crates/ide-completion/src/config.rs +++ b/src/tools/rust-analyzer/crates/ide-completion/src/config.rs @@ -7,7 +7,7 @@ use hir::ImportPathConfig; use ide_db::{imports::insert_use::InsertUseConfig, SnippetCap}; -use crate::{snippet::Snippet, CompletionFieldsToResolve}; +use crate::snippet::Snippet; #[derive(Clone, Debug, PartialEq, Eq)] pub struct CompletionConfig { @@ -27,7 +27,6 @@ pub struct CompletionConfig { pub prefer_absolute: bool, pub snippets: Vec<Snippet>, pub limit: Option<usize>, - pub fields_to_resolve: CompletionFieldsToResolve, } #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/src/tools/rust-analyzer/crates/ide-completion/src/lib.rs b/src/tools/rust-analyzer/crates/ide-completion/src/lib.rs index a78976d3fd8..58d1fad0950 100644 --- a/src/tools/rust-analyzer/crates/ide-completion/src/lib.rs +++ b/src/tools/rust-analyzer/crates/ide-completion/src/lib.rs @@ -37,31 +37,6 @@ pub use crate::{ snippet::{Snippet, SnippetScope}, }; -#[derive(Copy, Clone, Debug, PartialEq, Eq)] -pub struct CompletionFieldsToResolve { - pub resolve_label_details: bool, - pub resolve_tags: bool, - pub resolve_detail: bool, - pub resolve_documentation: bool, - pub resolve_filter_text: bool, - pub resolve_text_edit: bool, - pub resolve_command: bool, -} - -impl CompletionFieldsToResolve { - pub const fn empty() -> Self { - Self { - resolve_label_details: false, - resolve_tags: false, - resolve_detail: false, - resolve_documentation: false, - resolve_filter_text: false, - resolve_text_edit: false, - resolve_command: false, - } - } -} - //FIXME: split the following feature into fine-grained features. // Feature: Magic Completions diff --git a/src/tools/rust-analyzer/crates/ide-completion/src/tests.rs b/src/tools/rust-analyzer/crates/ide-completion/src/tests.rs index f371012de3f..9d77d970071 100644 --- a/src/tools/rust-analyzer/crates/ide-completion/src/tests.rs +++ b/src/tools/rust-analyzer/crates/ide-completion/src/tests.rs @@ -37,8 +37,8 @@ use test_fixture::ChangeFixture; use test_utils::assert_eq_text; use crate::{ - resolve_completion_edits, CallableSnippets, CompletionConfig, CompletionFieldsToResolve, - CompletionItem, CompletionItemKind, + resolve_completion_edits, CallableSnippets, CompletionConfig, CompletionItem, + CompletionItemKind, }; /// Lots of basic item definitions @@ -84,7 +84,6 @@ pub(crate) const TEST_CONFIG: CompletionConfig = CompletionConfig { prefer_absolute: false, snippets: Vec::new(), limit: None, - fields_to_resolve: CompletionFieldsToResolve::empty(), }; pub(crate) fn completion_list(ra_fixture: &str) -> String { |
