rust/src/libsyntax
Patrick Walton ddb2466f6a librustc: Always parse macro!()/macro![] as expressions if not
followed by a semicolon.

This allows code like `vec![1i, 2, 3].len();` to work.

This breaks code that uses macros as statements without putting
semicolons after them, such as:

    fn main() {
        ...
        assert!(a == b)
        assert!(c == d)
        println(...);
    }

It also breaks code that uses macros as items without semicolons:

    local_data_key!(foo)

    fn main() {
        println("hello world")
    }

Add semicolons to fix this code. Those two examples can be fixed as
follows:

    fn main() {
        ...
        assert!(a == b);
        assert!(c == d);
        println(...);
    }

    local_data_key!(foo);

    fn main() {
        println("hello world")
    }

RFC #378.

Closes #18635.

[breaking-change]
2014-12-18 12:09:07 -05:00
..
ast_map Parse unsafe impl but don't do anything particularly interesting with the results. 2014-12-14 11:11:55 -05:00
diagnostics librustc: Always parse macro!()/macro![] as expressions if not 2014-12-18 12:09:07 -05:00
ext librustc: Always parse macro!()/macro![] as expressions if not 2014-12-18 12:09:07 -05:00
parse librustc: Always parse macro!()/macro![] as expressions if not 2014-12-18 12:09:07 -05:00
print librustc: Always parse macro!()/macro![] as expressions if not 2014-12-18 12:09:07 -05:00
util libsyntax: use unboxed closures 2014-12-13 17:03:47 -05:00
abi.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
ast_util.rs librustc: Always parse macro!()/macro![] as expressions if not 2014-12-18 12:09:07 -05:00
ast.rs librustc: Always parse macro!()/macro![] as expressions if not 2014-12-18 12:09:07 -05:00
attr.rs librustc: Always parse macro!()/macro![] as expressions if not 2014-12-18 12:09:07 -05:00
codemap.rs librustc: Always parse macro!()/macro![] as expressions if not 2014-12-18 12:09:07 -05:00
config.rs Parse unsafe impl but don't do anything particularly interesting with the results. 2014-12-14 11:11:55 -05:00
diagnostic.rs libsyntax: use unboxed closures 2014-12-13 17:03:47 -05:00
feature_gate.rs Parse unsafe impl but don't do anything particularly interesting with the results. 2014-12-14 11:11:55 -05:00
fold.rs librustc: Always parse macro!()/macro![] as expressions if not 2014-12-18 12:09:07 -05:00
lib.rs libsyntax: fix fallout 2014-12-13 17:03:44 -05:00
owned_slice.rs libsyntax: fix fallout 2014-12-13 17:03:44 -05:00
ptr.rs libsyntax: use unboxed closures 2014-12-13 17:03:47 -05:00
show_span.rs rebasing fixes 2014-09-17 16:53:20 +12:00
std_inject.rs Remove libnative 2014-11-20 17:19:13 -08:00
test.rs Rename FnStyle trait to Unsafety. 2014-12-14 11:11:55 -05:00
visit.rs rollup merge of #19918: pnkfelix/ast-refactor-make-place-in-exprbox-an-option 2014-12-17 11:50:30 -08:00