diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-06 17:17:22 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-06 17:17:22 +0000 |
commit | 46027e10be3d23643bc41ffa8dc8c7cf4013b21a (patch) | |
tree | e68818a739d164bcb14580e0b1e6481d0651c361 /crates/ra_assists/src/doc_tests.rs | |
parent | 895cdb588314f4e04529d1adf8cd232856497dad (diff) | |
parent | 755077e3720bd97e1e506bf8fbe0a2534389f282 (diff) |
Merge #3035
3035: Doctest autoimport r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/doc_tests.rs')
-rw-r--r-- | crates/ra_assists/src/doc_tests.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/crates/ra_assists/src/doc_tests.rs b/crates/ra_assists/src/doc_tests.rs index 370b64225..56020028c 100644 --- a/crates/ra_assists/src/doc_tests.rs +++ b/crates/ra_assists/src/doc_tests.rs | |||
@@ -5,18 +5,12 @@ | |||
5 | 5 | ||
6 | mod generated; | 6 | mod generated; |
7 | 7 | ||
8 | use ra_db::{fixture::WithFixture, FileRange}; | 8 | use ra_db::FileRange; |
9 | use test_utils::{assert_eq_text, extract_range_or_offset}; | 9 | use test_utils::{assert_eq_text, extract_range_or_offset}; |
10 | 10 | ||
11 | use ra_ide_db::RootDatabase; | ||
12 | |||
13 | fn check(assist_id: &str, before: &str, after: &str) { | 11 | fn check(assist_id: &str, before: &str, after: &str) { |
14 | // FIXME we cannot get the imports search functionality here yet, but still need to generate a test and a doc for an assist | ||
15 | if assist_id == "auto_import" { | ||
16 | return; | ||
17 | } | ||
18 | let (selection, before) = extract_range_or_offset(before); | 12 | let (selection, before) = extract_range_or_offset(before); |
19 | let (db, file_id) = RootDatabase::with_single_file(&before); | 13 | let (db, file_id) = crate::helpers::with_single_file(&before); |
20 | let frange = FileRange { file_id, range: selection.into() }; | 14 | let frange = FileRange { file_id, range: selection.into() }; |
21 | 15 | ||
22 | let assist = crate::assists(&db, frange) | 16 | let assist = crate::assists(&db, frange) |