]> git.lizzy.rs Git - rust.git/commitdiff
Use rls-data 0.12
authorIgor Matuszewski <Xanewok@gmail.com>
Fri, 27 Oct 2017 21:53:57 +0000 (23:53 +0200)
committerIgor Matuszewski <Xanewok@gmail.com>
Fri, 27 Oct 2017 21:53:57 +0000 (23:53 +0200)
src/Cargo.lock
src/librustc/ich/fingerprint.rs
src/librustc_save_analysis/Cargo.toml
src/librustc_save_analysis/dump_visitor.rs
src/librustc_save_analysis/lib.rs

index 4dae5e89088f6b8e15f5a5888b277648865aa3d4..36e09e13143a6305d63283aa961a4d1ec779e5fb 100644 (file)
@@ -1480,6 +1480,15 @@ dependencies = [
  "serde_derive 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
+[[package]]
+name = "rls-data"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "rls-rustc"
 version = "0.1.1"
@@ -1833,7 +1842,7 @@ name = "rustc_save_analysis"
 version = "0.0.0"
 dependencies = [
  "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "rls-data 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rls-data 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc 0.0.0",
  "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2711,6 +2720,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db"
 "checksum rls-analysis 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd4e96e3a7d4cf3f31d789080ddd88fbe3251df2feb168049a24eda8b6046ed8"
 "checksum rls-data 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6aea328fa69702c1b0fc395f2c71eae954bf984ac1e418c72f69221b6e3d15ff"
+"checksum rls-data 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48257ceade23c2e01a3ca8d2fc4226101b107f6a3c868f829cf3fd2f204a1fe6"
 "checksum rls-rustc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b21ea952e9bf1569929abf1bb920262cde04b7b1b26d8e0260286302807299d2"
 "checksum rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d7c7046dc6a92f2ae02ed302746db4382e75131b9ce20ce967259f6b5867a6a"
 "checksum rls-vfs 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ffd34691a510938bb67fe0444fb363103c73ffb31c121d1e16bc92d8945ea8ff"
index f3bb3b385667ed041d768cf584e49eb0007dc620..3d089d8e75fb1fff3645ee6387ef9549a117bb05 100644 (file)
@@ -29,6 +29,11 @@ pub fn to_smaller_hash(&self) -> u64 {
         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
index a01659f3d46b799fd0ce65769b16a582ac10a0ed..1b5ab10fc707d46283f9673b545f580d857d2d7b 100644 (file)
@@ -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"
index 13787dbadd04a8deff5f6f9fb8ffb135a644df05..a019864eccf6c76f0e9d36b409718d721eb7899f 100644 (file)
@@ -133,7 +133,8 @@ pub fn dump_crate_info(&mut self, name: &str, krate: &ast::Crate) {
         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(),
index 886679f77d73e5c3fd3c673c532164126ae7de1c..9ebc5ae68d30b6258dd9200c2af2fbd849f80493 100644 (file)
@@ -119,7 +119,8 @@ pub fn get_external_crates(&self) -> Vec<ExternalCrateData> {
                 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(),
                 },
             });
         }