From b8e09b7f4e2ae868a5877c39216a2eadb1b42824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Mon, 20 Jul 2020 22:01:09 +0300 Subject: Inline lang items in coercion tests --- crates/ra_hir_ty/src/tests.rs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'crates/ra_hir_ty/src/tests.rs') 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() { } } -// Infer with some common definitions and impls. fn check_infer(ra_fixture: &str, expect: Expect) { - let defs = r#" - #[lang = "sized"] - pub trait Sized {} - #[lang = "unsize"] - pub trait Unsize {} - #[lang = "coerce_unsized"] - pub trait CoerceUnsized {} - - impl<'a, 'b: 'a, T: ?Sized + Unsize, U: ?Sized> CoerceUnsized<&'a U> for &'b T {} - impl, U: ?Sized> CoerceUnsized<*mut U> for *mut T {} - "#; - - // Append to the end to keep positions unchanged. - let mut actual = infer(&format!("{}{}", ra_fixture, defs)); + let mut actual = infer(ra_fixture); actual.push('\n'); expect.assert_eq(&actual); } -- cgit v1.2.3