mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Correctly fill default type parameters
This commit is contained in:
parent
88d3959c33
commit
00f3b6c59a
6 changed files with 80 additions and 1 deletions
|
@ -989,6 +989,11 @@ impl TypeParam {
|
|||
ty: InEnvironment { value: ty, environment },
|
||||
}
|
||||
}
|
||||
|
||||
pub fn default(self, db: &dyn HirDatabase) -> Option<TypeRef> {
|
||||
let params = db.generic_params(self.id.parent);
|
||||
params.types[self.id.local_id].default.clone()
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: rename from `ImplDef` to `Impl`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue