Stream: t-compiler/rust-analyzer

Topic: cfg declarations and implicit returns

Daniel Mcnab (Apr 07 2021 at 11:07, on Zulip):

I've been looking into solving rust-analyzer#8378.

I think the solution would look like modifying to fallback to the last not cfged out statement, if and only if that statement is an expression statement without a semicolon. However, I can't inerate backwards through AstChildren, because that is not implemented (in rowan), although the impl should be cheap. I could just allocate a temporary vector, but I don't feel like that's the best solution.

Daniel Mcnab (Apr 07 2021 at 11:47, on Zulip):

Wasn't too bad, if people think this design makes sense.

Last update: Jul 28 2021 at 03:45UTC