Skip to content

Commit 47d2359

Browse files
committed
Add text edit to implicit 'static hints
1 parent bfaad14 commit 47d2359

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/ide/src/inlay_hints/implicit_static.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use syntax::{
99
ast::{self, AstNode},
1010
SyntaxKind,
1111
};
12+
use text_edit::TextEdit;
1213

1314
use crate::{InlayHint, InlayHintPosition, InlayHintsConfig, InlayKind, LifetimeElisionHints};
1415

@@ -38,7 +39,7 @@ pub(super) fn hints(
3839
range: t.text_range(),
3940
kind: InlayKind::Lifetime,
4041
label: "'static".into(),
41-
text_edit: None,
42+
text_edit: Some(TextEdit::insert(t.text_range().start(), "'static ".into())),
4243
position: InlayHintPosition::After,
4344
pad_left: false,
4445
pad_right: true,

0 commit comments

Comments
 (0)