1
Fork 0

Generalise more cases of explicit iteration of specific kinds

This commit is contained in:
varkor 2018-04-13 23:12:14 +01:00
parent 4a6c946368
commit b75f421ee9
23 changed files with 110 additions and 71 deletions

View file

@ -1800,7 +1800,7 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics,
// Bounds in the type_params and lifetimes fields are repeated in the
// predicates field (see rustc_typeck::collect::ty_generics), so remove
// them.
let stripped_typarams = gens.types().filter_map(|tp| {
let stripped_typarams = gens.types_depr().filter_map(|tp| {
if tp.name == keywords::SelfType.name().as_str() {
assert_eq!(tp.index, 0);
None
@ -1849,7 +1849,7 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics,
// and instead see `where T: Foo + Bar + Sized + 'a`
Generics {
params: gens.lifetimes()
params: gens.lifetimes_depr()
.into_iter()
.map(|lp| GenericParamDef::Lifetime(lp.clean(cx)))
.chain(