@@ -396,7 +396,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
396
396
) -> Option < ( Vec < Segment > , Vec < String > ) > {
397
397
// Replace first ident with `self` and check if that is valid.
398
398
path[ 0 ] . ident . name = kw:: SelfLower ;
399
- let result = self . resolve_path ( & path, None , parent_scope, false , span, CrateLint :: No ) ;
399
+ let result = self . r . resolve_path ( & path, None , parent_scope, false , span, CrateLint :: No ) ;
400
400
debug ! ( "make_missing_self_suggestion: path={:?} result={:?}" , path, result) ;
401
401
if let PathResult :: Module ( ..) = result {
402
402
Some ( ( path, Vec :: new ( ) ) )
@@ -420,7 +420,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
420
420
) -> Option < ( Vec < Segment > , Vec < String > ) > {
421
421
// Replace first ident with `crate` and check if that is valid.
422
422
path[ 0 ] . ident . name = kw:: Crate ;
423
- let result = self . resolve_path ( & path, None , parent_scope, false , span, CrateLint :: No ) ;
423
+ let result = self . r . resolve_path ( & path, None , parent_scope, false , span, CrateLint :: No ) ;
424
424
debug ! ( "make_missing_crate_suggestion: path={:?} result={:?}" , path, result) ;
425
425
if let PathResult :: Module ( ..) = result {
426
426
Some ( (
@@ -451,7 +451,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
451
451
) -> Option < ( Vec < Segment > , Vec < String > ) > {
452
452
// Replace first ident with `crate` and check if that is valid.
453
453
path[ 0 ] . ident . name = kw:: Super ;
454
- let result = self . resolve_path ( & path, None , parent_scope, false , span, CrateLint :: No ) ;
454
+ let result = self . r . resolve_path ( & path, None , parent_scope, false , span, CrateLint :: No ) ;
455
455
debug ! ( "make_missing_super_suggestion: path={:?} result={:?}" , path, result) ;
456
456
if let PathResult :: Module ( ..) = result {
457
457
Some ( ( path, Vec :: new ( ) ) )
@@ -484,13 +484,13 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
484
484
// 1) some consistent ordering for emitted dignostics, and
485
485
// 2) `std` suggestions before `core` suggestions.
486
486
let mut extern_crate_names =
487
- self . resolver . extern_prelude . iter ( ) . map ( |( ident, _) | ident. name ) . collect :: < Vec < _ > > ( ) ;
487
+ self . r . extern_prelude . iter ( ) . map ( |( ident, _) | ident. name ) . collect :: < Vec < _ > > ( ) ;
488
488
extern_crate_names. sort_by_key ( |name| Reverse ( name. as_str ( ) ) ) ;
489
489
490
490
for name in extern_crate_names. into_iter ( ) {
491
491
// Replace first ident with a crate name and check if that is valid.
492
492
path[ 0 ] . ident . name = name;
493
- let result = self . resolve_path ( & path, None , parent_scope, false , span, CrateLint :: No ) ;
493
+ let result = self . r . resolve_path ( & path, None , parent_scope, false , span, CrateLint :: No ) ;
494
494
debug ! ( "make_external_crate_suggestion: name={:?} path={:?} result={:?}" ,
495
495
name, path, result) ;
496
496
if let PathResult :: Module ( ..) = result {
@@ -556,7 +556,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
556
556
// ie. `use a::b::{c, d, e};`
557
557
// ^^^
558
558
let ( found_closing_brace, binding_span) = find_span_of_binding_until_next_binding (
559
- self . resolver . session , directive. span , directive. use_span ,
559
+ self . r . session , directive. span , directive. use_span ,
560
560
) ;
561
561
debug ! ( "check_for_module_export_macro: found_closing_brace={:?} binding_span={:?}" ,
562
562
found_closing_brace, binding_span) ;
@@ -571,7 +571,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
571
571
// ie. `use a::b::{c, d};`
572
572
// ^^^
573
573
if let Some ( previous_span) = extend_span_to_previous_binding (
574
- self . resolver . session , binding_span,
574
+ self . r . session , binding_span,
575
575
) {
576
576
debug ! ( "check_for_module_export_macro: previous_span={:?}" , previous_span) ;
577
577
removal_span = removal_span. with_lo ( previous_span. lo ( ) ) ;
@@ -589,12 +589,12 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
589
589
// or `use a::{b, c, d}};`
590
590
// ^^^^^^^^^^^
591
591
let ( has_nested, after_crate_name) = find_span_immediately_after_crate_name (
592
- self . resolver . session , module_name, directive. use_span ,
592
+ self . r . session , module_name, directive. use_span ,
593
593
) ;
594
594
debug ! ( "check_for_module_export_macro: has_nested={:?} after_crate_name={:?}" ,
595
595
has_nested, after_crate_name) ;
596
596
597
- let source_map = self . resolver . session . source_map ( ) ;
597
+ let source_map = self . r . session . source_map ( ) ;
598
598
599
599
// Add the import to the start, with a `{` if required.
600
600
let start_point = source_map. start_point ( after_crate_name) ;
0 commit comments