about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2017-09-27 15:11:22 -0300
committerSantiago Pastorino <spastorino@gmail.com>2017-09-27 15:11:22 -0300
commitcde47cef0f102933abf0a9143ae916864feb7b6b (patch)
tree9c4cd86af566f73a81d68da87ef6b08399fa7ca3
parent1fd3a42c624faf91e9402942419ec409699fb94a (diff)
downloadrust-cde47cef0f102933abf0a9143ae916864feb7b6b.tar.gz
rust-cde47cef0f102933abf0a9143ae916864feb7b6b.zip
Remove DepNodeIndex::new is already impl for Idx
-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};