Stream: t-compiler/rust-analyzer

Topic: FunctionId from ExprId

Paul Faria (May 23 2020 at 17:34, on Zulip):

Hi, I'm trying to tackle . (track unsafe calls within exprs) I've already modified FunctionData to keep track of whether it's unsafe or not. I'm stuck at trying to get a FunctionId given that I've narrowed down my Expr to the Expr::Call variant.

Paul Faria (May 23 2020 at 17:51, on Zulip):

Just figured it out (using infer)

Paul Faria (May 23 2020 at 19:29, on Zulip):

So I think I have part 2 of figured out, but I'm not sure how to approach part 1 or how to connect the two. I also think I've hacked in the diagnostics for part two so that it can be called from Does anyone have a recommended way of approaching part 1, or would someone have time between now and Monday night to go over the best way to organize some of this code?

Paul Faria (May 23 2020 at 23:16, on Zulip):

Have a PR up but I forgot to account for actual unsafe ops. I only tracked calls to unsafe fns

Paul Faria (May 24 2020 at 06:13, on Zulip):

Got pretty far with this today. Stuck at this section at the moment: Not really sure how to go from Expr::Call or Expr::MethodCall to FunctionData. Overall PR is here:

Last update: Jul 27 2021 at 22:30UTC