Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/completions/postfix.rs')
| -rw-r--r-- | crates/ide-completion/src/completions/postfix.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/crates/ide-completion/src/completions/postfix.rs b/crates/ide-completion/src/completions/postfix.rs index 7b57eea052..67ea05e002 100644 --- a/crates/ide-completion/src/completions/postfix.rs +++ b/crates/ide-completion/src/completions/postfix.rs @@ -303,7 +303,7 @@ fn include_references(initial_element: &ast::Expr) -> (ast::Expr, ast::Expr) { resulting_element = ast::Expr::from(parent_deref_element); - new_element_opt = make::expr_prefix(syntax::T![*], new_element_opt); + new_element_opt = make::expr_prefix(syntax::T![*], new_element_opt).into(); } if let Some(first_ref_expr) = resulting_element.syntax().parent().and_then(ast::RefExpr::cast) { @@ -401,18 +401,13 @@ fn add_custom_postfix_completions( #[cfg(test)] mod tests { - use expect_test::{expect, Expect}; + use expect_test::expect; use crate::{ - tests::{check_edit, check_edit_with_config, completion_list, TEST_CONFIG}, + tests::{check, check_edit, check_edit_with_config, TEST_CONFIG}, CompletionConfig, Snippet, }; - fn check(ra_fixture: &str, expect: Expect) { - let actual = completion_list(ra_fixture); - expect.assert_eq(&actual) - } - #[test] fn postfix_completion_works_for_trivial_path_expression() { check( |