diff options
author | cynecx <[email protected]> | 2021-03-20 16:12:49 +0000 |
---|---|---|
committer | cynecx <[email protected]> | 2021-03-20 16:12:49 +0000 |
commit | 15e4aae82329e5c53e488c54fb0561bb289f5c21 (patch) | |
tree | b68452683b1f68d6f5ae1039e4e0af793ac13e66 /crates/hir_ty/src/tests | |
parent | 5cc8ad0c4afda0c8b6222156b0c725cfb61892c0 (diff) |
hir_ty: fix tests by making required methods public
Diffstat (limited to 'crates/hir_ty/src/tests')
-rw-r--r-- | crates/hir_ty/src/tests/macros.rs | 4 | ||||
-rw-r--r-- | 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; | |||
31 | 31 | ||
32 | #[cfg(not(test))] | 32 | #[cfg(not(test))] |
33 | impl S { | 33 | impl S { |
34 | fn foo3(&self) -> i32 { 0 } | 34 | pub fn foo3(&self) -> i32 { 0 } |
35 | } | 35 | } |
36 | 36 | ||
37 | #[cfg(test)] | 37 | #[cfg(test)] |
38 | impl S { | 38 | impl S { |
39 | fn foo4(&self) -> i32 { 0 } | 39 | pub fn foo4(&self) -> i32 { 0 } |
40 | } | 40 | } |
41 | "#, | 41 | "#, |
42 | ); | 42 | ); |
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 { | |||
187 | mod collections { | 187 | mod collections { |
188 | struct Vec<T> {} | 188 | struct Vec<T> {} |
189 | impl<T> Vec<T> { | 189 | impl<T> Vec<T> { |
190 | fn new() -> Self { Vec {} } | 190 | pub fn new() -> Self { Vec {} } |
191 | fn push(&mut self, t: T) { } | 191 | pub fn push(&mut self, t: T) { } |
192 | } | 192 | } |
193 | 193 | ||
194 | impl<T> IntoIterator for Vec<T> { | 194 | impl<T> IntoIterator for Vec<T> { |