Skip to content

Can't find reference when Self is used to construct a type that takes parameters #12693

Closed
@umanwizard

Description

@umanwizard
use std::marker::PhantomData;

struct S<T> {
    t: PhantomData<T>,
}

impl<T> S<T> {
    fn new() -> Self {
        Self {
            t: Default::default(),
        }
    }
}

fn main() {}

Navigate to the S in struct S and try to find references. Note that the Self constructor later on is not found.

rust-analyzer version: latest origin/master

rustc version: 1.62.0

Metadata

Metadata

Assignees

Labels

A-idegeneral IDE featuresC-bugCategory: bugE-has-instructionsIssue has some instructions and pointers to code to get started

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions