Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/context/tests.rs')
-rw-r--r--crates/ide-completion/src/context/tests.rs15
1 files changed, 13 insertions, 2 deletions
diff --git a/crates/ide-completion/src/context/tests.rs b/crates/ide-completion/src/context/tests.rs
index a03f632cdf..75c20968e1 100644
--- a/crates/ide-completion/src/context/tests.rs
+++ b/crates/ide-completion/src/context/tests.rs
@@ -1,9 +1,9 @@
-use expect_test::{expect, Expect};
+use expect_test::{Expect, expect};
use hir::HirDisplay;
use crate::{
context::CompletionContext,
- tests::{position, TEST_CONFIG},
+ tests::{TEST_CONFIG, position},
};
fn check_expected_type_and_name(#[rust_analyzer::rust_fixture] ra_fixture: &str, expect: Expect) {
@@ -371,6 +371,17 @@ fn foo() {
"#,
expect![[r#"ty: Foo, name: ?"#]],
);
+ check_expected_type_and_name(
+ r#"
+struct Foo { field: u32 }
+fn foo() {
+ Foo {
+ ..self::$0
+ }
+}
+"#,
+ expect!["ty: ?, name: ?"],
+ );
}
#[test]