Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/tests/record.rs')
| -rw-r--r-- | crates/ide-completion/src/tests/record.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/ide-completion/src/tests/record.rs b/crates/ide-completion/src/tests/record.rs index a1013b8654..d9be6556fa 100644 --- a/crates/ide-completion/src/tests/record.rs +++ b/crates/ide-completion/src/tests/record.rs @@ -264,6 +264,29 @@ fn main() { } #[test] +fn functional_update_exist_update() { + check( + r#" +//- minicore:default +struct Foo { foo1: u32, foo2: u32 } +impl Default for Foo { + fn default() -> Self { loop {} } +} + +fn main() { + let thing = 1; + let foo = Foo { foo1: 0, foo2: 0 }; + let foo2 = Foo { thing, $0 ..Default::default() } +} +"#, + expect![[r#" + fd foo1 u32 + fd foo2 u32 + "#]], + ); +} + +#[test] fn empty_union_literal() { check( r#" |