Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

struct ctor ids #1373

Open
Xanewok opened this issue Feb 25, 2019 · 1 comment
Open

struct ctor ids #1373

Xanewok opened this issue Feb 25, 2019 · 1 comment

Comments

@Xanewok
Copy link
Member

Xanewok commented Feb 25, 2019

Originally created by @nrc (rust-dev-tools/rls-analysis#138):

are missing from the JSON save-analysis data, but unit and tuple structs will have a reference to the ctor id, not the struct id, which means that we miss a cross-reference.

@Xanewok
Copy link
Member Author

Xanewok commented Mar 3, 2019

@nrc not sure I understand the problem:

struct Struct { inner: () }
enum MyEnum {
    VariantA,
    VariantB(u32)
}

fn main() {
    let _ = Struct { inner: () };
    let a = MyEnum::VariantA;
    let a = MyEnum::VariantB;
    let a = MyEnum::VariantB(32);
}

Rename and goto-def works both ways on Struct and MyEnum, as well as inner, VariantA and VariantB

@Xanewok Xanewok added the bug label Mar 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant