rustc_ast::mut_visit

Function visit_clobber

source
pub fn visit_clobber<T: DummyAstNode>(t: &mut T, f: impl FnOnce(T) -> T)
Expand description

Use a map-style function (FnOnce(T) -> T) to overwrite a &mut T. Useful when using a flat_map_* or filter_map_* method within a visit_ method.