mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Improve inlay hinting for types
Add hints for types in for loop expressions. Resolve types for every tuple parameter. Refactor the code.
This commit is contained in:
parent
4647e89def
commit
5169a9d498
3 changed files with 130 additions and 66 deletions
|
@ -897,6 +897,9 @@ pub fn handle_inlay_hints(
|
|||
kind: match api_type.kind {
|
||||
ra_ide_api::InlayKind::LetBindingType => InlayKind::LetBindingType,
|
||||
ra_ide_api::InlayKind::ClosureParameterType => InlayKind::ClosureParameterType,
|
||||
ra_ide_api::InlayKind::ForExpressionBindingType => {
|
||||
InlayKind::ForExpressionBindingType
|
||||
}
|
||||
},
|
||||
})
|
||||
.collect())
|
||||
|
|
|
@ -215,6 +215,7 @@ pub struct InlayHintsParams {
|
|||
pub enum InlayKind {
|
||||
LetBindingType,
|
||||
ClosureParameterType,
|
||||
ForExpressionBindingType,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue