mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Fix various IDE features
As a side benefit, we got `let` guard support for `move_guard` for free.
This commit is contained in:
parent
fe1e324694
commit
13ac5c3491
15 changed files with 95 additions and 93 deletions
|
@ -18,7 +18,7 @@ use syntax::{
|
|||
algo, ast,
|
||||
display::{fn_as_proc_macro_label, macro_label},
|
||||
match_ast, AstNode, Direction,
|
||||
SyntaxKind::{CONDITION, LET_STMT},
|
||||
SyntaxKind::{LET_EXPR, LET_STMT},
|
||||
SyntaxToken, T,
|
||||
};
|
||||
|
||||
|
@ -484,7 +484,7 @@ fn local(db: &RootDatabase, it: hir::Local) -> Option<Markup> {
|
|||
let let_kw = if ident
|
||||
.syntax()
|
||||
.parent()
|
||||
.map_or(false, |p| p.kind() == LET_STMT || p.kind() == CONDITION)
|
||||
.map_or(false, |p| p.kind() == LET_STMT || p.kind() == LET_EXPR)
|
||||
{
|
||||
"let "
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue