Skip to content

Commit

Permalink
Use rls-data 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Oct 27, 2017
1 parent e3afba5 commit 45fa7b2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
12 changes: 11 additions & 1 deletion src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/librustc/ich/fingerprint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ impl Fingerprint {
self.0
}

#[inline]
pub fn as_value(&self) -> (u64, u64) {
(self.0, self.1)
}

#[inline]
pub fn combine(self, other: Fingerprint) -> Fingerprint {
// See https://stackoverflow.com/a/27952689 on why this function is
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_save_analysis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rustc_data_structures = { path = "../librustc_data_structures" }
rustc_typeck = { path = "../librustc_typeck" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
rls-data = { git = "https://github.com/Xanewok/rls-data", branch = "crate-source" }
rls-data = "0.12"
rls-span = "0.4"
# FIXME(#40527) should move rustc serialize out of tree
rustc-serialize = "0.3"
3 changes: 2 additions & 1 deletion src/librustc_save_analysis/dump_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
let data = CratePreludeData {
crate_id: GlobalCrateId {
name: name.into(),
disambiguator: self.tcx.sess.local_crate_disambiguator().to_string(),
disambiguator: self.tcx.sess.local_crate_disambiguator()
.to_fingerprint().as_value(),
},
crate_root: crate_root.unwrap_or("<no source>".to_owned()),
external_crates: self.save_ctxt.get_external_crates(),
Expand Down
3 changes: 2 additions & 1 deletion src/librustc_save_analysis/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
num: n.as_u32(),
id: GlobalCrateId {
name: self.tcx.crate_name(n).to_string(),
disambiguator: self.tcx.crate_disambiguator(n).to_string(),
disambiguator: self.tcx.crate_disambiguator(n)
.to_fingerprint().as_value(),
},
});
}
Expand Down

0 comments on commit 45fa7b2

Please sign in to comment.