diff options
Diffstat (limited to 'crates/ra_hir_ty/src/tests.rs')
-rw-r--r-- | crates/ra_hir_ty/src/tests.rs | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/crates/ra_hir_ty/src/tests.rs b/crates/ra_hir_ty/src/tests.rs index 5eaf25a77..59a21092e 100644 --- a/crates/ra_hir_ty/src/tests.rs +++ b/crates/ra_hir_ty/src/tests.rs | |||
@@ -346,22 +346,8 @@ fn typing_whitespace_inside_a_function_should_not_invalidate_types() { | |||
346 | } | 346 | } |
347 | } | 347 | } |
348 | 348 | ||
349 | // Infer with some common definitions and impls. | ||
350 | fn check_infer(ra_fixture: &str, expect: Expect) { | 349 | fn check_infer(ra_fixture: &str, expect: Expect) { |
351 | let defs = r#" | 350 | let mut actual = infer(ra_fixture); |
352 | #[lang = "sized"] | ||
353 | pub trait Sized {} | ||
354 | #[lang = "unsize"] | ||
355 | pub trait Unsize<T: ?Sized> {} | ||
356 | #[lang = "coerce_unsized"] | ||
357 | pub trait CoerceUnsized<T> {} | ||
358 | |||
359 | impl<'a, 'b: 'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<&'a U> for &'b T {} | ||
360 | impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for *mut T {} | ||
361 | "#; | ||
362 | |||
363 | // Append to the end to keep positions unchanged. | ||
364 | let mut actual = infer(&format!("{}{}", ra_fixture, defs)); | ||
365 | actual.push('\n'); | 351 | actual.push('\n'); |
366 | expect.assert_eq(&actual); | 352 | expect.assert_eq(&actual); |
367 | } | 353 | } |