Skip to content

Commit 37c74e1

Browse files
Rollup merge of rust-lang#44889 - spastorino:remove_new, r=arielb1
Remove DepNodeIndex::new is already impl for Idx
2 parents 7756d39 + cde47ce commit 37c74e1

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/librustc_incremental/persist/data.rs

-8
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,6 @@ impl SerializedDepGraph {
7070
RustcEncodable, RustcDecodable)]
7171
pub struct DepNodeIndex(pub u32);
7272

73-
impl DepNodeIndex {
74-
#[inline]
75-
pub fn new(idx: usize) -> DepNodeIndex {
76-
assert!(idx <= ::std::u32::MAX as usize);
77-
DepNodeIndex(idx as u32)
78-
}
79-
}
80-
8173
impl Idx for DepNodeIndex {
8274
#[inline]
8375
fn new(idx: usize) -> Self {

src/librustc_incremental/persist/save.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use rustc::util::common::time;
1919
use rustc::util::nodemap::DefIdMap;
2020
use rustc_data_structures::fx::FxHashMap;
2121
use rustc_data_structures::graph;
22-
use rustc_data_structures::indexed_vec::IndexVec;
22+
use rustc_data_structures::indexed_vec::{IndexVec, Idx};
2323
use rustc_serialize::Encodable as RustcEncodable;
2424
use rustc_serialize::opaque::Encoder;
2525
use std::io::{self, Cursor, Write};

0 commit comments

Comments
 (0)