aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2021-03-01 12:14:24 +0000
committerKirill Bulatov <[email protected]>2021-03-08 21:59:20 +0000
commit821e8369d994ebca39ccbf9b449c604d0c910efc (patch)
treef2777a7f7dabaf1b81ee23555a19b0af2cfbcd9a /crates/ide_completion/src
parente214c3a6bd7f74b42d38663b959fc4f0d113c90c (diff)
Update the docs
Diffstat (limited to 'crates/ide_completion/src')
-rw-r--r--crates/ide_completion/src/completions/flyimport.rs39
1 files changed, 39 insertions, 0 deletions
diff --git a/crates/ide_completion/src/completions/flyimport.rs b/crates/ide_completion/src/completions/flyimport.rs
index c6b83da3d..1ef6f8afb 100644
--- a/crates/ide_completion/src/completions/flyimport.rs
+++ b/crates/ide_completion/src/completions/flyimport.rs
@@ -21,6 +21,45 @@
21//! ``` 21//! ```
22//! 22//!
23//! Also completes associated items, that require trait imports. 23//! Also completes associated items, that require trait imports.
24//! If any unresolved and/or partially-qualified path predeces the input, it will be taken into account: only the items with import string
25//! containing this whole path will be considered and the corresponding path import will be added:
26//!
27//! ```
28//! mod foo {
29//! pub mod bar {
30//! pub struct Item;
31//!
32//! impl Item {
33//! pub const TEST_ASSOC: usize = 3;
34//! }
35//! }
36//! }
37//!
38//! fn main() {
39//! bar::Item::TEST_A$0
40//! }
41//! ```
42//! ->
43//! ```
44//! use foo::bar;
45//!
46//! mod foo {
47//! pub mod bar {
48//! pub struct Item;
49//!
50//! impl Item {
51//! pub const TEST_ASSOC: usize = 3;
52//! }
53//! }
54//! }
55//!
56//! fn main() {
57//! bar::Item::TEST_ASSOC
58//! }
59//! ```
60//!
61//! NOTE: currently, if an assoc item comes from a trait that's not currently imported and it also has an unresolved and/or partially-qualified path,
62//! no imports will be proposed.
24//! 63//!
25//! .Fuzzy search details 64//! .Fuzzy search details
26//! 65//!