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.
No, I don‘t think we have anything for this,already