rust/src/libsyntax
bors 404978ea72 auto merge of #16122 : pcwalton/rust/lifetimes-in-unboxed-closures, r=pnkfelix
This patch primarily does two things: (1) it prevents lifetimes from
leaking out of unboxed closures; (2) it allows unboxed closure type
notation, call notation, and construction notation to construct closures
matching any of the three traits.

This breaks code that looked like:

    let mut f;
    {
        let x = &5i;
        f = |&mut:| *x + 10;
    }

Change this code to avoid having a reference escape. For example:

    {
        let x = &5i;
        let mut f; // <-- move here to avoid dangling reference
        f = |&mut:| *x + 10;
    }

I believe this is enough to consider unboxed closures essentially
implemented. Further issues (for example, higher-rank lifetimes) should
be filed as followups.

Closes #14449.

[breaking-change]

r? @pnkfelix
2014-08-14 16:36:19 +00:00
..
ast_map librustc: Parse, but do not fully turn on, the ref keyword for 2014-08-13 18:09:14 -07:00
diagnostics Register new snapshots 2014-07-19 20:38:00 -07:00
ext auto merge of #15929 : pcwalton/rust/by-ref-closures, r=alexcrichton 2014-08-14 03:46:22 +00:00
parse librustc: Tie up loose ends in unboxed closures. 2014-08-14 08:53:25 -07:00
print librustc: Tie up loose ends in unboxed closures. 2014-08-14 08:53:25 -07:00
util Fix all the test fallout 2014-07-09 00:49:54 -07:00
abi.rs Fix trailing whitespace 2014-07-31 02:01:16 +02:00
ast.rs librustc: Tie up loose ends in unboxed closures. 2014-08-14 08:53:25 -07:00
ast_util.rs Temporary bootstrapping hack: introduce syntax for r egion bounds like 'b:'a, 2014-08-07 07:23:59 -04:00
attr.rs Fix misspelled comments. 2014-08-01 19:42:52 -04:00
codemap.rs ignore-lexer-test to broken files and remove some tray hyphens 2014-07-21 10:59:58 -07:00
crateid.rs core: Change the argument order on splitn and rsplitn for strs. 2014-08-13 15:27:37 -07:00
diagnostic.rs Convert a first batch of diagnostics to have error codes 2014-07-12 21:53:34 +02:00
fold.rs librustc: Tie up loose ends in unboxed closures. 2014-08-14 08:53:25 -07:00
lib.rs Implement new mod import sugar 2014-07-20 12:40:08 +02:00
owned_slice.rs libsyntax::ast: Derive Show impls 2014-07-15 18:54:47 -04:00
visit.rs librustc: Tie up loose ends in unboxed closures. 2014-08-14 08:53:25 -07:00