Provide resolve data only when it can actually be resolved

This commit is contained in:
Kirill Bulatov 2023-09-02 21:33:44 +03:00
parent caf018507a
commit 7b3dba5d77
13 changed files with 82 additions and 35 deletions

View file

@ -31,9 +31,10 @@ pub(super) fn hints(
if ty.lifetime().is_none() {
let t = ty.amp_token()?;
acc.push(InlayHint {
needs_resolve: false,
range: t.text_range(),
kind: InlayKind::Lifetime,
label: "'static".to_owned().into(),
label: "'static".into(),
text_edit: None,
position: InlayHintPosition::After,
pad_left: false,