@@ -460,7 +460,7 @@ fn caller$0() {
460460 }
461461
462462 #[ test]
463- fn test_trait_method_call_hierarchy_on_def ( ) {
463+ fn test_trait_method_call_hierarchy ( ) {
464464 check_hierarchy (
465465 r#"
466466trait T1 {
@@ -482,124 +482,5 @@ fn caller() {
482482 expect ! [ [ ] ] ,
483483 ) ;
484484 }
485-
486- #[ test]
487- fn test_trait_method_call_hierarchy_on_impl ( ) {
488- check_hierarchy (
489- r#"
490- trait T1 {
491- fn callee();
492- }
493-
494- struct S1;
495-
496- impl T1 for S1 {
497- fn call$0ee() {}
498- }
499-
500- fn caller() {
501- S1::callee();
502- }
503- "# ,
504- expect ! [ [ "callee Function FileId(0) 64..78 67..73" ] ] ,
505- expect ! [ [ "caller Function FileId(0) 82..115 85..91 : [104..110]" ] ] ,
506- expect ! [ [ ] ] ,
507- ) ;
508- }
509-
510- #[ test]
511- fn test_trait_method_call_hierarchy_on_ref ( ) {
512- check_hierarchy (
513- r#"
514- trait T1 {
515- fn callee();
516- }
517-
518- struct S1;
519-
520- impl T1 for S1 {
521- fn callee() {}
522- }
523-
524- fn caller() {
525- S1::call$0ee();
526- }
527- "# ,
528- expect ! [ [ "callee Function FileId(0) 64..78 67..73" ] ] ,
529- expect ! [ [ "caller Function FileId(0) 82..115 85..91 : [104..110]" ] ] ,
530- expect ! [ [ ] ] ,
531- ) ;
532- }
533-
534- #[ test]
535- fn test_trait_method_generic_call_hierarchy_on_def ( ) {
536- check_hierarchy (
537- r#"
538- trait T1 {
539- fn call$0ee();
540- }
541-
542- struct S1;
543-
544- impl T1 for S1 {
545- fn callee() {}
546- }
547-
548- fn caller<T: T1>() {
549- T::callee();
550- }
551- "# ,
552- expect ! [ [ "callee Function FileId(0) 15..27 18..24" ] ] ,
553- expect ! [ [ "caller Function FileId(0) 82..121 85..91 : [110..116]" ] ] ,
554- expect ! [ [ ] ] ,
555- ) ;
556- }
557-
558- #[ test]
559- fn test_trait_method_generic_call_hierarchy_on_impl ( ) {
560- check_hierarchy (
561- r#"
562- trait T1 {
563- fn callee();
564- }
565-
566- struct S1;
567-
568- impl T1 for S1 {
569- fn call$0ee() {}
570- }
571-
572- fn caller<T: T1>() {
573- T::callee();
574- }
575- "# ,
576- expect ! [ [ "callee Function FileId(0) 64..78 67..73" ] ] ,
577- expect ! [ [ "caller Function FileId(0) 82..121 85..91 : [110..116]" ] ] ,
578- expect ! [ [ ] ] ,
579- ) ;
580- }
581-
582- #[ test]
583- fn test_trait_method_generic_call_hierarchy_on_ref ( ) {
584- check_hierarchy (
585- r#"
586- trait T1 {
587- fn callee();
588- }
589-
590- struct S1;
591-
592- impl T1 for S1 {
593- fn callee() {}
594- }
595-
596- fn caller<T: T1>() {
597- T::call$0ee();
598- }
599- "# ,
600- expect ! [ [ "callee Function FileId(0) 15..27 18..24" ] ] ,
601- expect ! [ [ "caller Function FileId(0) 82..121 85..91 : [110..116]" ] ] ,
602- expect ! [ [ ] ] ,
603- ) ;
604- }
485+
605486}
0 commit comments