Skip to content

Commit 8a4e593

Browse files
committed
add arielb1 example
1 parent 19bf544 commit 8a4e593

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: src/librustc_mir/build/scope.rs

+8
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,14 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
441441
/// We wish to pop the storage for X and Y after `bar()` is
442442
/// called, not after the whole `let` is completed.
443443
///
444+
/// As another example, if the second argument diverges:
445+
///
446+
/// foo(Box::new(2), panic!())
447+
///
448+
/// We would allocate the box but then free it on the unwinding
449+
/// path; we would also emit a free on the 'success' path from
450+
/// panic, but that will turn out to be removed as dead-code.
451+
///
444452
/// When building statics/constants, returns `None` since
445453
/// intermediate values do not have to be dropped in that case.
446454
pub fn local_scope(&self) -> Option<CodeExtent> {

0 commit comments

Comments
 (0)