]> git.lizzy.rs Git - rust.git/commitdiff
fixes broken tests
authorzhoufan <1247714429@qq.com>
Tue, 14 Dec 2021 07:57:58 +0000 (15:57 +0800)
committerzhoufan <1247714429@qq.com>
Tue, 14 Dec 2021 07:57:58 +0000 (15:57 +0800)
crates/hir_ty/src/tests/method_resolution.rs
crates/ide/src/hover/tests.rs

index 11bdfa85a9f2746eba7d31c3f5340e385653205c..9c0c00da3b1d2ecf8ae69930aa70ab7eedbac620 100644 (file)
@@ -308,7 +308,7 @@ fn test() {
 pub mod foo {
     pub struct S;
     impl S {
-        fn thing() -> i128 { 0 }
+        pub fn thing() -> i128 { 0 }
     }
 }
 "#,
index f1d7d2791d8ecf402cf14315c89bf61f08dde61c..28dd2afa02a381203848670912ac7fad22d87efa 100644 (file)
@@ -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
                 ```
-            "#]],
+        "#]],
     )
 }