Skip to content

Commit

Permalink
Add doc comment explaining what BlockTailInfo is.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Oct 5, 2018
1 parent 056cfff commit 704877f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/librustc/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,14 @@ mod binding_form_impl {
}
}

/// `BlockTailInfo` is attached to the `LocalDecl` for temporaries
/// created during evaluation of expressions in a block tail
/// expression; that is, a block like `{ STMT_1; STMT_2; EXPR }`.
///
/// It is used to improve diagnostics when such temporaries are
/// involved in borrow_check errors, e.g. explanations of where the
/// temporaries come from, when their destructors are run, and/or how
/// one might revise the code to satisfy the borrow checker's rules.
#[derive(Clone, Debug, RustcEncodable, RustcDecodable)]
pub struct BlockTailInfo {
/// If `true`, then the value resulting from evaluating this tail
Expand Down

0 comments on commit 704877f

Please sign in to comment.