mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01: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},
|
ast::{self, AstNode},
|
||||||
SyntaxKind,
|
SyntaxKind,
|
||||||
};
|
};
|
||||||
|
use text_edit::TextEdit;
|
||||||
|
|
||||||
use crate::{InlayHint, InlayHintPosition, InlayHintsConfig, InlayKind, LifetimeElisionHints};
|
use crate::{InlayHint, InlayHintPosition, InlayHintsConfig, InlayKind, LifetimeElisionHints};
|
||||||
|
|
||||||
|
@ -38,7 +39,7 @@ pub(super) fn hints(
|
||||||
range: t.text_range(),
|
range: t.text_range(),
|
||||||
kind: InlayKind::Lifetime,
|
kind: InlayKind::Lifetime,
|
||||||
label: "'static".into(),
|
label: "'static".into(),
|
||||||
text_edit: None,
|
text_edit: Some(TextEdit::insert(t.text_range().start(), "'static ".into())),
|
||||||
position: InlayHintPosition::After,
|
position: InlayHintPosition::After,
|
||||||
pad_left: false,
|
pad_left: false,
|
||||||
pad_right: true,
|
pad_right: true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue