File tree Expand file tree Collapse file tree 3 files changed +3546
-3529
lines changed
rust/ql/test/library-tests/type-inference Expand file tree Collapse file tree 3 files changed +3546
-3529
lines changed Original file line number Diff line number Diff line change 1
1
multipleCallTargets
2
2
| dereference.rs:61:15:61:24 | e1.deref() |
3
- | main.rs:2304:13:2304:31 | ...::from(...) |
4
- | main.rs:2305:13:2305:31 | ...::from(...) |
5
- | main.rs:2306:13:2306:31 | ...::from(...) |
6
- | main.rs:2312:13:2312:31 | ...::from(...) |
7
3
| main.rs:2313:13:2313:31 | ...::from(...) |
8
4
| main.rs:2314:13:2314:31 | ...::from(...) |
5
+ | main.rs:2315:13:2315:31 | ...::from(...) |
6
+ | main.rs:2321:13:2321:31 | ...::from(...) |
7
+ | main.rs:2322:13:2322:31 | ...::from(...) |
8
+ | main.rs:2323:13:2323:31 | ...::from(...) |
Original file line number Diff line number Diff line change @@ -559,6 +559,15 @@ mod type_parameter_bounds {
559
559
fn snd ( self ) -> P2 ;
560
560
}
561
561
562
+ fn trait_per_multiple_where_bounds_with_type < T > ( x : T , y : T )
563
+ where
564
+ T : FirstTrait < S1 > ,
565
+ T : Pair < S1 , bool > ,
566
+ {
567
+ let _ = x. fst ( ) ; // $ target=fst type=_:S1
568
+ let _ = y. method ( ) ; // $ target=FirstTrait::method _:S1
569
+ }
570
+
562
571
fn call_trait_per_bound_with_type_1 < T : Pair < S1 , S2 > > ( x : T , y : T ) {
563
572
// The type in the type parameter bound determines the return type.
564
573
let s1 = x. fst ( ) ; // $ target=fst type=s1:S1
@@ -2015,7 +2024,7 @@ mod impl_trait {
2015
2024
let c = uses_my_trait2 ( a) ; // $ type=c:S2 target=uses_my_trait2
2016
2025
let d = uses_my_trait2 ( S1 ) ; // $ type=d:S2 target=uses_my_trait2
2017
2026
let e = get_a_my_trait2 ( S1 ) . get_a ( ) ; // $ target=get_a_my_trait2 target=MyTrait::get_a type=e:S1
2018
- // For this function the `impl` type does not appear in the root of the return type
2027
+ // For this function the `impl` type does not appear in the root of the return type
2019
2028
let f = get_a_my_trait3 ( S1 ) . unwrap ( ) . get_a ( ) ; // $ target=get_a_my_trait3 target=unwrap target=MyTrait::get_a type=f:S1
2020
2029
let g = get_a_my_trait4 ( S1 ) . 0 . get_a ( ) ; // $ target=get_a_my_trait4 target=MyTrait::get_a type=g:S1
2021
2030
}
You can’t perform that action at this time.
0 commit comments