mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Update the docs
This commit is contained in:
parent
e214c3a6bd
commit
821e8369d9
1 changed files with 39 additions and 0 deletions
|
@ -21,6 +21,45 @@
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! Also completes associated items, that require trait imports.
|
//! Also completes associated items, that require trait imports.
|
||||||
|
//! If any unresolved and/or partially-qualified path predeces the input, it will be taken into account: only the items with import string
|
||||||
|
//! containing this whole path will be considered and the corresponding path import will be added:
|
||||||
|
//!
|
||||||
|
//! ```
|
||||||
|
//! mod foo {
|
||||||
|
//! pub mod bar {
|
||||||
|
//! pub struct Item;
|
||||||
|
//!
|
||||||
|
//! impl Item {
|
||||||
|
//! pub const TEST_ASSOC: usize = 3;
|
||||||
|
//! }
|
||||||
|
//! }
|
||||||
|
//! }
|
||||||
|
//!
|
||||||
|
//! fn main() {
|
||||||
|
//! bar::Item::TEST_A$0
|
||||||
|
//! }
|
||||||
|
//! ```
|
||||||
|
//! ->
|
||||||
|
//! ```
|
||||||
|
//! use foo::bar;
|
||||||
|
//!
|
||||||
|
//! mod foo {
|
||||||
|
//! pub mod bar {
|
||||||
|
//! pub struct Item;
|
||||||
|
//!
|
||||||
|
//! impl Item {
|
||||||
|
//! pub const TEST_ASSOC: usize = 3;
|
||||||
|
//! }
|
||||||
|
//! }
|
||||||
|
//! }
|
||||||
|
//!
|
||||||
|
//! fn main() {
|
||||||
|
//! bar::Item::TEST_ASSOC
|
||||||
|
//! }
|
||||||
|
//! ```
|
||||||
|
//!
|
||||||
|
//! 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,
|
||||||
|
//! no imports will be proposed.
|
||||||
//!
|
//!
|
||||||
//! .Fuzzy search details
|
//! .Fuzzy search details
|
||||||
//!
|
//!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue