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 1
1
multipleCallTargets
2
2
| 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_ {
1854
1854
}
1855
1855
1856
1856
mod impl_trait {
1857
+ #[ derive( Clone ) ]
1857
1858
struct S1 ;
1858
1859
struct S2 ;
1860
+ struct S3 < T3 > ( T3 ) ;
1859
1861
1860
1862
trait Trait1 {
1861
1863
fn f1 ( & self ) { } // Trait1f1
@@ -1887,10 +1889,21 @@ mod impl_trait {
1887
1889
}
1888
1890
}
1889
1891
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
+
1890
1899
fn get_a_my_trait ( ) -> impl MyTrait < S2 > {
1891
1900
S1
1892
1901
}
1893
1902
1903
+ fn get_a_my_trait2 < T : Clone > ( x : T ) -> impl MyTrait < T > {
1904
+ S3 ( x)
1905
+ }
1906
+
1894
1907
fn uses_my_trait1 < A , B : MyTrait < A > > ( t : B ) -> A {
1895
1908
t. get_a ( ) // $ method=MyTrait::get_a
1896
1909
}
@@ -1908,6 +1921,7 @@ mod impl_trait {
1908
1921
let a = get_a_my_trait ( ) ; // $ method=get_a_my_trait
1909
1922
let c = uses_my_trait2 ( a) ; // $ type=c:S2 method=uses_my_trait2
1910
1923
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
1911
1925
}
1912
1926
}
1913
1927
You can’t perform that action at this time.
0 commit comments