Skip to content

Document reference search for constructiors/initializations #10725

@umanwizard

Description

@umanwizard
struct S {
    pub x: usize,
}

fn print_s(s: S) {
    println!("{}", s.x)
}

fn main() {
    let s = S { x: 42 };
    print_s(s);
}

"find references" on S in the above program will find both the usage of S in the type of the parameter to print_s, as well as the use of S in the instantiation of s in main. However, I often want to see all the places where a struct is created, without having to hunt through the list of all references for those specific ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-documentationdocs for rust-analyzer usage/inner workingA-idegeneral IDE featuresE-easyS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions