File tree Expand file tree Collapse file tree 3 files changed +318
-247
lines changed
rust/ql/test/library-tests/path-resolution Expand file tree Collapse file tree 3 files changed +318
-247
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,5 @@ multipleCallTargets
44| main.rs:369:9:371:16 | ...::f(...) |
55| main.rs:450:9:454:16 | ...::f(...) |
66| main.rs:455:9:459:16 | ...::f(...) |
7+ | main.rs:534:13:534:25 | ...::Assoc(...) |
8+ | main.rs:545:14:545:26 | ...::Assoc(...) |
Original file line number Diff line number Diff line change @@ -504,6 +504,47 @@ mod m16 {
504504 let x: Self :: AssocType = true ; // $ item=S2Trait4AssocType
505505 }
506506 }
507+
508+ trait Trait5 {
509+ type Assoc ; // Trait5Assoc
510+
511+ fn Assoc ( ) -> Self :: Assoc ; // $ item=Trait5Assoc
512+ }
513+
514+ #[ rustfmt:: skip]
515+ impl Trait5 for S { // $ item=Trait5 item=I90
516+ type Assoc = i32 // $ item=i32
517+ ; // AssocType
518+
519+ fn Assoc ( )
520+ -> Self :: Assoc { // $ item=AssocType
521+ Self :: Assoc ( ) + 1 // $ item=AssocFunc
522+ } // AssocFunc
523+ }
524+
525+ struct S3 < T3 > ( T3 ) ; // $ item=T3
526+
527+ #[ rustfmt:: skip]
528+ impl Trait5 for S3 < i32 > { // $ item=Trait5 item=S3 item=i32
529+ type Assoc = i32 // $ item=i32
530+ ; // S3i32AssocType
531+
532+ fn Assoc ( )
533+ -> Self :: Assoc { // $ item=S3i32AssocType
534+ Self :: Assoc ( ) + 1 // $ item=S3i32AssocFunc $ SPURIOUS: item=S3boolAssocFunc
535+ } // S3i32AssocFunc
536+ }
537+
538+ #[ rustfmt:: skip]
539+ impl Trait5 for S3 < bool > { // $ item=Trait5 item=S3 item=bool
540+ type Assoc = bool // $ item=bool
541+ ; // S3boolAssocType
542+
543+ fn Assoc ( )
544+ -> Self :: Assoc { // $ item=S3boolAssocType
545+ !Self :: Assoc ( ) // $ item=S3boolAssocFunc $ SPURIOUS: item=S3i32AssocFunc
546+ } // S3boolAssocFunc
547+ }
507548}
508549
509550mod trait_visibility {
You can’t perform that action at this time.
0 commit comments