The #[salsa::tracked] macro, when applied to an impl or function, first attempts to just parse the entire thing with syn. It should handle malformed inputs by just echoing the existing tokens directly back to the user. Right now it doesn't do that and it causes rust-analyzer to not be able to work with incomplete code. I'm not sure if spitting back the tokens would be better but I bet it would.
The
#[salsa::tracked]
macro, when applied to an impl or function, first attempts to just parse the entire thing with syn. It should handle malformed inputs by just echoing the existing tokens directly back to the user. Right now it doesn't do that and it causes rust-analyzer to not be able to work with incomplete code. I'm not sure if spitting back the tokens would be better but I bet it would.