about summary refs log tree commit diff
path: root/src/librustc_resolve
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-07-23 01:02:32 +0000
committerbors <bors@rust-lang.org>2018-07-23 01:02:32 +0000
commit02b0479c26b389f08e51da4fc5b6e99488fdb96f (patch)
treec568e5f04446e902e4af93d289314d2177beb160 /src/librustc_resolve
parent67f9c71e4547b9892b2f6ed68c34fb9d0f00c9d1 (diff)
parentbab5eb41a7f3f755708527d97a1f8bf09b15d570 (diff)
downloadrust-02b0479c26b389f08e51da4fc5b6e99488fdb96f.tar.gz
rust-02b0479c26b389f08e51da4fc5b6e99488fdb96f.zip
Auto merge of #52568 - oli-obk:span_bug_error, r=varkor
Fix loop label resolution around constants

And make `delay_span_bug` a little more helpful

r? @varkor

fixes #52442
fixes #52443
Diffstat (limited to 'src/librustc_resolve')
-rw-r--r--src/librustc_resolve/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs
index 9fe25aaa6c0..4820a0f2876 100644
--- a/src/librustc_resolve/lib.rs
+++ b/src/librustc_resolve/lib.rs
@@ -2359,7 +2359,9 @@ impl<'a> Resolver<'a> {
         where F: FnOnce(&mut Resolver)
     {
         self.ribs[ValueNS].push(Rib::new(ConstantItemRibKind));
+        self.label_ribs.push(Rib::new(ConstantItemRibKind));
         f(self);
+        self.label_ribs.pop();
         self.ribs[ValueNS].pop();
     }