mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-12-23 08:48:08 +00:00
Merge pull request #20899 from A4-Tacks/ide-comp-test-track
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
minor: fix track_caller for ide-complpetion test utils
This commit is contained in:
commit
01cacbeb83
1 changed files with 4 additions and 5 deletions
|
|
@ -246,11 +246,10 @@ pub(crate) fn check_edit_with_config(
|
|||
let (db, position) = position(ra_fixture_before);
|
||||
let completions: Vec<CompletionItem> =
|
||||
hir::attach_db(&db, || crate::completions(&db, &config, position, None).unwrap());
|
||||
let (completion,) = completions
|
||||
.iter()
|
||||
.filter(|it| it.lookup() == what)
|
||||
.collect_tuple()
|
||||
.unwrap_or_else(|| panic!("can't find {what:?} completion in {completions:#?}"));
|
||||
let Some((completion,)) = completions.iter().filter(|it| it.lookup() == what).collect_tuple()
|
||||
else {
|
||||
panic!("can't find {what:?} completion in {completions:#?}")
|
||||
};
|
||||
let mut actual = db.file_text(position.file_id).text(&db).to_string();
|
||||
|
||||
let mut combined_edit = completion.text_edit.clone();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue