about summary refs log tree commit diff
path: root/src/libsyntax/fold.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-06-11 12:14:38 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-13 13:53:34 -0700
commit9b9ef442337ee3b9a29449a0792ae2eeb0480d0c (patch)
tree0be19c2428e4bb08c91346b0c74366e2e9b0a510 /src/libsyntax/fold.rs
parent03ec8e5cc91b3b6b6ab98ef70aa63a0965c5f6c1 (diff)
downloadrust-9b9ef442337ee3b9a29449a0792ae2eeb0480d0c.tar.gz
rust-9b9ef442337ee3b9a29449a0792ae2eeb0480d0c.zip
libsyntax: Allow `+` to separate trait bounds from objects.
RFC #27.

After a snapshot, the old syntax will be removed.

This can break some code that looked like `foo as &Trait:Send`. Now you
will need to write `foo as (&Trait+Send)`.

Closes #12778.

[breaking-change]
Diffstat (limited to 'src/libsyntax/fold.rs')
-rw-r--r--src/libsyntax/fold.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs
index d8c7ffe4db7..d61a79e4e80 100644
--- a/src/libsyntax/fold.rs
+++ b/src/libsyntax/fold.rs
@@ -192,6 +192,7 @@ pub trait Folder {
                 })
             }
             TyTup(ref tys) => TyTup(tys.iter().map(|&ty| self.fold_ty(ty)).collect()),
+            TyParen(ref ty) => TyParen(self.fold_ty(*ty)),
             TyPath(ref path, ref bounds, id) => {
                 let id = self.new_id(id);
                 TyPath(self.fold_path(path),