@@ -171,7 +171,7 @@ impl<'cx, 'gcx, 'tcx> LexicalResolver<'cx, 'gcx, 'tcx> {
171
171
for ( r, vid) in seeds {
172
172
// While all things transitively reachable in the graph
173
173
// from the variable (`'0` in the example above).
174
- let seed_index = NodeIndex ( vid. index as usize ) ;
174
+ let seed_index = NodeIndex ( vid. index ( ) as usize ) ;
175
175
for succ_index in graph. depth_traverse ( seed_index, OUTGOING ) {
176
176
let succ_index = succ_index. 0 ;
177
177
@@ -512,16 +512,16 @@ impl<'cx, 'gcx, 'tcx> LexicalResolver<'cx, 'gcx, 'tcx> {
512
512
match * constraint {
513
513
Constraint :: VarSubVar ( a_id, b_id) => {
514
514
graph. add_edge (
515
- NodeIndex ( a_id. index as usize ) ,
516
- NodeIndex ( b_id. index as usize ) ,
515
+ NodeIndex ( a_id. index ( ) as usize ) ,
516
+ NodeIndex ( b_id. index ( ) as usize ) ,
517
517
* constraint,
518
518
) ;
519
519
}
520
520
Constraint :: RegSubVar ( _, b_id) => {
521
- graph. add_edge ( dummy_source, NodeIndex ( b_id. index as usize ) , * constraint) ;
521
+ graph. add_edge ( dummy_source, NodeIndex ( b_id. index ( ) as usize ) , * constraint) ;
522
522
}
523
523
Constraint :: VarSubReg ( a_id, _) => {
524
- graph. add_edge ( NodeIndex ( a_id. index as usize ) , dummy_sink, * constraint) ;
524
+ graph. add_edge ( NodeIndex ( a_id. index ( ) as usize ) , dummy_sink, * constraint) ;
525
525
}
526
526
Constraint :: RegSubReg ( ..) => {
527
527
// this would be an edge from `dummy_source` to
@@ -630,9 +630,9 @@ impl<'cx, 'gcx, 'tcx> LexicalResolver<'cx, 'gcx, 'tcx> {
630
630
let node_idx = state. stack . pop ( ) . unwrap ( ) ;
631
631
632
632
// check whether we've visited this node on some previous walk
633
- if dup_vec[ node_idx. index as usize ] == u32:: MAX {
634
- dup_vec[ node_idx. index as usize ] = orig_node_idx. index ;
635
- } else if dup_vec[ node_idx. index as usize ] != orig_node_idx. index {
633
+ if dup_vec[ node_idx. index ( ) as usize ] == u32:: MAX {
634
+ dup_vec[ node_idx. index ( ) as usize ] = orig_node_idx. index ( ) as u32 ;
635
+ } else if dup_vec[ node_idx. index ( ) as usize ] != orig_node_idx. index ( ) as u32 {
636
636
state. dup_found = true ;
637
637
}
638
638
@@ -659,7 +659,7 @@ impl<'cx, 'gcx, 'tcx> LexicalResolver<'cx, 'gcx, 'tcx> {
659
659
) {
660
660
debug ! ( "process_edges(source_vid={:?}, dir={:?})" , source_vid, dir) ;
661
661
662
- let source_node_index = NodeIndex ( source_vid. index as usize ) ;
662
+ let source_node_index = NodeIndex ( source_vid. index ( ) as usize ) ;
663
663
for ( _, edge) in graph. adjacent_edges ( source_node_index, dir) {
664
664
match edge. data {
665
665
Constraint :: VarSubVar ( from_vid, to_vid) => {
0 commit comments