about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_incremental/persist/data.rs8
-rw-r--r--src/librustc_incremental/persist/save.rs2
2 files changed, 1 insertions, 9 deletions
diff --git a/src/librustc_incremental/persist/data.rs b/src/librustc_incremental/persist/data.rs
index 06acfb5d778..9050702e3ca 100644
--- a/src/librustc_incremental/persist/data.rs
+++ b/src/librustc_incremental/persist/data.rs
@@ -70,14 +70,6 @@ impl SerializedDepGraph {
          RustcEncodable, RustcDecodable)]
 pub struct DepNodeIndex(pub u32);
 
-impl DepNodeIndex {
-    #[inline]
-    pub fn new(idx: usize) -> DepNodeIndex {
-        assert!(idx <= ::std::u32::MAX as usize);
-        DepNodeIndex(idx as u32)
-    }
-}
-
 impl Idx for DepNodeIndex {
     #[inline]
     fn new(idx: usize) -> Self {
diff --git a/src/librustc_incremental/persist/save.rs b/src/librustc_incremental/persist/save.rs
index 83a618211da..fd699229f1b 100644
--- a/src/librustc_incremental/persist/save.rs
+++ b/src/librustc_incremental/persist/save.rs
@@ -19,7 +19,7 @@ use rustc::util::common::time;
 use rustc::util::nodemap::DefIdMap;
 use rustc_data_structures::fx::FxHashMap;
 use rustc_data_structures::graph;
-use rustc_data_structures::indexed_vec::IndexVec;
+use rustc_data_structures::indexed_vec::{IndexVec, Idx};
 use rustc_serialize::Encodable as RustcEncodable;
 use rustc_serialize::opaque::Encoder;
 use std::io::{self, Cursor, Write};