Auto merge of #32803 - eddyb:mir-debuginfo, r=nikomatsakis

Initial implementation of debuginfo in MIR trans.

Progress is made towards #31005, but several issues remain, such as #32790.
This commit is contained in:
bors 2016-04-12 19:22:32 -07:00
commit 7c27cce9e5
39 changed files with 558 additions and 633 deletions

View file

@ -698,6 +698,7 @@ impl ScopeId {
#[derive(Clone, Debug, RustcEncodable, RustcDecodable)]
pub struct ScopeData {
pub span: Span,
pub parent_scope: Option<ScopeId>,
}

View file

@ -298,9 +298,11 @@ macro_rules! make_mir_visitor {
fn super_scope_data(&mut self,
scope_data: & $($mutability)* ScopeData) {
let ScopeData {
ref $($mutability)* span,
ref $($mutability)* parent_scope,
} = *scope_data;
self.visit_span(span);
if let Some(ref $($mutability)* parent_scope) = *parent_scope {
self.visit_scope_id(parent_scope);
}