]> git.lizzy.rs Git - rust.git/commit
Auto merge of #34660 - jseyfried:fix_parse_stmt, r=nrc
authorbors <bors@rust-lang.org>
Wed, 13 Jul 2016 08:37:07 +0000 (01:37 -0700)
committerGitHub <noreply@github.com>
Wed, 13 Jul 2016 08:37:07 +0000 (01:37 -0700)
commit2ab18ce6f7e147a71e953b9a01ed09aff6b95972
tree376726d4299079f5a88cf6c54e6ed601921b11d8
parent617039bff0decea56b6698497b589671b0371507
parent57fac56cb51d1a8ca0f6d76f869ccbb0a67b0f45
Auto merge of #34660 - jseyfried:fix_parse_stmt, r=nrc

Fix bugs in macro-expanded statement parsing

Fixes #34543.

This is a [breaking-change]. For example, the following would break:
```rust
macro_rules! m { () => {
    println!("") println!("")
    //^ Semicolons are now required on macro-expanded non-braced macro invocations
    //| in statement positions.
    let x = 0
    //^ Semicolons are now required on macro-expanded `let` statements
    //| that are followed by more statements, so this would break.
    let y = 0 //< (this would still be allowed to reduce breakage in the wild)
}
fn main() { m!() }
```

r? @eddyb