diff --git a/src/librustc/dep_graph/graph.rs b/src/librustc/dep_graph/graph.rs index 71a7ee84cd1..d9770db9d69 100644 --- a/src/librustc/dep_graph/graph.rs +++ b/src/librustc/dep_graph/graph.rs @@ -569,20 +569,6 @@ pub(super) struct DepNodeIndexNew { } impl Idx for DepNodeIndexNew { - fn new(idx: usize) -> Self { - DepNodeIndexNew::new(idx) - } - fn index(self) -> usize { - self.index() - } -} - -impl DepNodeIndexNew { - - const INVALID: DepNodeIndexNew = DepNodeIndexNew { - index: ::std::u32::MAX, - }; - fn new(v: usize) -> DepNodeIndexNew { assert!((v & 0xFFFF_FFFF) == v); DepNodeIndexNew { index: v as u32 } @@ -593,6 +579,12 @@ impl DepNodeIndexNew { } } +impl DepNodeIndexNew { + const INVALID: DepNodeIndexNew = DepNodeIndexNew { + index: ::std::u32::MAX, + }; +} + #[derive(Clone, Debug, PartialEq)] enum OpenTask { Regular {