Skip to content

Commit 7cd6fa3

Browse files
committed
[ty] display variance on hover over type variables
1 parent d2a6ef7 commit 7cd6fa3

File tree

6 files changed

+563
-46
lines changed

6 files changed

+563
-46
lines changed

crates/ty_ide/src/goto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,13 @@ impl GotoTarget<'_> {
284284
// When asking the type of a callable, usually you want the callable itself?
285285
// (i.e. the type of `MyClass` in `MyClass()` is `<class MyClass>` and not `() -> MyClass`)
286286
GotoTarget::Call { callable, .. } => callable.inferred_type(model),
287+
GotoTarget::TypeParamTypeVarName(typevar) => typevar.inferred_type(model),
287288
// TODO: Support identifier targets
288289
GotoTarget::PatternMatchRest(_)
289290
| GotoTarget::PatternKeywordArgument(_)
290291
| GotoTarget::PatternMatchStarName(_)
291292
| GotoTarget::PatternMatchAsName(_)
292293
| GotoTarget::ImportModuleComponent { .. }
293-
| GotoTarget::TypeParamTypeVarName(_)
294294
| GotoTarget::TypeParamParamSpecName(_)
295295
| GotoTarget::TypeParamTypeVarTupleName(_)
296296
| GotoTarget::NonLocal { .. }

0 commit comments

Comments
 (0)