Skip to content

Commit 72c53d6

Browse files
committed
---
yaml --- r: 277033 b: refs/heads/try c: f680c62 h: refs/heads/master i: 277031: f3d069e
1 parent 3fadc7e commit 72c53d6

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 4e6b178649b30b060cce043862dbaeedd361f2c7
4+
refs/heads/try: f680c623d4bcc30772f4eed400631128ffedda05
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/librustc/mir/repr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,7 @@ impl ScopeId {
698698

699699
#[derive(Clone, Debug, RustcEncodable, RustcDecodable)]
700700
pub struct ScopeData {
701+
pub span: Span,
701702
pub parent_scope: Option<ScopeId>,
702703
}
703704

branches/try/src/librustc/mir/visit.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,11 @@ macro_rules! make_mir_visitor {
298298
fn super_scope_data(&mut self,
299299
scope_data: & $($mutability)* ScopeData) {
300300
let ScopeData {
301+
ref $($mutability)* span,
301302
ref $($mutability)* parent_scope,
302303
} = *scope_data;
303304

305+
self.visit_span(span);
304306
if let Some(ref $($mutability)* parent_scope) = *parent_scope {
305307
self.visit_scope_id(parent_scope);
306308
}

branches/try/src/librustc_mir/build/scope.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ impl<'a,'tcx> Builder<'a,'tcx> {
255255
debug!("push_scope({:?})", extent);
256256
let parent_id = self.scopes.last().map(|s| s.id);
257257
let id = ScopeId::new(self.scope_datas.len());
258+
let tcx = self.hir.tcx();
258259
self.scope_datas.push(ScopeData {
260+
span: extent.span(&tcx.region_maps, &tcx.map).unwrap_or(DUMMY_SP),
259261
parent_scope: parent_id,
260262
});
261263
self.scopes.push(Scope {

0 commit comments

Comments
 (0)