librustc: Disallow trait bounds in types, enumerations, and structure definitions. r=tjc
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user