Skip to content

Commit 430f75a

Browse files
committed
docs:deleting duplicate documentation
1 parent 57707c2 commit 430f75a

File tree

1 file changed

+0
-70
lines changed
  • src/tools/rust-analyzer/crates/ide/src

1 file changed

+0
-70
lines changed

src/tools/rust-analyzer/crates/ide/src/lib.rs

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -514,76 +514,6 @@ impl Analysis {
514514
self.with_db(|db| goto_type_definition::goto_type_definition(db, position))
515515
}
516516

517-
/// Find all references to the item at the cursor position.
518-
///
519-
/// # Examples
520-
///
521-
/// Basic struct reference search:
522-
/// ```rust
523-
/// struct S {
524-
/// pub x: usize,
525-
/// }
526-
///
527-
/// fn print_s(s: S) {
528-
/// println!("{}", s.x)
529-
/// }
530-
///
531-
/// fn main() {
532-
/// let s = S { x: 42 }; // This is a constructor usage
533-
/// print_s(s); // This is a type reference
534-
/// }
535-
/// ```
536-
///
537-
/// To find only constructor/initialization usages:
538-
/// 1. Position cursor on special tokens in struct/enum definition:
539-
/// ```rust
540-
/// // On '{' - finds record struct initializations
541-
/// struct Point { // <- cursor here on '{'
542-
/// x: i32,
543-
/// y: i32,
544-
/// }
545-
///
546-
/// // On '(' - finds tuple struct initializations
547-
/// struct Tuple(i32, i32); // <- cursor here on '('
548-
///
549-
/// // On ';' - finds unit struct initializations
550-
/// struct Unit; // <- cursor here on ';'
551-
/// ```
552-
///
553-
/// 2. Examples of what will be found:
554-
/// ```rust
555-
/// struct Point{x: i32, y: i32};
556-
/// struct Tuple(i32, i32);
557-
/// struct Unit;
558-
///
559-
///
560-
/// let p1 = Point { x: 0, y: 0 }; // Found when cursor on '{'
561-
/// let p2 = Tuple(1, 2); // Found when cursor on '('
562-
/// let u = Unit; // Found when cursor on ';'
563-
/// ```
564-
///
565-
/// 3. For enum variants:
566-
/// ```rust
567-
/// enum E {
568-
/// Struct { // <- cursor here on '{'
569-
/// x: i32
570-
/// },
571-
/// Tuple(i32), // <- cursor here on '('
572-
/// Unit // <- cursor here on identifier
573-
/// }
574-
///
575-
/// let e1 = E::Struct { x: 0 }; // Found for Struct variant
576-
/// let e2 = E::Tuple(1); // Found for Tuple variant
577-
/// let e3 = E::Unit; // Found for Unit variant
578-
/// ```
579-
///
580-
/// # Parameters
581-
/// * `position` - The position in the file to find references for
582-
/// * `search_scope` - Optional scope to limit the search
583-
///
584-
/// # Returns
585-
/// Returns a vector of reference search results if references are found,
586-
/// or None if no valid item is found at the position.
587517
pub fn find_all_refs(
588518
&self,
589519
position: FilePosition,

0 commit comments

Comments
 (0)