rust/src/libsyntax/parse
Patrick Walton 8d27232141 librustc: Tie up loose ends in unboxed closures.
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]
2014-08-14 08:53:25 -07:00
..
lexer quote_expr macro: embed Ident using special encoding that preserves hygiene. 2014-08-13 17:40:15 +02:00
attr.rs Fix spans for attributes 2014-07-11 15:26:26 -07:00
classify.rs syntax: doc comments all the things 2014-07-09 00:06:27 -07:00
common.rs syntax: doc comments all the things 2014-07-09 00:06:27 -07:00
mod.rs quote_expr macro: embed Ident using special encoding that preserves hygiene. 2014-08-13 17:40:15 +02:00
obsolete.rs libsyntax: Remove ~self and mut ~self from the language. 2014-07-24 07:26:03 -07:00
parser.rs librustc: Tie up loose ends in unboxed closures. 2014-08-14 08:53:25 -07:00
token.rs Correctly stringify! types and paths inside macros 2014-07-20 08:47:14 +02:00