mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Add field for text edits to InlayHint
This commit is contained in:
parent
ac03de773f
commit
fcbc250723
12 changed files with 54 additions and 7 deletions
|
@ -49,7 +49,12 @@ pub(super) fn hints(
|
|||
(true, false) => "&",
|
||||
_ => return,
|
||||
};
|
||||
acc.push(InlayHint { range, kind: InlayKind::BindingMode, label: r.to_string().into() });
|
||||
acc.push(InlayHint {
|
||||
range,
|
||||
kind: InlayKind::BindingMode,
|
||||
label: r.to_string().into(),
|
||||
text_edit: None,
|
||||
});
|
||||
});
|
||||
match pat {
|
||||
ast::Pat::IdentPat(pat) if pat.ref_token().is_none() && pat.mut_token().is_none() => {
|
||||
|
@ -63,6 +68,7 @@ pub(super) fn hints(
|
|||
range: pat.syntax().text_range(),
|
||||
kind: InlayKind::BindingMode,
|
||||
label: bm.to_string().into(),
|
||||
text_edit: None,
|
||||
});
|
||||
}
|
||||
ast::Pat::OrPat(pat) if !pattern_adjustments.is_empty() && outer_paren_pat.is_none() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue