Adapt for removal of old interfaces in libsyntax

9108fb7bae
dropped the `map()` method (among other things) -- so we need to adapt
our code.

This change should be backwards-compatible.
This commit is contained in:
Olaf Buddenhagen 2016-05-02 07:08:43 +02:00
parent a959073a81
commit 0ff91e4451

View File

@ -12,11 +12,11 @@ use syntax::visit;
// allowed here".
pub fn without_defaults(generics: &ast::Generics) -> ast::Generics {
ast::Generics {
ty_params: generics.ty_params.map(|ty_param| {
ty_params: generics.ty_params.iter().map(|ty_param| {
ast::TyParam {
default: None,
.. ty_param.clone()
}}),
}}).collect(),
.. generics.clone()
}
}