mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 21:13:37 +00:00
Add text edit to implicit 'static hints
This commit is contained in:
parent
bfaad1431b
commit
47d2359afa
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ use syntax::{
|
|||
ast::{self, AstNode},
|
||||
SyntaxKind,
|
||||
};
|
||||
use text_edit::TextEdit;
|
||||
|
||||
use crate::{InlayHint, InlayHintPosition, InlayHintsConfig, InlayKind, LifetimeElisionHints};
|
||||
|
||||
|
@ -38,7 +39,7 @@ pub(super) fn hints(
|
|||
range: t.text_range(),
|
||||
kind: InlayKind::Lifetime,
|
||||
label: "'static".into(),
|
||||
text_edit: None,
|
||||
text_edit: Some(TextEdit::insert(t.text_range().start(), "'static ".into())),
|
||||
position: InlayHintPosition::After,
|
||||
pad_left: false,
|
||||
pad_right: true,
|
||||
|
|
Loading…
Reference in a new issue