diff options
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/auto_encode.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/ast_builder.rs | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/libsyntax/ext/auto_encode.rs b/src/libsyntax/ext/auto_encode.rs index 5f076136271..b00fa9d0a19 100644 --- a/src/libsyntax/ext/auto_encode.rs +++ b/src/libsyntax/ext/auto_encode.rs @@ -460,8 +460,8 @@ fn mk_impl( let ty = cx.ty_path( span, ~[ident], - generics.ty_params.map( - |tp| cx.ty_path(span, ~[tp.ident], ~[])).to_vec() + opt_vec::take_vec(generics.ty_params.map( + |tp| cx.ty_path(span, ~[tp.ident], ~[]))) ); let generics = ast::Generics { diff --git a/src/libsyntax/ext/pipes/ast_builder.rs b/src/libsyntax/ext/pipes/ast_builder.rs index 3e6dedb3b31..6e1406e3647 100644 --- a/src/libsyntax/ext/pipes/ast_builder.rs +++ b/src/libsyntax/ext/pipes/ast_builder.rs @@ -394,13 +394,15 @@ impl ext_ctxt_ast_builder for ext_ctxt { } fn ty_vars(&self, ty_params: &OptVec<ast::TyParam>) -> ~[@ast::Ty] { - ty_params.map(|p| self.ty_path_ast_builder( - path(~[p.ident], dummy_sp()))).to_vec() + opt_vec::take_vec( + ty_params.map(|p| self.ty_path_ast_builder( + path(~[p.ident], dummy_sp())))) } fn ty_vars_global(&self, ty_params: &OptVec<ast::TyParam>) -> ~[@ast::Ty] { - ty_params.map(|p| self.ty_path_ast_builder( - path(~[p.ident], dummy_sp()))).to_vec() + opt_vec::take_vec( + ty_params.map(|p| self.ty_path_ast_builder( + path(~[p.ident], dummy_sp())))) } } |
