File tree Expand file tree Collapse file tree 3 files changed +1219
-1179
lines changed
rust/ql/test/library-tests/type-inference Expand file tree Collapse file tree 3 files changed +1219
-1179
lines changed Original file line number Diff line number Diff line change 11multipleCallTargets
22| dereference.rs:61:15:61:24 | e1.deref() |
3- | main.rs:2186 :13:2186 :31 | ...::from(...) |
4- | main.rs:2187 :13:2187 :31 | ...::from(...) |
5- | main.rs:2188 :13:2188 :31 | ...::from(...) |
6- | main.rs:2194 :13:2194 :31 | ...::from(...) |
7- | main.rs:2195 :13:2195 :31 | ...::from(...) |
8- | main.rs:2196 :13:2196 :31 | ...::from(...) |
3+ | main.rs:2200 :13:2200 :31 | ...::from(...) |
4+ | main.rs:2201 :13:2201 :31 | ...::from(...) |
5+ | main.rs:2202 :13:2202 :31 | ...::from(...) |
6+ | main.rs:2208 :13:2208 :31 | ...::from(...) |
7+ | main.rs:2209 :13:2209 :31 | ...::from(...) |
8+ | main.rs:2210 :13:2210 :31 | ...::from(...) |
Original file line number Diff line number Diff line change @@ -1854,8 +1854,10 @@ mod async_ {
18541854}
18551855
18561856mod impl_trait {
1857+ #[ derive( Clone ) ]
18571858 struct S1 ;
18581859 struct S2 ;
1860+ struct S3 < T3 > ( T3 ) ;
18591861
18601862 trait Trait1 {
18611863 fn f1 ( & self ) { } // Trait1f1
@@ -1887,10 +1889,21 @@ mod impl_trait {
18871889 }
18881890 }
18891891
1892+ impl < T : Clone > MyTrait < T > for S3 < T > {
1893+ fn get_a ( & self ) -> T {
1894+ let S3 ( t) = self ;
1895+ t. clone ( )
1896+ }
1897+ }
1898+
18901899 fn get_a_my_trait ( ) -> impl MyTrait < S2 > {
18911900 S1
18921901 }
18931902
1903+ fn get_a_my_trait2 < T : Clone > ( x : T ) -> impl MyTrait < T > {
1904+ S3 ( x)
1905+ }
1906+
18941907 fn uses_my_trait1 < A , B : MyTrait < A > > ( t : B ) -> A {
18951908 t. get_a ( ) // $ method=MyTrait::get_a
18961909 }
@@ -1908,6 +1921,7 @@ mod impl_trait {
19081921 let a = get_a_my_trait ( ) ; // $ method=get_a_my_trait
19091922 let c = uses_my_trait2 ( a) ; // $ type=c:S2 method=uses_my_trait2
19101923 let d = uses_my_trait2 ( S1 ) ; // $ type=d:S2 method=uses_my_trait2
1924+ let e = get_a_my_trait2 ( S1 ) . get_a ( ) ; // $ method=get_a_my_trait2 method=MyTrait::get_a $ MISSING: type=e:S1
19111925 }
19121926}
19131927
You can’t perform that action at this time.
0 commit comments