Skip to content

Commit

Permalink
save-analysis: change imports to carry a ref id rather than their own…
Browse files Browse the repository at this point in the history
… node id
  • Loading branch information
nrc committed Oct 28, 2016
1 parent 421b595 commit c751c08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustc_save_analysis/json_dumper.rs
Expand Up @@ -129,7 +129,7 @@ impl From<DefId> for Id {
#[derive(Debug, RustcEncodable)]
struct Import {
kind: ImportKind,
id: Id,
ref_id: Option<Id>,
span: SpanData,
name: String,
value: String,
Expand All @@ -146,7 +146,7 @@ impl From<ExternCrateData> for Import {
fn from(data: ExternCrateData) -> Import {
Import {
kind: ImportKind::ExternCrate,
id: From::from(data.id),
ref_id: None,
span: data.span,
name: data.name,
value: String::new(),
Expand All @@ -157,7 +157,7 @@ impl From<UseData> for Import {
fn from(data: UseData) -> Import {
Import {
kind: ImportKind::Use,
id: From::from(data.id),
ref_id: data.mod_id.map(|id| From::from(id)),
span: data.span,
name: data.name,
value: String::new(),
Expand All @@ -168,7 +168,7 @@ impl From<UseGlobData> for Import {
fn from(data: UseGlobData) -> Import {
Import {
kind: ImportKind::GlobUse,
id: From::from(data.id),
ref_id: None,
span: data.span,
name: "*".to_owned(),
value: data.names.join(", "),
Expand Down

0 comments on commit c751c08

Please sign in to comment.