feat: Allow reborrow inlay hints to be restricted to mutable reborrows only

This commit is contained in:
Lukas Wirth 2022-05-12 13:39:32 +02:00
parent 4b505ce0f9
commit c2190ad87c
6 changed files with 76 additions and 27 deletions

View file

@ -12,12 +12,10 @@ use ide_db::{
use syntax::{AstNode, SyntaxKind::*, SyntaxToken, TextRange, T};
use crate::{
hover::hover_for_definition, Analysis, Fold, HoverConfig, HoverDocFormat, HoverResult,
InlayHint, InlayHintsConfig, TryToNav,
};
use crate::{
hover::hover_for_definition,
moniker::{crate_for_file, def_to_moniker, MonikerResult},
LifetimeElisionHints,
Analysis, Fold, HoverConfig, HoverDocFormat, HoverResult, InlayHint, InlayHintsConfig,
TryToNav,
};
/// A static representation of fully analyzed source code.
@ -112,8 +110,8 @@ impl StaticIndex<'_> {
parameter_hints: true,
chaining_hints: true,
closure_return_type_hints: true,
lifetime_elision_hints: LifetimeElisionHints::Never,
reborrow_hints: false,
lifetime_elision_hints: crate::LifetimeElisionHints::Never,
reborrow_hints: crate::ReborrowHints::Never,
hide_named_constructor_hints: false,
param_names_for_lifetime_elision_hints: false,
max_length: Some(25),