Stream: t-compiler/rust-analyzer

Topic: Expr within expr

Paul Faria (May 24 2020 at 20:02, on Zulip):

Is there an existing pattern for determining if one expr is within another? I'm specifically trying to track whether an unsafe expression (I already have tracking for these in my PR) exists within an unsafe block (I've been adding support for this as another variant in ra_hir_def/src/ Currently I'm collecting the unsafe expression by using db.body(def).exprs.iter() to iterate over all of the exprs in a body, assuming that it's visiting each one individually and that I don't need to do any walking myself.

matklad (May 25 2020 at 06:20, on Zulip):

No, I don‘t think we have anything for this,already

Last update: Jul 26 2021 at 13:45UTC