Stream: t-compiler/rust-analyzer

Topic: evcxr uses rust-analyzer

Florian Diebold (May 13 2021 at 14:04, on Zulip):

I just found out through a linked issue that evcxr uses RA through the autopublished crates. Didn't know this, interesting :thinking:

Jonas Schievink [he/him] (May 13 2021 at 14:08, on Zulip):

I found out about this yesterday while updating it, pretty cool!

Jonas Schievink [he/him] (May 13 2021 at 14:09, on Zulip):

Looks like it works best in jupyter

bjorn3 (May 13 2021 at 14:35, on Zulip):

Evcxr used to parse rustc error messages to get the type of locals. When rustc started shortening type paths in error messages, evcxr has to switch to rust-analyzer for this.

Florian Diebold (May 13 2021 at 14:49, on Zulip):

that and completion, apparently

maahl (May 13 2021 at 21:08, on Zulip):

the author of evcxr mentions why he switched to rust-analyzer here (search for "I switched to using rust-analyzer about six months ago"), there's some interesting feedback there

Jonas Schievink [he/him] (May 13 2021 at 21:37, on Zulip):

What exactly is it using type information for? To declare a return type?

bjorn3 (May 13 2021 at 21:46, on Zulip):

No, to store and load variables across multiple inputs.

bjorn3 (May 13 2021 at 21:47, on Zulip):

For example

let foo = 42;
println!("{}", foo); // need to know the type of foo to load it correctly from the map of stored variables
Last update: Jul 26 2021 at 12:15UTC