diff options
Diffstat (limited to 'crates/ra_hir_ty/src/tests/method_resolution.rs')
-rw-r--r-- | crates/ra_hir_ty/src/tests/method_resolution.rs | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/crates/ra_hir_ty/src/tests/method_resolution.rs b/crates/ra_hir_ty/src/tests/method_resolution.rs index 558a70022..804297315 100644 --- a/crates/ra_hir_ty/src/tests/method_resolution.rs +++ b/crates/ra_hir_ty/src/tests/method_resolution.rs | |||
@@ -184,60 +184,6 @@ fn test() { | |||
184 | } | 184 | } |
185 | 185 | ||
186 | #[test] | 186 | #[test] |
187 | fn infer_associated_method_generics_with_default_param() { | ||
188 | assert_snapshot!( | ||
189 | infer(r#" | ||
190 | struct Gen<T=u32> { | ||
191 | val: T | ||
192 | } | ||
193 | |||
194 | impl<T> Gen<T> { | ||
195 | pub fn make() -> Gen<T> { | ||
196 | loop { } | ||
197 | } | ||
198 | } | ||
199 | |||
200 | fn test() { | ||
201 | let a = Gen::make(); | ||
202 | } | ||
203 | "#), | ||
204 | @r###" | ||
205 | 80..104 '{ ... }': Gen<T> | ||
206 | 90..98 'loop { }': ! | ||
207 | 95..98 '{ }': () | ||
208 | 118..146 '{ ...e(); }': () | ||
209 | 128..129 'a': Gen<u32> | ||
210 | 132..141 'Gen::make': fn make<u32>() -> Gen<u32> | ||
211 | 132..143 'Gen::make()': Gen<u32> | ||
212 | "### | ||
213 | ); | ||
214 | } | ||
215 | |||
216 | #[test] | ||
217 | fn infer_associated_method_generics_with_default_tuple_param() { | ||
218 | let t = type_at( | ||
219 | r#" | ||
220 | //- /main.rs | ||
221 | struct Gen<T=()> { | ||
222 | val: T | ||
223 | } | ||
224 | |||
225 | impl<T> Gen<T> { | ||
226 | pub fn make() -> Gen<T> { | ||
227 | loop { } | ||
228 | } | ||
229 | } | ||
230 | |||
231 | fn test() { | ||
232 | let a = Gen::make(); | ||
233 | a.val<|>; | ||
234 | } | ||
235 | "#, | ||
236 | ); | ||
237 | assert_eq!(t, "()"); | ||
238 | } | ||
239 | |||
240 | #[test] | ||
241 | fn infer_associated_method_generics_without_args() { | 187 | fn infer_associated_method_generics_without_args() { |
242 | assert_snapshot!( | 188 | assert_snapshot!( |
243 | infer(r#" | 189 | infer(r#" |