Stream: t-compiler/wg-rls-2.0

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/expr.rs:Expr). 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: Sep 27 2020 at 14:30UTC