From 46d4bbbae4e52b79c23136b926c1e3b1f187ce4b Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Tue, 16 Oct 2012 22:14:59 -0700 Subject: Simplify the AST representation of ty param bounds Change ast::ty_param_bound so that all ty param bounds are represented as traits, with no special cases for Copy/Send/Owned/Const. typeck::collect generates the special cases. A consequence of this is that code using the #[no_core] attribute can't use the Copy kind/trait. Probably not a big deal? As a side effect, any user-defined traits that happen to be called Copy, etc. in the same module override the built-in Copy trait. r=nmatsakis Closes #2284 --- src/libsyntax/ext/auto_serialize.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/ext') diff --git a/src/libsyntax/ext/auto_serialize.rs b/src/libsyntax/ext/auto_serialize.rs index 7e5e68ffff9..47e61c26f38 100644 --- a/src/libsyntax/ext/auto_serialize.rs +++ b/src/libsyntax/ext/auto_serialize.rs @@ -227,7 +227,7 @@ priv impl ext_ctxt { path: @ast::path, bounds: @~[ast::ty_param_bound] ) -> ast::ty_param { - let bound = ast::bound_trait(@{ + let bound = ast::ty_param_bound(@{ id: self.next_id(), node: ast::ty_path(path, self.next_id()), span: span, @@ -366,7 +366,7 @@ fn mk_impl( let mut trait_tps = vec::append( ~[ty_param], do tps.map |tp| { - let t_bound = ast::bound_trait(@{ + let t_bound = ast::ty_param_bound(@{ id: cx.next_id(), node: ast::ty_path(path, cx.next_id()), span: span, -- cgit 1.4.1-3-g733a5