File tree Expand file tree Collapse file tree 3 files changed +364
-348
lines changed
rust/ql/test/library-tests/type-inference Expand file tree Collapse file tree 3 files changed +364
-348
lines changed Original file line number Diff line number Diff line change 11multipleResolvedTargets
22| main.rs:2223:9:2223:31 | ... .my_add(...) |
33| main.rs:2225:9:2225:29 | ... .my_add(...) |
4- | main.rs:2723 :13:2723 :17 | x.f() |
4+ | main.rs:2733 :13:2733 :17 | x.f() |
Original file line number Diff line number Diff line change @@ -2636,6 +2636,13 @@ mod block_types {
26362636}
26372637
26382638mod context_typed {
2639+ #[ derive( Default ) ]
2640+ struct S ;
2641+
2642+ impl S {
2643+ fn f ( self ) { }
2644+ }
2645+
26392646 pub fn f ( ) {
26402647 let x = None ; // $ type=x:T.i32
26412648 let x: Option < i32 > = x;
@@ -2683,6 +2690,9 @@ mod context_typed {
26832690
26842691 let y = Default :: default ( ) ; // $ type=y:i32 target=default
26852692 x. push ( y) ; // $ target=push
2693+
2694+ let s = Default :: default ( ) ; // $ MISSING: target=default type=s:S
2695+ S :: f ( s) ; // $ target=f
26862696 }
26872697}
26882698
You can’t perform that action at this time.
0 commit comments