diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2014-01-15 14:39:08 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2014-01-15 18:34:38 -0500 |
| commit | 419ac4a1b899ba88fb360b4c71c08f3610564cd4 (patch) | |
| tree | a67114bd33e84818930d054f29ac81b726a88198 /src/libsyntax/ast_util.rs | |
| parent | 149fc76698318f8f7cdfaa37a818e347721764e7 (diff) | |
| download | rust-419ac4a1b899ba88fb360b4c71c08f3610564cd4.tar.gz rust-419ac4a1b899ba88fb360b4c71c08f3610564cd4.zip | |
Issue #3511 - Rationalize temporary lifetimes.
Major changes: - Define temporary scopes in a syntax-based way that basically defaults to the innermost statement or conditional block, except for in a `let` initializer, where we default to the innermost block. Rules are documented in the code, but not in the manual (yet). See new test run-pass/cleanup-value-scopes.rs for examples. - Refactors Datum to better define cleanup roles. - Refactor cleanup scopes to not be tied to basic blocks, permitting us to have a very large number of scopes (one per AST node). - Introduce nascent documentation in trans/doc.rs covering datums and cleanup in a more comprehensive way.
Diffstat (limited to 'src/libsyntax/ast_util.rs')
| -rw-r--r-- | src/libsyntax/ast_util.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs index 3e0caab65c2..8fb18eecd6e 100644 --- a/src/libsyntax/ast_util.rs +++ b/src/libsyntax/ast_util.rs @@ -567,11 +567,7 @@ pub fn visit_ids_for_inlined_item<O: IdVisitingOperation>(item: &InlinedItem, visited_outermost: false, }; - match *item { - IIItem(i) => id_visitor.visit_item(i, ()), - IIForeign(i) => id_visitor.visit_foreign_item(i, ()), - IIMethod(_, _, m) => visit::walk_method_helper(&mut id_visitor, m, ()), - } + visit::walk_inlined_item(&mut id_visitor, item, ()); } struct IdRangeComputingVisitor { |
