Properly use location links for type hints of impl Future and its assoc type

This commit is contained in:
Lukas Wirth 2023-02-07 22:42:03 +01:00
parent 0b32b65ca6
commit 2b4a5374ee
4 changed files with 106 additions and 12 deletions

View file

@ -330,7 +330,20 @@ fn main(a: SliceIter<'_, Container>) {
),
tooltip: "",
},
"<Item = impl ",
"<",
InlayHintLabelPart {
text: "Item",
linked_location: Some(
FileRange {
file_id: FileId(
1,
),
range: 2643..2647,
},
),
tooltip: "",
},
" = impl ",
InlayHintLabelPart {
text: "Iterator",
linked_location: Some(
@ -343,7 +356,20 @@ fn main(a: SliceIter<'_, Container>) {
),
tooltip: "",
},
"<Item = &&str>>",
"<",
InlayHintLabelPart {
text: "Item",
linked_location: Some(
FileRange {
file_id: FileId(
1,
),
range: 2643..2647,
},
),
tooltip: "",
},
" = &&str>>",
],
},
InlayHint {

View file

@ -440,7 +440,20 @@ fn main() {
),
tooltip: "",
},
"<Item = ()>",
"<",
InlayHintLabelPart {
text: "Item",
linked_location: Some(
FileRange {
file_id: FileId(
1,
),
range: 2643..2647,
},
),
tooltip: "",
},
" = ()>",
],
},
InlayHint {
@ -460,7 +473,20 @@ fn main() {
),
tooltip: "",
},
"<Item = ()>",
"<",
InlayHintLabelPart {
text: "Item",
linked_location: Some(
FileRange {
file_id: FileId(
1,
),
range: 2643..2647,
},
),
tooltip: "",
},
" = ()>",
],
},
InlayHint {
@ -480,7 +506,20 @@ fn main() {
),
tooltip: "",
},
"<Item = ()>",
"<",
InlayHintLabelPart {
text: "Item",
linked_location: Some(
FileRange {
file_id: FileId(
1,
),
range: 2643..2647,
},
),
tooltip: "",
},
" = ()>",
],
},
InlayHint {