rustc_mir_build::builder::scope

Trait DropTreeBuilder

Source
trait DropTreeBuilder<'tcx> {
    // Required methods
    fn make_block(cfg: &mut CFG<'tcx>) -> BasicBlock;
    fn link_entry_point(cfg: &mut CFG<'tcx>, from: BasicBlock, to: BasicBlock);
}
Expand description

A trait that determined how DropTree creates its blocks and links to any entry nodes.

Required Methods§

Source

fn make_block(cfg: &mut CFG<'tcx>) -> BasicBlock

Create a new block for the tree. This should call either cfg.start_new_block() or cfg.start_new_cleanup_block().

Source

fn link_entry_point(cfg: &mut CFG<'tcx>, from: BasicBlock, to: BasicBlock)

Links a block outside the drop tree, from, to the block to inside the drop tree.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'tcx> DropTreeBuilder<'tcx> for CoroutineDrop

Source§

impl<'tcx> DropTreeBuilder<'tcx> for ExitScopes

Source§

impl<'tcx> DropTreeBuilder<'tcx> for Unwind