about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-11-28 15:17:13 +0000
committerbors <bors@rust-lang.org>2020-11-28 15:17:13 +0000
commite37f25aa3f356546ab851e394d5598fc575eabda (patch)
tree74c4ea90fdc836713c72cb393d1b8f442dd0e4c4 /compiler/rustc_parse/src/parser/mod.rs
parent4ae328bef47dffcbf363e5ae873f419c06a5511d (diff)
parent208d680f771601cf5efb6a7bfb49cb2b9e655d3e (diff)
downloadrust-e37f25aa3f356546ab851e394d5598fc575eabda.tar.gz
rust-e37f25aa3f356546ab851e394d5598fc575eabda.zip
Auto merge of #79507 - jonas-schievink:rollup-e5yeayh, r=jonas-schievink
Rollup of 10 pull requests

Successful merges:

 - #78086 (Improve doc for 'as _')
 - #78853 (rustc_parse: fix ConstBlock expr span)
 - #79234 (Resolve typedefs in HashMap gdb/lldb pretty-printers)
 - #79344 (Convert UNC path to local path to satisfy install script on Windows)
 - #79383 (Fix bold code formatting in keyword docs)
 - #79460 (Remove intermediate vectors from `add_bounds`)
 - #79474 (Change comments on types to doc-comments)
 - #79476 (Sync rustc_codegen_cranelift)
 - #79478 (Expand docs on Peekable::peek_mut)
 - #79486 (Slightly improve code samples in E0591)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser/mod.rs')
-rw-r--r--compiler/rustc_parse/src/parser/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs
index 2a779c37b89..b746256f5fe 100644
--- a/compiler/rustc_parse/src/parser/mod.rs
+++ b/compiler/rustc_parse/src/parser/mod.rs
@@ -873,7 +873,8 @@ impl<'a> Parser<'a> {
             id: DUMMY_NODE_ID,
             value: self.mk_expr(blk.span, ExprKind::Block(blk, None), AttrVec::new()),
         };
-        Ok(self.mk_expr(span, ExprKind::ConstBlock(anon_const), AttrVec::new()))
+        let blk_span = anon_const.value.span;
+        Ok(self.mk_expr(span.to(blk_span), ExprKind::ConstBlock(anon_const), AttrVec::new()))
     }
 
     /// Parses mutability (`mut` or nothing).