From 15e4aae82329e5c53e488c54fb0561bb289f5c21 Mon Sep 17 00:00:00 2001 From: cynecx Date: Sat, 20 Mar 2021 17:12:49 +0100 Subject: hir_ty: fix tests by making required methods public --- crates/hir_ty/src/tests/macros.rs | 4 ++-- crates/hir_ty/src/tests/traits.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/hir_ty/src/tests/macros.rs b/crates/hir_ty/src/tests/macros.rs index c1e605740..88ba9b118 100644 --- a/crates/hir_ty/src/tests/macros.rs +++ b/crates/hir_ty/src/tests/macros.rs @@ -31,12 +31,12 @@ struct S; #[cfg(not(test))] impl S { - fn foo3(&self) -> i32 { 0 } + pub fn foo3(&self) -> i32 { 0 } } #[cfg(test)] impl S { - fn foo4(&self) -> i32 { 0 } + pub fn foo4(&self) -> i32 { 0 } } "#, ); diff --git a/crates/hir_ty/src/tests/traits.rs b/crates/hir_ty/src/tests/traits.rs index 8f2bdffc0..f7ee6def6 100644 --- a/crates/hir_ty/src/tests/traits.rs +++ b/crates/hir_ty/src/tests/traits.rs @@ -187,8 +187,8 @@ mod iter { mod collections { struct Vec {} impl Vec { - fn new() -> Self { Vec {} } - fn push(&mut self, t: T) { } + pub fn new() -> Self { Vec {} } + pub fn push(&mut self, t: T) { } } impl IntoIterator for Vec { -- cgit v1.2.3