4667: Infer labelled breaks correctly r=flodiebold a=robojumper

Fixes #4663.

Co-authored-by: robojumper <robojumper@gmail.com>
This commit is contained in:
bors[bot] 2020-05-31 12:03:24 +00:00 committed by GitHub
commit 5579ba8af5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 172 additions and 37 deletions

View file

@ -1058,7 +1058,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
/// [Reference](https://doc.rust-lang.org/reference/expressions/block-expr.html)
/// [Labels for blocks RFC](https://github.com/rust-lang/rfcs/blob/master/text/2046-label-break-value.md)
struct BlockExpr: AttrsOwner, ModuleItemOwner {
T!['{'], statements: [Stmt], Expr, T!['}'],
Label, T!['{'], statements: [Stmt], Expr, T!['}'],
}
/// Return expression.