wip lower impl trait to type args

This commit is contained in:
Florian Diebold 2020-01-24 19:35:09 +01:00
parent 9dec65d3b1
commit 93aa166748
8 changed files with 97 additions and 14 deletions

View file

@ -127,7 +127,8 @@ impl Generics {
self.find_param(param).0
}
pub(crate) fn param_name(&self, param: TypeParamId) -> Name {
self.find_param(param).1.name.clone()
// FIXME make this return Option
self.find_param(param).1.name.clone().unwrap_or_else(Name::missing)
}
fn find_param(&self, param: TypeParamId) -> (u32, &TypeParamData) {
if param.parent == self.def {