about summary refs log tree commit diff
path: root/src/libsyntax/ext/pipes/ast_builder.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/ext/pipes/ast_builder.rs')
-rw-r--r--src/libsyntax/ext/pipes/ast_builder.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsyntax/ext/pipes/ast_builder.rs b/src/libsyntax/ext/pipes/ast_builder.rs
index 8a5b8a127d0..0433aab51fc 100644
--- a/src/libsyntax/ext/pipes/ast_builder.rs
+++ b/src/libsyntax/ext/pipes/ast_builder.rs
@@ -110,6 +110,7 @@ pub trait ext_ctxt_ast_builder {
     fn ty_option(ty: @ast::Ty) -> @ast::Ty;
     fn ty_infer() -> @ast::Ty;
     fn ty_nil_ast_builder() -> @ast::Ty;
+    fn strip_bounds(bounds: &[ast::ty_param]) -> ~[ast::ty_param];
 }
 
 impl ext_ctxt: ext_ctxt_ast_builder {
@@ -370,6 +371,12 @@ impl ext_ctxt: ext_ctxt_ast_builder {
         }
     }
 
+    fn strip_bounds(bounds: &[ast::ty_param]) -> ~[ast::ty_param] {
+        do bounds.map |ty_param| {
+            ast::ty_param { bounds: @~[], ..copy *ty_param }
+        }
+    }
+
     fn item_ty_poly(name: ident,
                     span: span,
                     ty: @ast::Ty,