We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3f76561 + 6c75b7e commit 9328757Copy full SHA for 9328757
crates/ide-completion/src/completions/expr.rs
@@ -352,7 +352,10 @@ pub(crate) fn complete_expr_path(
352
353
if !in_block_expr {
354
add_keyword("unsafe", "unsafe {\n $0\n}");
355
- add_keyword("const", "const {\n $0\n}");
+ if !wants_const_token {
356
+ // Avoid having two `const` items in `&raw $0`
357
+ add_keyword("const", "const {\n $0\n}");
358
+ }
359
}
360
add_keyword("match", "match $1 {\n $0\n}");
361
add_keyword("while", "while $1 {\n $0\n}");
crates/ide-completion/src/tests/expression.rs
@@ -628,7 +628,6 @@ fn completes_after_ref_expr() {
628
fn main() fn()
629
bt u32 u32
630
kw const
631
- kw const
632
kw crate::
633
kw false
634
kw for
0 commit comments