about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-09-21 23:54:05 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-10-24 00:32:03 +0200
commit137ded8ab1edf5112c45e0b6854272ae2e9d3a6d (patch)
tree5f5cb3e04541879784b6635e4cb459e6ab9f5f1c /src/libsyntax/parse/parser
parent66995a6a71e2f5e194797cb846ce5866c4305f93 (diff)
downloadrust-137ded8ab1edf5112c45e0b6854272ae2e9d3a6d.tar.gz
rust-137ded8ab1edf5112c45e0b6854272ae2e9d3a6d.zip
pre-expansion gate label_break_value
Diffstat (limited to 'src/libsyntax/parse/parser')
-rw-r--r--src/libsyntax/parse/parser/expr.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser/expr.rs b/src/libsyntax/parse/parser/expr.rs
index 2e34422b918..395f3a3a4df 100644
--- a/src/libsyntax/parse/parser/expr.rs
+++ b/src/libsyntax/parse/parser/expr.rs
@@ -1260,6 +1260,10 @@ impl<'a> Parser<'a> {
         blk_mode: BlockCheckMode,
         outer_attrs: ThinVec<Attribute>,
     ) -> PResult<'a, P<Expr>> {
+        if let Some(label) = opt_label {
+            self.sess.gated_spans.label_break_value.borrow_mut().push(label.ident.span);
+        }
+
         self.expect(&token::OpenDelim(token::Brace))?;
 
         let mut attrs = outer_attrs;