File tree Expand file tree Collapse file tree 2 files changed +3502
-3485
lines changed
rust/ql/test/library-tests/type-inference Expand file tree Collapse file tree 2 files changed +3502
-3485
lines changed 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