summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-10-16 22:14:59 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-10-22 09:01:12 -0700
commit46d4bbbae4e52b79c23136b926c1e3b1f187ce4b (patch)
tree781fb02e8c6acd62d3cbad5c71bd1404e60d2a31 /src/libsyntax/ext
parent42c05fe642efa726dc6cde624b40b638741724ee (diff)
downloadrust-46d4bbbae4e52b79c23136b926c1e3b1f187ce4b.tar.gz
rust-46d4bbbae4e52b79c23136b926c1e3b1f187ce4b.zip
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
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/auto_serialize.rs4
1 files changed, 2 insertions, 2 deletions
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,