diff options
Diffstat (limited to 'crates/ra_hir/src/ty/tests.rs')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 329 |
1 files changed, 165 insertions, 164 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index f4f63ca93..4362bb27a 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs | |||
@@ -20,6 +20,9 @@ use crate::{ | |||
20 | // against snapshots of the expected results using insta. Use cargo-insta to | 20 | // against snapshots of the expected results using insta. Use cargo-insta to |
21 | // update the snapshots. | 21 | // update the snapshots. |
22 | 22 | ||
23 | mod never_type; | ||
24 | mod coercion; | ||
25 | |||
23 | #[test] | 26 | #[test] |
24 | fn infer_await() { | 27 | fn infer_await() { |
25 | let (mut db, pos) = MockDatabase::with_position( | 28 | let (mut db, pos) = MockDatabase::with_position( |
@@ -236,17 +239,23 @@ fn test() { | |||
236 | let a = 1isize; | 239 | let a = 1isize; |
237 | let b: usize = 1; | 240 | let b: usize = 1; |
238 | let c = b; | 241 | let c = b; |
242 | let d: u32; | ||
243 | let e; | ||
244 | let f: i32 = e; | ||
239 | } | 245 | } |
240 | "#), | 246 | "#), |
241 | @r###" | 247 | @r###" |
242 | 248 | [11; 118) '{ ...= e; }': () | |
243 | [11; 71) '{ ...= b; }': () | ||
244 | [21; 22) 'a': isize | 249 | [21; 22) 'a': isize |
245 | [25; 31) '1isize': isize | 250 | [25; 31) '1isize': isize |
246 | [41; 42) 'b': usize | 251 | [41; 42) 'b': usize |
247 | [52; 53) '1': usize | 252 | [52; 53) '1': usize |
248 | [63; 64) 'c': usize | 253 | [63; 64) 'c': usize |
249 | [67; 68) 'b': usize | 254 | [67; 68) 'b': usize |
255 | [78; 79) 'd': u32 | ||
256 | [94; 95) 'e': i32 | ||
257 | [105; 106) 'f': i32 | ||
258 | [114; 115) 'e': i32 | ||
250 | "### | 259 | "### |
251 | ); | 260 | ); |
252 | } | 261 | } |
@@ -328,14 +337,14 @@ fn test() { | |||
328 | "#), | 337 | "#), |
329 | @r###" | 338 | @r###" |
330 | [45; 49) 'self': &[T] | 339 | [45; 49) 'self': &[T] |
331 | [56; 79) '{ ... }': ! | 340 | [56; 79) '{ ... }': T |
332 | [66; 73) 'loop {}': ! | 341 | [66; 73) 'loop {}': ! |
333 | [71; 73) '{}': () | 342 | [71; 73) '{}': () |
334 | [133; 160) '{ ...o"); }': () | 343 | [133; 160) '{ ...o"); }': () |
335 | [139; 149) '<[_]>::foo': fn foo<u8>(&[T]) -> T | 344 | [139; 149) '<[_]>::foo': fn foo<u8>(&[T]) -> T |
336 | [139; 157) '<[_]>:..."foo")': u8 | 345 | [139; 157) '<[_]>:..."foo")': u8 |
337 | [150; 156) 'b"foo"': &[u8] | 346 | [150; 156) 'b"foo"': &[u8] |
338 | "### | 347 | "### |
339 | ); | 348 | ); |
340 | } | 349 | } |
341 | 350 | ||
@@ -801,6 +810,130 @@ fn test2(a1: *const A, a2: *mut A) { | |||
801 | } | 810 | } |
802 | 811 | ||
803 | #[test] | 812 | #[test] |
813 | fn infer_argument_autoderef() { | ||
814 | assert_snapshot!( | ||
815 | infer(r#" | ||
816 | #[lang = "deref"] | ||
817 | pub trait Deref { | ||
818 | type Target; | ||
819 | fn deref(&self) -> &Self::Target; | ||
820 | } | ||
821 | |||
822 | struct A<T>(T); | ||
823 | |||
824 | impl<T> A<T> { | ||
825 | fn foo(&self) -> &T { | ||
826 | &self.0 | ||
827 | } | ||
828 | } | ||
829 | |||
830 | struct B<T>(T); | ||
831 | |||
832 | impl<T> Deref for B<T> { | ||
833 | type Target = T; | ||
834 | fn deref(&self) -> &Self::Target { | ||
835 | &self.0 | ||
836 | } | ||
837 | } | ||
838 | |||
839 | fn test() { | ||
840 | let t = A::foo(&&B(B(A(42)))); | ||
841 | } | ||
842 | "#), | ||
843 | @r###" | ||
844 | [68; 72) 'self': &Self | ||
845 | [139; 143) 'self': &A<T> | ||
846 | [151; 174) '{ ... }': &T | ||
847 | [161; 168) '&self.0': &T | ||
848 | [162; 166) 'self': &A<T> | ||
849 | [162; 168) 'self.0': T | ||
850 | [255; 259) 'self': &B<T> | ||
851 | [278; 301) '{ ... }': &T | ||
852 | [288; 295) '&self.0': &T | ||
853 | [289; 293) 'self': &B<T> | ||
854 | [289; 295) 'self.0': T | ||
855 | [315; 353) '{ ...))); }': () | ||
856 | [325; 326) 't': &i32 | ||
857 | [329; 335) 'A::foo': fn foo<i32>(&A<T>) -> &T | ||
858 | [329; 350) 'A::foo...42))))': &i32 | ||
859 | [336; 349) '&&B(B(A(42)))': &&B<B<A<i32>>> | ||
860 | [337; 349) '&B(B(A(42)))': &B<B<A<i32>>> | ||
861 | [338; 339) 'B': B<B<A<i32>>>(T) -> B<T> | ||
862 | [338; 349) 'B(B(A(42)))': B<B<A<i32>>> | ||
863 | [340; 341) 'B': B<A<i32>>(T) -> B<T> | ||
864 | [340; 348) 'B(A(42))': B<A<i32>> | ||
865 | [342; 343) 'A': A<i32>(T) -> A<T> | ||
866 | [342; 347) 'A(42)': A<i32> | ||
867 | [344; 346) '42': i32 | ||
868 | "### | ||
869 | ); | ||
870 | } | ||
871 | |||
872 | #[test] | ||
873 | fn infer_method_argument_autoderef() { | ||
874 | assert_snapshot!( | ||
875 | infer(r#" | ||
876 | #[lang = "deref"] | ||
877 | pub trait Deref { | ||
878 | type Target; | ||
879 | fn deref(&self) -> &Self::Target; | ||
880 | } | ||
881 | |||
882 | struct A<T>(*mut T); | ||
883 | |||
884 | impl<T> A<T> { | ||
885 | fn foo(&self, x: &A<T>) -> &T { | ||
886 | &*x.0 | ||
887 | } | ||
888 | } | ||
889 | |||
890 | struct B<T>(T); | ||
891 | |||
892 | impl<T> Deref for B<T> { | ||
893 | type Target = T; | ||
894 | fn deref(&self) -> &Self::Target { | ||
895 | &self.0 | ||
896 | } | ||
897 | } | ||
898 | |||
899 | fn test(a: A<i32>) { | ||
900 | let t = A(0 as *mut _).foo(&&B(B(a))); | ||
901 | } | ||
902 | "#), | ||
903 | @r###" | ||
904 | [68; 72) 'self': &Self | ||
905 | [144; 148) 'self': &A<T> | ||
906 | [150; 151) 'x': &A<T> | ||
907 | [166; 187) '{ ... }': &T | ||
908 | [176; 181) '&*x.0': &T | ||
909 | [177; 181) '*x.0': T | ||
910 | [178; 179) 'x': &A<T> | ||
911 | [178; 181) 'x.0': *mut T | ||
912 | [268; 272) 'self': &B<T> | ||
913 | [291; 314) '{ ... }': &T | ||
914 | [301; 308) '&self.0': &T | ||
915 | [302; 306) 'self': &B<T> | ||
916 | [302; 308) 'self.0': T | ||
917 | [326; 327) 'a': A<i32> | ||
918 | [337; 383) '{ ...))); }': () | ||
919 | [347; 348) 't': &i32 | ||
920 | [351; 352) 'A': A<i32>(*mut T) -> A<T> | ||
921 | [351; 365) 'A(0 as *mut _)': A<i32> | ||
922 | [351; 380) 'A(0 as...B(a)))': &i32 | ||
923 | [353; 354) '0': i32 | ||
924 | [353; 364) '0 as *mut _': *mut i32 | ||
925 | [370; 379) '&&B(B(a))': &&B<B<A<i32>>> | ||
926 | [371; 379) '&B(B(a))': &B<B<A<i32>>> | ||
927 | [372; 373) 'B': B<B<A<i32>>>(T) -> B<T> | ||
928 | [372; 379) 'B(B(a))': B<B<A<i32>>> | ||
929 | [374; 375) 'B': B<A<i32>>(T) -> B<T> | ||
930 | [374; 378) 'B(a)': B<A<i32>> | ||
931 | [376; 377) 'a': A<i32> | ||
932 | "### | ||
933 | ); | ||
934 | } | ||
935 | |||
936 | #[test] | ||
804 | fn bug_484() { | 937 | fn bug_484() { |
805 | assert_snapshot!( | 938 | assert_snapshot!( |
806 | infer(r#" | 939 | infer(r#" |
@@ -983,14 +1116,12 @@ fn test(x: &str, y: isize) { | |||
983 | 1116 | ||
984 | let b = [a, ["b"]]; | 1117 | let b = [a, ["b"]]; |
985 | let x: [u8; 0] = []; | 1118 | let x: [u8; 0] = []; |
986 | let z: &[u8] = &[1, 2, 3]; | ||
987 | } | 1119 | } |
988 | "#), | 1120 | "#), |
989 | @r###" | 1121 | @r###" |
990 | |||
991 | [9; 10) 'x': &str | 1122 | [9; 10) 'x': &str |
992 | [18; 19) 'y': isize | 1123 | [18; 19) 'y': isize |
993 | [28; 324) '{ ... 3]; }': () | 1124 | [28; 293) '{ ... []; }': () |
994 | [38; 39) 'a': [&str;_] | 1125 | [38; 39) 'a': [&str;_] |
995 | [42; 45) '[x]': [&str;_] | 1126 | [42; 45) '[x]': [&str;_] |
996 | [43; 44) 'x': &str | 1127 | [43; 44) 'x': &str |
@@ -1040,12 +1171,6 @@ fn test(x: &str, y: isize) { | |||
1040 | [260; 263) '"b"': &str | 1171 | [260; 263) '"b"': &str |
1041 | [275; 276) 'x': [u8;_] | 1172 | [275; 276) 'x': [u8;_] |
1042 | [288; 290) '[]': [u8;_] | 1173 | [288; 290) '[]': [u8;_] |
1043 | [300; 301) 'z': &[u8;_] | ||
1044 | [311; 321) '&[1, 2, 3]': &[u8;_] | ||
1045 | [312; 321) '[1, 2, 3]': [u8;_] | ||
1046 | [313; 314) '1': u8 | ||
1047 | [316; 317) '2': u8 | ||
1048 | [319; 320) '3': u8 | ||
1049 | "### | 1174 | "### |
1050 | ); | 1175 | ); |
1051 | } | 1176 | } |
@@ -1767,8 +1892,7 @@ fn test() { | |||
1767 | } | 1892 | } |
1768 | "#), | 1893 | "#), |
1769 | @r###" | 1894 | @r###" |
1770 | 1895 | [80; 104) '{ ... }': Gen<T> | |
1771 | [80; 104) '{ ... }': ! | ||
1772 | [90; 98) 'loop { }': ! | 1896 | [90; 98) 'loop { }': ! |
1773 | [95; 98) '{ }': () | 1897 | [95; 98) '{ }': () |
1774 | [118; 146) '{ ...e(); }': () | 1898 | [118; 146) '{ ...e(); }': () |
@@ -1798,8 +1922,7 @@ fn test() { | |||
1798 | } | 1922 | } |
1799 | "#), | 1923 | "#), |
1800 | @r###" | 1924 | @r###" |
1801 | 1925 | [76; 100) '{ ... }': Gen<T> | |
1802 | [76; 100) '{ ... }': ! | ||
1803 | [86; 94) 'loop { }': ! | 1926 | [86; 94) 'loop { }': ! |
1804 | [91; 94) '{ }': () | 1927 | [91; 94) '{ }': () |
1805 | [114; 149) '{ ...e(); }': () | 1928 | [114; 149) '{ ...e(); }': () |
@@ -1830,8 +1953,7 @@ fn test() { | |||
1830 | } | 1953 | } |
1831 | "#), | 1954 | "#), |
1832 | @r###" | 1955 | @r###" |
1833 | 1956 | [102; 126) '{ ... }': Gen<u32, T> | |
1834 | [102; 126) '{ ... }': ! | ||
1835 | [112; 120) 'loop { }': ! | 1957 | [112; 120) 'loop { }': ! |
1836 | [117; 120) '{ }': () | 1958 | [117; 120) '{ }': () |
1837 | [140; 180) '{ ...e(); }': () | 1959 | [140; 180) '{ ...e(); }': () |
@@ -1973,7 +2095,6 @@ fn test() { | |||
1973 | } | 2095 | } |
1974 | "#), | 2096 | "#), |
1975 | @r###" | 2097 | @r###" |
1976 | |||
1977 | [11; 48) '{ ...&y]; }': () | 2098 | [11; 48) '{ ...&y]; }': () |
1978 | [21; 22) 'y': &{unknown} | 2099 | [21; 22) 'y': &{unknown} |
1979 | [25; 32) 'unknown': &{unknown} | 2100 | [25; 32) 'unknown': &{unknown} |
@@ -1998,14 +2119,13 @@ fn test() { | |||
1998 | } | 2119 | } |
1999 | "#), | 2120 | "#), |
2000 | @r###" | 2121 | @r###" |
2001 | |||
2002 | [11; 80) '{ ...x)]; }': () | 2122 | [11; 80) '{ ...x)]; }': () |
2003 | [21; 22) 'x': &&{unknown} | 2123 | [21; 22) 'x': &&{unknown} |
2004 | [25; 32) 'unknown': &&{unknown} | 2124 | [25; 32) 'unknown': &&{unknown} |
2005 | [42; 43) 'y': &&{unknown} | 2125 | [42; 43) 'y': &&{unknown} |
2006 | [46; 53) 'unknown': &&{unknown} | 2126 | [46; 53) 'unknown': &&{unknown} |
2007 | [59; 77) '[(x, y..., &x)]': [(&&{unknown}, &&{unknown});_] | 2127 | [59; 77) '[(x, y..., &x)]': [(&&&{unknown}, &&&{unknown});_] |
2008 | [60; 66) '(x, y)': (&&{unknown}, &&{unknown}) | 2128 | [60; 66) '(x, y)': (&&&{unknown}, &&&{unknown}) |
2009 | [61; 62) 'x': &&{unknown} | 2129 | [61; 62) 'x': &&{unknown} |
2010 | [64; 65) 'y': &&{unknown} | 2130 | [64; 65) 'y': &&{unknown} |
2011 | [68; 76) '(&y, &x)': (&&&{unknown}, &&&{unknown}) | 2131 | [68; 76) '(&y, &x)': (&&&{unknown}, &&&{unknown}) |
@@ -2026,7 +2146,7 @@ fn id<T>(x: T) -> T { | |||
2026 | } | 2146 | } |
2027 | 2147 | ||
2028 | fn clone<T>(x: &T) -> T { | 2148 | fn clone<T>(x: &T) -> T { |
2029 | x | 2149 | *x |
2030 | } | 2150 | } |
2031 | 2151 | ||
2032 | fn test() { | 2152 | fn test() { |
@@ -2037,26 +2157,26 @@ fn test() { | |||
2037 | } | 2157 | } |
2038 | "#), | 2158 | "#), |
2039 | @r###" | 2159 | @r###" |
2040 | |||
2041 | [10; 11) 'x': T | 2160 | [10; 11) 'x': T |
2042 | [21; 30) '{ x }': T | 2161 | [21; 30) '{ x }': T |
2043 | [27; 28) 'x': T | 2162 | [27; 28) 'x': T |
2044 | [44; 45) 'x': &T | 2163 | [44; 45) 'x': &T |
2045 | [56; 65) '{ x }': &T | 2164 | [56; 66) '{ *x }': T |
2046 | [62; 63) 'x': &T | 2165 | [62; 64) '*x': T |
2047 | [77; 157) '{ ...(1); }': () | 2166 | [63; 64) 'x': &T |
2048 | [87; 88) 'y': u32 | 2167 | [78; 158) '{ ...(1); }': () |
2049 | [91; 96) '10u32': u32 | 2168 | [88; 89) 'y': u32 |
2050 | [102; 104) 'id': fn id<u32>(T) -> T | 2169 | [92; 97) '10u32': u32 |
2051 | [102; 107) 'id(y)': u32 | 2170 | [103; 105) 'id': fn id<u32>(T) -> T |
2052 | [105; 106) 'y': u32 | 2171 | [103; 108) 'id(y)': u32 |
2053 | [117; 118) 'x': bool | 2172 | [106; 107) 'y': u32 |
2054 | [127; 132) 'clone': fn clone<bool>(&T) -> T | 2173 | [118; 119) 'x': bool |
2055 | [127; 135) 'clone(z)': bool | 2174 | [128; 133) 'clone': fn clone<bool>(&T) -> T |
2056 | [133; 134) 'z': &bool | 2175 | [128; 136) 'clone(z)': bool |
2057 | [141; 151) 'id::<i128>': fn id<i128>(T) -> T | 2176 | [134; 135) 'z': &bool |
2058 | [141; 154) 'id::<i128>(1)': i128 | 2177 | [142; 152) 'id::<i128>': fn id<i128>(T) -> T |
2059 | [152; 153) '1': i128 | 2178 | [142; 155) 'id::<i128>(1)': i128 |
2179 | [153; 154) '1': i128 | ||
2060 | "### | 2180 | "### |
2061 | ); | 2181 | ); |
2062 | } | 2182 | } |
@@ -2181,7 +2301,6 @@ fn extra_compiler_flags() { | |||
2181 | } | 2301 | } |
2182 | "#), | 2302 | "#), |
2183 | @r###" | 2303 | @r###" |
2184 | |||
2185 | [27; 323) '{ ... } }': () | 2304 | [27; 323) '{ ... } }': () |
2186 | [33; 321) 'for co... }': () | 2305 | [33; 321) 'for co... }': () |
2187 | [37; 44) 'content': &{unknown} | 2306 | [37; 44) 'content': &{unknown} |
@@ -2195,8 +2314,8 @@ fn extra_compiler_flags() { | |||
2195 | [135; 167) '{ ... }': &&{unknown} | 2314 | [135; 167) '{ ... }': &&{unknown} |
2196 | [149; 157) '&content': &&{unknown} | 2315 | [149; 157) '&content': &&{unknown} |
2197 | [150; 157) 'content': &{unknown} | 2316 | [150; 157) 'content': &{unknown} |
2198 | [182; 189) 'content': &&{unknown} | 2317 | [182; 189) 'content': &{unknown} |
2199 | [192; 314) 'if ICE... }': &&{unknown} | 2318 | [192; 314) 'if ICE... }': &{unknown} |
2200 | [195; 232) 'ICE_RE..._VALUE': {unknown} | 2319 | [195; 232) 'ICE_RE..._VALUE': {unknown} |
2201 | [195; 248) 'ICE_RE...&name)': bool | 2320 | [195; 248) 'ICE_RE...&name)': bool |
2202 | [242; 247) '&name': &&&{unknown} | 2321 | [242; 247) '&name': &&&{unknown} |
@@ -3282,7 +3401,7 @@ impl S { | |||
3282 | } | 3401 | } |
3283 | 3402 | ||
3284 | fn test(s: Arc<S>) { | 3403 | fn test(s: Arc<S>) { |
3285 | (*s, s.foo())<|> | 3404 | (*s, s.foo())<|>; |
3286 | } | 3405 | } |
3287 | "#, | 3406 | "#, |
3288 | ); | 3407 | ); |
@@ -3356,7 +3475,7 @@ trait Deref { | |||
3356 | } | 3475 | } |
3357 | 3476 | ||
3358 | struct Arc<T>; | 3477 | struct Arc<T>; |
3359 | impl<T: ?Sized> Deref for Arc<T> { | 3478 | impl<T> Deref for Arc<T> { |
3360 | type Target = T; | 3479 | type Target = T; |
3361 | } | 3480 | } |
3362 | 3481 | ||
@@ -3366,7 +3485,7 @@ impl S { | |||
3366 | } | 3485 | } |
3367 | 3486 | ||
3368 | fn test(s: Arc<S>) { | 3487 | fn test(s: Arc<S>) { |
3369 | (*s, s.foo())<|> | 3488 | (*s, s.foo())<|>; |
3370 | } | 3489 | } |
3371 | "#, | 3490 | "#, |
3372 | ); | 3491 | ); |
@@ -4406,121 +4525,3 @@ fn no_such_field_diagnostics() { | |||
4406 | "### | 4525 | "### |
4407 | ); | 4526 | ); |
4408 | } | 4527 | } |
4409 | |||
4410 | mod branching_with_never_tests { | ||
4411 | use super::type_at; | ||
4412 | |||
4413 | #[test] | ||
4414 | fn if_never() { | ||
4415 | let t = type_at( | ||
4416 | r#" | ||
4417 | //- /main.rs | ||
4418 | fn test() { | ||
4419 | let i = if true { | ||
4420 | loop {} | ||
4421 | } else { | ||
4422 | 3.0 | ||
4423 | }; | ||
4424 | i<|> | ||
4425 | () | ||
4426 | } | ||
4427 | "#, | ||
4428 | ); | ||
4429 | assert_eq!(t, "f64"); | ||
4430 | } | ||
4431 | |||
4432 | #[test] | ||
4433 | fn if_else_never() { | ||
4434 | let t = type_at( | ||
4435 | r#" | ||
4436 | //- /main.rs | ||
4437 | fn test(input: bool) { | ||
4438 | let i = if input { | ||
4439 | 2.0 | ||
4440 | } else { | ||
4441 | return | ||
4442 | }; | ||
4443 | i<|> | ||
4444 | () | ||
4445 | } | ||
4446 | "#, | ||
4447 | ); | ||
4448 | assert_eq!(t, "f64"); | ||
4449 | } | ||
4450 | |||
4451 | #[test] | ||
4452 | fn match_first_arm_never() { | ||
4453 | let t = type_at( | ||
4454 | r#" | ||
4455 | //- /main.rs | ||
4456 | fn test(a: i32) { | ||
4457 | let i = match a { | ||
4458 | 1 => return, | ||
4459 | 2 => 2.0, | ||
4460 | 3 => loop {}, | ||
4461 | _ => 3.0, | ||
4462 | }; | ||
4463 | i<|> | ||
4464 | () | ||
4465 | } | ||
4466 | "#, | ||
4467 | ); | ||
4468 | assert_eq!(t, "f64"); | ||
4469 | } | ||
4470 | |||
4471 | #[test] | ||
4472 | fn match_second_arm_never() { | ||
4473 | let t = type_at( | ||
4474 | r#" | ||
4475 | //- /main.rs | ||
4476 | fn test(a: i32) { | ||
4477 | let i = match a { | ||
4478 | 1 => 3.0, | ||
4479 | 2 => loop {}, | ||
4480 | 3 => 3.0, | ||
4481 | _ => return, | ||
4482 | }; | ||
4483 | i<|> | ||
4484 | () | ||
4485 | } | ||
4486 | "#, | ||
4487 | ); | ||
4488 | assert_eq!(t, "f64"); | ||
4489 | } | ||
4490 | |||
4491 | #[test] | ||
4492 | fn match_all_arms_never() { | ||
4493 | let t = type_at( | ||
4494 | r#" | ||
4495 | //- /main.rs | ||
4496 | fn test(a: i32) { | ||
4497 | let i = match a { | ||
4498 | 2 => return, | ||
4499 | _ => loop {}, | ||
4500 | }; | ||
4501 | i<|> | ||
4502 | () | ||
4503 | } | ||
4504 | "#, | ||
4505 | ); | ||
4506 | assert_eq!(t, "!"); | ||
4507 | } | ||
4508 | |||
4509 | #[test] | ||
4510 | fn match_no_never_arms() { | ||
4511 | let t = type_at( | ||
4512 | r#" | ||
4513 | //- /main.rs | ||
4514 | fn test(a: i32) { | ||
4515 | let i = match a { | ||
4516 | 2 => 2.0, | ||
4517 | _ => 3.0, | ||
4518 | }; | ||
4519 | i<|> | ||
4520 | () | ||
4521 | } | ||
4522 | "#, | ||
4523 | ); | ||
4524 | assert_eq!(t, "f64"); | ||
4525 | } | ||
4526 | } | ||