diff options
Diffstat (limited to 'crates/ra_ide/src/completion.rs')
-rw-r--r-- | crates/ra_ide/src/completion.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/ra_ide/src/completion.rs b/crates/ra_ide/src/completion.rs index e1fcf379d..68ac05e4c 100644 --- a/crates/ra_ide/src/completion.rs +++ b/crates/ra_ide/src/completion.rs | |||
@@ -2,6 +2,9 @@ mod completion_config; | |||
2 | mod completion_item; | 2 | mod completion_item; |
3 | mod completion_context; | 3 | mod completion_context; |
4 | mod presentation; | 4 | mod presentation; |
5 | mod patterns; | ||
6 | #[cfg(test)] | ||
7 | mod test_utils; | ||
5 | 8 | ||
6 | mod complete_attribute; | 9 | mod complete_attribute; |
7 | mod complete_dot; | 10 | mod complete_dot; |
@@ -15,9 +18,6 @@ mod complete_unqualified_path; | |||
15 | mod complete_postfix; | 18 | mod complete_postfix; |
16 | mod complete_macro_in_item_position; | 19 | mod complete_macro_in_item_position; |
17 | mod complete_trait_impl; | 20 | mod complete_trait_impl; |
18 | mod patterns; | ||
19 | #[cfg(test)] | ||
20 | mod test_utils; | ||
21 | 21 | ||
22 | use ra_ide_db::RootDatabase; | 22 | use ra_ide_db::RootDatabase; |
23 | 23 | ||
@@ -63,11 +63,11 @@ pub use crate::completion::{ | |||
63 | // There also snippet completions: | 63 | // There also snippet completions: |
64 | // | 64 | // |
65 | // .Expressions | 65 | // .Expressions |
66 | // - `pd` -> `println!("{:?}")` | 66 | // - `pd` -> `eprintln!(" = {:?}", );` |
67 | // - `ppd` -> `println!("{:#?}")` | 67 | // - `ppd` -> `eprintln!(" = {:#?}", );` |
68 | // | 68 | // |
69 | // .Items | 69 | // .Items |
70 | // - `tfn` -> `#[test] fn f(){}` | 70 | // - `tfn` -> `#[test] fn feature(){}` |
71 | // - `tmod` -> | 71 | // - `tmod` -> |
72 | // ```rust | 72 | // ```rust |
73 | // #[cfg(test)] | 73 | // #[cfg(test)] |
@@ -75,7 +75,7 @@ pub use crate::completion::{ | |||
75 | // use super::*; | 75 | // use super::*; |
76 | // | 76 | // |
77 | // #[test] | 77 | // #[test] |
78 | // fn test_fn() {} | 78 | // fn test_name() {} |
79 | // } | 79 | // } |
80 | // ``` | 80 | // ``` |
81 | 81 | ||
@@ -137,8 +137,8 @@ mod tests { | |||
137 | documentation: &'a str, | 137 | documentation: &'a str, |
138 | } | 138 | } |
139 | 139 | ||
140 | fn check_detail_and_documentation(fixture: &str, expected: DetailAndDocumentation) { | 140 | fn check_detail_and_documentation(ra_fixture: &str, expected: DetailAndDocumentation) { |
141 | let (analysis, position) = analysis_and_position(fixture); | 141 | let (analysis, position) = analysis_and_position(ra_fixture); |
142 | let config = CompletionConfig::default(); | 142 | let config = CompletionConfig::default(); |
143 | let completions = analysis.completions(&config, position).unwrap().unwrap(); | 143 | let completions = analysis.completions(&config, position).unwrap().unwrap(); |
144 | for item in completions { | 144 | for item in completions { |