Stream: t-compiler/wg-rls-2.0

Topic: Extern crate in mock analysis?


Paul Faria (Aug 08 2020 at 17:18, on Zulip):

I've implemented syntax highlighting, hover and goto for extern crate (mostly because it all goes through classify_name and classify_name_ref), but I'm unable to figure out how to test the syntax highlighting portion. I've verified it works manually, but I can't see how to explain to MockAnalysis that there are external crates. Is that supported, or would I need to add that functionality to MockAnalysis to move forward?

Paul Faria (Aug 08 2020 at 17:32, on Zulip):

Just figured it out by reading more into MockAnalysis (and for anyone looking for this in the future, you need to:

        //- /main.rs
        extern crate std;
        extern crate alloc as abc;
        //- /std/lib.rs
        pub struct S;
        //- /alloc/lib.rs
        pub struct A
matklad (Aug 12 2020 at 09:49, on Zulip):

Yup, there's more or less the single format for fixtures now, with //- markers

Last update: Sep 27 2020 at 14:15UTC