pub fn emit_with<F>(&mut self, f: F)
    where
        F: FnOnce(AttrId) -> Bytecode,
    {
        let attr_id = self.new_attr();
        if let Some(info) = std::mem::take(&mut self.next_vc_info) {
            self.data.vc_infos.insert(attr_id, info);
        }
        if let Some(comment) = std::mem::take(&mut self.next_debug_comment) {
            self.data.debug_comments.insert(attr_id, comment);
        }
        self.emit(f(attr_id))
    }
/// Emits a bytecode via a function which takes a freshly generated attribute id.
Emits a bytecode via a function which takes a freshly generated attribute id.
Emits a bytecode via a function which takes a freshly generated attribute id .
pub fn emit_with<F>(&mut self, f: F)
    where
        F: FnOnce(AttrId) -> Bytecode,
    {
        let attr_id = self.new_attr();
        if let Some(info) = std::mem::take(&mut self.next_vc_info) {
            self.data.vc_infos.insert(attr_id, info);
        }
        if let Some(comment) = std::mem::take(&mut self.next_debug_comment) {
            self.data.debug_comments.insert(attr_id, comment);
        }
        self.emit(f(attr_id))
    }
pub fn emit_with < F > ( & mut self , f : F ) where F : FnOnce ( AttrId ) -> Bytecode , { let attr_id = self . new_attr ( ) ; if let Some ( info ) = std :: mem :: take ( & mut self . next_vc_info ) { self . data . vc_infos . insert ( attr_id , info ) ; } if let Some ( comment ) = std :: mem :: take ( & mut self . next_debug_comment ) { self . data . debug_comments . insert ( attr_id , comment ) ; } self . emit ( f ( attr_id ) ) }
Emits a bytecode via a function which takes a freshly generated attribute id.
Emits a bytecode via a function which takes a freshly generated attribute id .
&mut self
f
F