Skip to content

Commit d55677b

Browse files
committed
Rust: Document overlapping function resoltion with test case
1 parent 34f3892 commit d55677b

File tree

3 files changed

+257
-246
lines changed

3 files changed

+257
-246
lines changed

rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ 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:551:9:552:15 | ...::Assoc(...) |

rust/ql/test/library-tests/path-resolution/main.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,12 @@ mod m16 {
545545
!Self::Assoc() // $ item=S3boolAssocFunc
546546
} // S3boolAssocFunc
547547
}
548+
549+
#[rustfmt::skip]
550+
fn foo() {
551+
S3::<i32>:: // $ item=i32
552+
Assoc(); // $ item=S3i32AssocFunc $ SPURIOUS: item=S3boolAssocFunc
553+
}
548554
}
549555

550556
mod trait_visibility {

0 commit comments

Comments
 (0)