@@ -461,13 +461,7 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> {
461
461
_ => None ,
462
462
}
463
463
} else {
464
- // We already know this isn't in ValueNS, so no need to check variant_field
465
- return Err ( ResolutionFailure :: NotResolved {
466
- module_id,
467
- partial_res : Some ( ty_res) ,
468
- unresolved : item_str. into ( ) ,
469
- }
470
- . into ( ) ) ;
464
+ None
471
465
}
472
466
}
473
467
Res :: Def ( DefKind :: Trait , did) => cx
@@ -528,30 +522,11 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> {
528
522
item_name,
529
523
ns. descr( )
530
524
) ;
531
- // primitives will never have a variant field
532
- Some ( Err ( ResolutionFailure :: NotResolved {
533
- module_id,
534
- partial_res : Some ( ty_res) ,
535
- unresolved : item_str. into ( ) ,
536
- }
537
- . into ( ) ) )
525
+ None
538
526
}
539
527
_ => None ,
540
528
} ;
541
529
res. unwrap_or_else ( || {
542
- if ns == Namespace :: ValueNS {
543
- debug ! ( "considering variant fields for {}" , item_str) ;
544
- let mut iter = item_str. rmatch_indices ( "::" ) ;
545
- let segments = iter. by_ref ( ) . take ( 2 ) ;
546
- if let Some ( ( idx, _) ) = segments. last ( ) {
547
- // If we had `a::b::variant::field`, where `a` is `ty_res` and `b` is unresolved,
548
- // don't treat it as `a::variant::field`
549
- if !iter. next ( ) . is_some ( ) {
550
- debug ! ( "looking for variant field {:?}" , & item_str[ ( idx + 2 ) ..] ) ;
551
- return self . variant_field ( ty_res, & item_str[ ( idx + 2 ) ..] , module_id) ;
552
- }
553
- }
554
- }
555
530
Err ( ResolutionFailure :: NotResolved {
556
531
module_id,
557
532
partial_res : Some ( ty_res) ,
0 commit comments