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

@@ -368,7 +368,7 @@ impl Substs {
/// Return Substs that replace each parameter by itself (i.e. `Ty::Param`).
pub(crate) fn identity(generic_params: &Generics) -> Substs {
Substs(
generic_params.iter().map(|(idx, p)| Ty::Param { idx, name: p.name.clone() }).collect(),
generic_params.iter().map(|(idx, p)| Ty::Param { idx, name: p.name.clone().unwrap_or_else(Name::missing) }).collect(),
)
}