Skip to content

Commit 45fa7b2

Browse files
committed
Use rls-data 0.12
1 parent e3afba5 commit 45fa7b2

File tree

5 files changed

+21
-4
lines changed

5 files changed

+21
-4
lines changed

src/Cargo.lock

+11-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/librustc/ich/fingerprint.rs

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ impl Fingerprint {
2929
self.0
3030
}
3131

32+
#[inline]
33+
pub fn as_value(&self) -> (u64, u64) {
34+
(self.0, self.1)
35+
}
36+
3237
#[inline]
3338
pub fn combine(self, other: Fingerprint) -> Fingerprint {
3439
// See https://stackoverflow.com/a/27952689 on why this function is

src/librustc_save_analysis/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rustc_data_structures = { path = "../librustc_data_structures" }
1515
rustc_typeck = { path = "../librustc_typeck" }
1616
syntax = { path = "../libsyntax" }
1717
syntax_pos = { path = "../libsyntax_pos" }
18-
rls-data = { git = "https://github.com/Xanewok/rls-data", branch = "crate-source" }
18+
rls-data = "0.12"
1919
rls-span = "0.4"
2020
# FIXME(#40527) should move rustc serialize out of tree
2121
rustc-serialize = "0.3"

src/librustc_save_analysis/dump_visitor.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
133133
let data = CratePreludeData {
134134
crate_id: GlobalCrateId {
135135
name: name.into(),
136-
disambiguator: self.tcx.sess.local_crate_disambiguator().to_string(),
136+
disambiguator: self.tcx.sess.local_crate_disambiguator()
137+
.to_fingerprint().as_value(),
137138
},
138139
crate_root: crate_root.unwrap_or("<no source>".to_owned()),
139140
external_crates: self.save_ctxt.get_external_crates(),

src/librustc_save_analysis/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
119119
num: n.as_u32(),
120120
id: GlobalCrateId {
121121
name: self.tcx.crate_name(n).to_string(),
122-
disambiguator: self.tcx.crate_disambiguator(n).to_string(),
122+
disambiguator: self.tcx.crate_disambiguator(n)
123+
.to_fingerprint().as_value(),
123124
},
124125
});
125126
}

0 commit comments

Comments
 (0)