We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e6f4cf commit 70c3a3dCopy full SHA for 70c3a3d
src/librustc/dep_graph/graph.rs
@@ -569,28 +569,20 @@ pub(super) struct DepNodeIndexNew {
569
}
570
571
impl Idx for DepNodeIndexNew {
572
- fn new(idx: usize) -> Self {
573
- DepNodeIndexNew::new(idx)
+ fn new(v: usize) -> DepNodeIndexNew {
+ assert!((v & 0xFFFF_FFFF) == v);
574
+ DepNodeIndexNew { index: v as u32 }
575
576
+
577
fn index(self) -> usize {
- self.index()
578
+ self.index as usize
579
580
581
582
impl DepNodeIndexNew {
-
583
const INVALID: DepNodeIndexNew = DepNodeIndexNew {
584
index: ::std::u32::MAX,
585
};
586
- fn new(v: usize) -> DepNodeIndexNew {
587
- assert!((v & 0xFFFF_FFFF) == v);
588
- DepNodeIndexNew { index: v as u32 }
589
- }
590
591
- fn index(self) -> usize {
592
- self.index as usize
593
594
595
596
#[derive(Clone, Debug, PartialEq)]
0 commit comments