Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/hir_def/src/type_ref.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/hir_def/src/type_ref.rs b/crates/hir_def/src/type_ref.rs
index 05d139219c..ee8ef6caa3 100644
--- a/crates/hir_def/src/type_ref.rs
+++ b/crates/hir_def/src/type_ref.rs
@@ -192,10 +192,9 @@ impl TypeRef {
}
pl.params()
- .map(|p| (p.pat(), p.ty()))
.map(|it| {
- let type_ref = TypeRef::from_ast_opt(ctx, it.1);
- let name = match it.0 {
+ let type_ref = TypeRef::from_ast_opt(ctx, it.ty());
+ let name = match it.pat() {
Some(ast::Pat::IdentPat(it)) => Some(
it.name().map(|nr| nr.as_name()).unwrap_or_else(Name::missing),
),