File tree Expand file tree Collapse file tree 3 files changed +180
-126
lines changed
rust/ql/test/library-tests/type-inference Expand file tree Collapse file tree 3 files changed +180
-126
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,6 @@ multipleResolvedTargets
3030| main.rs:2642:13:2642:31 | ...::from(...) |
3131| main.rs:2643:13:2643:31 | ...::from(...) |
3232| main.rs:2644:13:2644:31 | ...::from(...) |
33- | main.rs:3067 :13:3067 :17 | x.f() |
33+ | main.rs:3073 :13:3073 :17 | x.f() |
3434| pattern_matching.rs:273:13:273:27 | * ... |
3535| pattern_matching.rs:273:14:273:27 | * ... |
Original file line number Diff line number Diff line change @@ -3038,7 +3038,13 @@ mod context_typed {
30383038
30393039mod literal_overlap {
30403040 trait MyTrait {
3041+ // MyTrait::f
30413042 fn f ( self ) -> Self ;
3043+
3044+ // MyTrait::g
3045+ fn g ( & self , other : & Self ) -> & Self {
3046+ self . f ( ) // $ target=Reff
3047+ }
30423048 }
30433049
30443050 impl MyTrait for i32 {
@@ -3067,6 +3073,12 @@ mod literal_overlap {
30673073 x = x. f ( ) ; // $ target=usizef $ SPURIOUS: target=i32f
30683074 x
30693075 }
3076+
3077+ fn g ( ) {
3078+ let x: usize = 0 ;
3079+ let y = & 1 ;
3080+ let z = x. g ( y) ; // $ target=MyTrait::g
3081+ }
30703082}
30713083
30723084mod blanket_impl;
You can’t perform that action at this time.
0 commit comments