mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Provide resolve data only when it can actually be resolved
This commit is contained in:
parent
caf018507a
commit
7b3dba5d77
13 changed files with 82 additions and 35 deletions
|
@ -50,9 +50,10 @@ pub(super) fn hints(
|
|||
_ => return,
|
||||
};
|
||||
acc.push(InlayHint {
|
||||
needs_resolve: false,
|
||||
range,
|
||||
kind: InlayKind::BindingMode,
|
||||
label: r.to_string().into(),
|
||||
label: r.into(),
|
||||
text_edit: None,
|
||||
position: InlayHintPosition::Before,
|
||||
pad_left: false,
|
||||
|
@ -68,9 +69,10 @@ pub(super) fn hints(
|
|||
hir::BindingMode::Ref(Mutability::Shared) => "ref",
|
||||
};
|
||||
acc.push(InlayHint {
|
||||
needs_resolve: false,
|
||||
range: pat.syntax().text_range(),
|
||||
kind: InlayKind::BindingMode,
|
||||
label: bm.to_string().into(),
|
||||
label: bm.into(),
|
||||
text_edit: None,
|
||||
position: InlayHintPosition::Before,
|
||||
pad_left: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue