/// When evaluating a `trait` use its associated types' idents for suggestions in E0412.
When evaluating a `trait` use its associated types' idents for suggestions in E0412.
When evaluating a ` trait ` use its associated types ' idents for suggestions in E0412 .
fn with_trait_items<T>(
        &mut self,
        trait_items: &'ast [P<AssocItem>],
        f: impl FnOnce(&mut Self) -> T,
    ) -> T {
        let trait_assoc_items =
            replace(&mut self.diagnostic_metadata.current_trait_assoc_items, Some(&trait_items));
        let result = f(self);
        self.diagnostic_metadata.current_trait_assoc_items = trait_assoc_items;
        result
    }
fn with_trait_items < T > ( & mut self , trait_items : & ' ast [ P < AssocItem > ] , f : impl FnOnce ( & mut Self ) -> T , ) -> T { let trait_assoc_items = replace ( & mut self . diagnostic_metadata . current_trait_assoc_items , Some ( & trait_items ) ) ; let result = f ( self ) ; self . diagnostic_metadata . current_trait_assoc_items = trait_assoc_items ; result }
When evaluating a `trait` use its associated types' idents for suggestions in E0412.
When evaluating a ` trait ` use its associated types ' idents for suggestions in E0412 .
&mut self
trait_items
&'ast [P<AssocItem>]
f
impl FnOnce(&mut Self) -> T