4 ms·
Keep in mind that the people working on rustc are not the same working on rust-analyzer, even if there's some overlap in contributors and there's a desire to sh
by estebank 4y ago
Keep in mind that the people working on rustc are not the same working on rust-analyzer, even if there's some overlap in contributors and there's a desire to share libraries as much as possible. Someone working on speeding up rustc is unlikely to have domain expertise in DX and AST manipulation, and vice-versa.
- xiphias2 4y agoMaybe you're right, but I think both are hard enough that people who are smart enough to do one can do the other if they really want :) By the way AST manipulation is easy, the really hard part of refactoring (that I had a lot of problem with) is creating the lifetime annotations, which requires a deep understanding of the type system. I was trying to learn some type theory and read papers to understand how Rust's life times work, but only found long research papers that don't even do the same thing as Rust. I haven't found any documentation that documents exactly when a function call is accepted by the lifetime checker (borrow checking is easy).
- guipsp 4y agoHave you read the rustnomicon section on lifetimes? I found it pretty useful
- xiphias2 4y agoIt's cool, I just looked at the manual. there's this part though: // NOTE: `'a: {` and `&'b x` is not valid syntax! I hate that I can't introduce new lifetime inside a function, it would make refactoring so much easier. Right now I have to try to refactor, see if the compiler accepts it or not, then revert the change. Sometimes desugaring would be a great feature in itself, sugaring makes interactions between functions much harder to understand.