From: zhoufan <1247714429@qq.com> Date: Tue, 14 Dec 2021 07:57:58 +0000 (+0800) Subject: fixes broken tests X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=c3ad945d9b820c3e31177dc394bf35383d57b468;p=rust.git fixes broken tests --- diff --git a/crates/hir_ty/src/tests/method_resolution.rs b/crates/hir_ty/src/tests/method_resolution.rs index 11bdfa85a9f..9c0c00da3b1 100644 --- a/crates/hir_ty/src/tests/method_resolution.rs +++ b/crates/hir_ty/src/tests/method_resolution.rs @@ -308,7 +308,7 @@ fn test() { pub mod foo { pub struct S; impl S { - fn thing() -> i128 { 0 } + pub fn thing() -> i128 { 0 } } } "#, diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs index f1d7d2791d8..28dd2afa02a 100644 --- a/crates/ide/src/hover/tests.rs +++ b/crates/ide/src/hover/tests.rs @@ -823,10 +823,10 @@ fn test_hover_infer_associated_method_exact() { check( r#" mod wrapper { - struct Thing { x: u32 } + pub struct Thing { x: u32 } impl Thing { - fn new() -> Thing { Thing { x: 0 } } + pub fn new() -> Thing { Thing { x: 0 } } } } @@ -840,9 +840,9 @@ fn new() -> Thing { Thing { x: 0 } } ``` ```rust - fn new() -> Thing + pub fn new() -> Thing ``` - "#]], + "#]], ) }