File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
crates/ide_completion/src/completions Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 21
21
//! ```
22
22
//!
23
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
64
//! .Fuzzy search details
26
65
//!
You can’t perform that action at this time.
0 commit comments