about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2014-11-20 15:08:02 -0500
committerNiko Matsakis <niko@alum.mit.edu>2014-11-26 11:42:06 -0500
commitf4e29e7e9aa1da4fc91a6074b0e4df44a2986517 (patch)
tree0da944aff45bf45cd6e085b92aa78110d62cfb20
parent74a1041a4d7ae08d223f5ec623f6a698962d5667 (diff)
downloadrust-f4e29e7e9aa1da4fc91a6074b0e4df44a2986517.tar.gz
rust-f4e29e7e9aa1da4fc91a6074b0e4df44a2986517.zip
Fixup various places that were doing `&T+'a` and do `&(T+'a)`
-rw-r--r--src/libcore/fmt/mod.rs6
-rw-r--r--src/librustc/middle/expr_use_visitor.rs2
-rw-r--r--src/librustc/middle/traits/select.rs2
-rw-r--r--src/librustc/middle/typeck/rscope.rs4
-rw-r--r--src/librustrt/unwind.rs2
-rw-r--r--src/libserialize/json.rs4
-rw-r--r--src/libstd/comm/select.rs2
-rw-r--r--src/libstd/failure.rs2
-rw-r--r--src/libstd/io/mod.rs4
-rw-r--r--src/libstd/rt/backtrace.rs2
-rw-r--r--src/libsyntax/print/pprust.rs2
-rw-r--r--src/test/compile-fail/dst-index.rs2
-rw-r--r--src/test/compile-fail/issue-12470.rs2
-rw-r--r--src/test/compile-fail/issue-14285.rs2
-rw-r--r--src/test/compile-fail/kindck-copy.rs6
-rw-r--r--src/test/compile-fail/kindck-send-object.rs4
-rw-r--r--src/test/compile-fail/kindck-send-object1.rs4
-rw-r--r--src/test/compile-fail/kindck-send-object2.rs2
-rw-r--r--src/test/compile-fail/region-object-lifetime-1.rs4
-rw-r--r--src/test/compile-fail/regions-bounded-by-send.rs4
-rw-r--r--src/test/compile-fail/regions-close-object-into-object.rs2
-rw-r--r--src/test/compile-fail/regions-trait-variance.rs2
-rw-r--r--src/test/compile-fail/trait-bounds-not-on-impl.rs2
-rw-r--r--src/test/compile-fail/trait-bounds-not-on-struct.rs2
-rw-r--r--src/test/compile-fail/trait-bounds-sugar.rs4
-rw-r--r--src/test/run-pass/colorful-write-macros.rs2
-rw-r--r--src/test/run-pass/dst-index.rs2
-rw-r--r--src/test/run-pass/issue-10902.rs4
-rw-r--r--src/test/run-pass/issue-11205.rs4
-rw-r--r--src/test/run-pass/issue-14901.rs2
-rw-r--r--src/test/run-pass/issue-14958.rs2
-rw-r--r--src/test/run-pass/issue-14959.rs4
-rw-r--r--src/test/run-pass/issue-5708.rs4
-rw-r--r--src/test/run-pass/issue-8249.rs2
-rw-r--r--src/test/run-pass/issue-9719.rs6
-rw-r--r--src/test/run-pass/parameterized-trait-with-bounds.rs2
-rw-r--r--src/test/run-pass/regions-early-bound-trait-param.rs4
37 files changed, 56 insertions, 56 deletions
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs
index 6e77b0a7c79..d2bf7f1e15a 100644
--- a/src/libcore/fmt/mod.rs
+++ b/src/libcore/fmt/mod.rs
@@ -85,7 +85,7 @@ pub struct Formatter<'a> {
     width: Option<uint>,
     precision: Option<uint>,
 
-    buf: &'a mut FormatWriter+'a,
+    buf: &'a mut (FormatWriter+'a),
     curarg: slice::Items<'a, Argument<'a>>,
     args: &'a [Argument<'a>],
 }
@@ -565,7 +565,7 @@ impl<'a, Sized? T: Show> Show for &'a T {
 impl<'a, Sized? T: Show> Show for &'a mut T {
     fn fmt(&self, f: &mut Formatter) -> Result { (**self).fmt(f) }
 }
-impl<'a> Show for &'a Show+'a {
+impl<'a> Show for &'a (Show+'a) {
     fn fmt(&self, f: &mut Formatter) -> Result { (*self).fmt(f) }
 }
 
@@ -724,7 +724,7 @@ macro_rules! tuple (
 
 tuple! { T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, }
 
-impl<'a> Show for &'a any::Any+'a {
+impl<'a> Show for &'a (any::Any+'a) {
     fn fmt(&self, f: &mut Formatter) -> Result { f.pad("&Any") }
 }
 
diff --git a/src/librustc/middle/expr_use_visitor.rs b/src/librustc/middle/expr_use_visitor.rs
index 656feb51a1d..5ab3978b8a8 100644
--- a/src/librustc/middle/expr_use_visitor.rs
+++ b/src/librustc/middle/expr_use_visitor.rs
@@ -295,7 +295,7 @@ impl OverloadedCallType {
 pub struct ExprUseVisitor<'d,'t,'tcx,TYPER:'t> {
     typer: &'t TYPER,
     mc: mc::MemCategorizationContext<'t,TYPER>,
-    delegate: &'d mut Delegate<'tcx>+'d,
+    delegate: &'d mut (Delegate<'tcx>+'d),
 }
 
 // If the TYPER results in an error, it's because the type check
diff --git a/src/librustc/middle/traits/select.rs b/src/librustc/middle/traits/select.rs
index d1cc851c41f..8658a5248cc 100644
--- a/src/librustc/middle/traits/select.rs
+++ b/src/librustc/middle/traits/select.rs
@@ -43,7 +43,7 @@ use util::ppaux::Repr;
 pub struct SelectionContext<'cx, 'tcx:'cx> {
     infcx: &'cx InferCtxt<'cx, 'tcx>,
     param_env: &'cx ty::ParameterEnvironment<'tcx>,
-    typer: &'cx Typer<'tcx>+'cx,
+    typer: &'cx (Typer<'tcx>+'cx),
 
     /// Skolemizer used specifically for skolemizing entries on the
     /// obligation stack. This ensures that all entries on the stack
diff --git a/src/librustc/middle/typeck/rscope.rs b/src/librustc/middle/typeck/rscope.rs
index 2f72d3cf50d..3bca24f479f 100644
--- a/src/librustc/middle/typeck/rscope.rs
+++ b/src/librustc/middle/typeck/rscope.rs
@@ -139,11 +139,11 @@ impl RegionScope for BindingRscope {
 /// A scope which simply shifts the Debruijn index of other scopes
 /// to account for binding levels.
 pub struct ShiftedRscope<'r> {
-    base_scope: &'r RegionScope+'r
+    base_scope: &'r (RegionScope+'r)
 }
 
 impl<'r> ShiftedRscope<'r> {
-    pub fn new(base_scope: &'r RegionScope+'r) -> ShiftedRscope<'r> {
+    pub fn new(base_scope: &'r (RegionScope+'r)) -> ShiftedRscope<'r> {
         ShiftedRscope { base_scope: base_scope }
     }
 }
diff --git a/src/librustrt/unwind.rs b/src/librustrt/unwind.rs
index 7544b93ce52..697ee95df4c 100644
--- a/src/librustrt/unwind.rs
+++ b/src/librustrt/unwind.rs
@@ -86,7 +86,7 @@ struct Exception {
     cause: Option<Box<Any + Send>>,
 }
 
-pub type Callback = fn(msg: &Any + Send, file: &'static str, line: uint);
+pub type Callback = fn(msg: &(Any + Send), file: &'static str, line: uint);
 
 // Variables used for invoking callbacks when a task starts to unwind.
 //
diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs
index 4a2ca58fc92..19d23265b01 100644
--- a/src/libserialize/json.rs
+++ b/src/libserialize/json.rs
@@ -398,7 +398,7 @@ fn fmt_number_or_null(v: f64) -> string::String {
 
 /// A structure for implementing serialization to JSON.
 pub struct Encoder<'a> {
-    writer: &'a mut io::Writer+'a,
+    writer: &'a mut (io::Writer+'a),
 }
 
 impl<'a> Encoder<'a> {
@@ -602,7 +602,7 @@ impl<'a> ::Encoder<io::IoError> for Encoder<'a> {
 /// Another encoder for JSON, but prints out human-readable JSON instead of
 /// compact data
 pub struct PrettyEncoder<'a> {
-    writer: &'a mut io::Writer+'a,
+    writer: &'a mut (io::Writer+'a),
     curr_indent: uint,
     indent: uint,
 }
diff --git a/src/libstd/comm/select.rs b/src/libstd/comm/select.rs
index 621556f75ce..3191519815a 100644
--- a/src/libstd/comm/select.rs
+++ b/src/libstd/comm/select.rs
@@ -84,7 +84,7 @@ pub struct Handle<'rx, T:'rx> {
     next: *mut Handle<'static, ()>,
     prev: *mut Handle<'static, ()>,
     added: bool,
-    packet: &'rx Packet+'rx,
+    packet: &'rx (Packet+'rx),
 
     // due to our fun transmutes, we be sure to place this at the end. (nothing
     // previous relies on T)
diff --git a/src/libstd/failure.rs b/src/libstd/failure.rs
index 32a8be22902..d839c1484e5 100644
--- a/src/libstd/failure.rs
+++ b/src/libstd/failure.rs
@@ -40,7 +40,7 @@ impl Writer for Stdio {
     }
 }
 
-pub fn on_fail(obj: &Any + Send, file: &'static str, line: uint) {
+pub fn on_fail(obj: &(Any+Send), file: &'static str, line: uint) {
     let msg = match obj.downcast_ref::<&'static str>() {
         Some(s) => *s,
         None => match obj.downcast_ref::<String>() {
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index 681400e9db5..311cbe6ece8 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -911,7 +911,7 @@ impl<'a> Reader for Box<Reader+'a> {
     }
 }
 
-impl<'a> Reader for &'a mut Reader+'a {
+impl<'a> Reader for &'a mut (Reader+'a) {
     fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> { (*self).read(buf) }
 }
 
@@ -1279,7 +1279,7 @@ impl<'a> Writer for Box<Writer+'a> {
     }
 }
 
-impl<'a> Writer for &'a mut Writer+'a {
+impl<'a> Writer for &'a mut (Writer+'a) {
     #[inline]
     fn write(&mut self, buf: &[u8]) -> IoResult<()> { (**self).write(buf) }
 
diff --git a/src/libstd/rt/backtrace.rs b/src/libstd/rt/backtrace.rs
index 81022994387..d47256b1d18 100644
--- a/src/libstd/rt/backtrace.rs
+++ b/src/libstd/rt/backtrace.rs
@@ -288,7 +288,7 @@ mod imp {
 
         struct Context<'a> {
             idx: int,
-            writer: &'a mut Writer+'a,
+            writer: &'a mut (Writer+'a),
             last_error: Option<IoError>,
         }
 
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 78412a76bfe..954c72edff4 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -61,7 +61,7 @@ pub struct State<'a> {
     literals: Option<Vec<comments::Literal> >,
     cur_cmnt_and_lit: CurrentCommentAndLiteral,
     boxes: Vec<pp::Breaks>,
-    ann: &'a PpAnn+'a,
+    ann: &'a (PpAnn+'a),
     encode_idents_with_hygiene: bool,
 }
 
diff --git a/src/test/compile-fail/dst-index.rs b/src/test/compile-fail/dst-index.rs
index 542562b69e6..f6511d68662 100644
--- a/src/test/compile-fail/dst-index.rs
+++ b/src/test/compile-fail/dst-index.rs
@@ -25,7 +25,7 @@ impl Index<uint, str> for S {
 struct T;
 
 impl Index<uint, Show + 'static> for T {
-    fn index<'a>(&'a self, idx: &uint) -> &'a Show + 'static {
+    fn index<'a>(&'a self, idx: &uint) -> &'a (Show + 'static) {
         static x: uint = 42;
         &x
     }
diff --git a/src/test/compile-fail/issue-12470.rs b/src/test/compile-fail/issue-12470.rs
index aa7e3cd3739..0202d538cf6 100644
--- a/src/test/compile-fail/issue-12470.rs
+++ b/src/test/compile-fail/issue-12470.rs
@@ -24,7 +24,7 @@ impl X for B {
 }
 
 struct A<'a> {
-    p: &'a X+'a
+    p: &'a (X+'a)
 }
 
 fn make_a<'a>(p: &'a X) -> A<'a> {
diff --git a/src/test/compile-fail/issue-14285.rs b/src/test/compile-fail/issue-14285.rs
index 624ddf0c8bb..cbf4412a81d 100644
--- a/src/test/compile-fail/issue-14285.rs
+++ b/src/test/compile-fail/issue-14285.rs
@@ -14,7 +14,7 @@ struct A;
 
 impl Foo for A {}
 
-struct B<'a>(&'a Foo+'a);
+struct B<'a>(&'a (Foo+'a));
 
 fn foo<'a>(a: &Foo) -> B<'a> {
     B(a)    //~ ERROR cannot infer an appropriate lifetime
diff --git a/src/test/compile-fail/kindck-copy.rs b/src/test/compile-fail/kindck-copy.rs
index 499144698fb..202529c30b3 100644
--- a/src/test/compile-fail/kindck-copy.rs
+++ b/src/test/compile-fail/kindck-copy.rs
@@ -44,15 +44,15 @@ fn test<'a,T,U:Copy>(_: &'a int) {
 
     // borrowed object types are generally ok
     assert_copy::<&'a Dummy>();
-    assert_copy::<&'a Dummy+Copy>();
-    assert_copy::<&'static Dummy+Copy>();
+    assert_copy::<&'a (Dummy+Copy)>();
+    assert_copy::<&'static (Dummy+Copy)>();
 
     // owned object types are not ok
     assert_copy::<Box<Dummy>>(); //~ ERROR `core::kinds::Copy` is not implemented
     assert_copy::<Box<Dummy+Copy>>(); //~ ERROR `core::kinds::Copy` is not implemented
 
     // mutable object types are not ok
-    assert_copy::<&'a mut Dummy+Copy>();  //~ ERROR `core::kinds::Copy` is not implemented
+    assert_copy::<&'a mut (Dummy+Copy)>();  //~ ERROR `core::kinds::Copy` is not implemented
 
     // closures are like an `&mut` object
     assert_copy::<||>(); //~ ERROR `core::kinds::Copy` is not implemented
diff --git a/src/test/compile-fail/kindck-send-object.rs b/src/test/compile-fail/kindck-send-object.rs
index 9217d05002d..4fbb3eab8c4 100644
--- a/src/test/compile-fail/kindck-send-object.rs
+++ b/src/test/compile-fail/kindck-send-object.rs
@@ -19,7 +19,7 @@ trait Message : Send { }
 // careful with object types, who knows what they close over...
 
 fn object_ref_with_static_bound_not_ok() {
-    assert_send::<&'static Dummy+'static>();
+    assert_send::<&'static (Dummy+'static)>();
     //~^ ERROR the trait `core::kinds::Send` is not implemented
 }
 
@@ -36,7 +36,7 @@ fn closure_with_no_bound_not_ok<'a>() {
 }
 
 fn object_with_send_bound_ok() {
-    assert_send::<&'static Dummy+Send>();
+    assert_send::<&'static (Dummy+Send)>();
     assert_send::<Box<Dummy+Send>>();
     assert_send::<proc():Send>;
     assert_send::<||:Send>;
diff --git a/src/test/compile-fail/kindck-send-object1.rs b/src/test/compile-fail/kindck-send-object1.rs
index ff8daa045c6..a5519753643 100644
--- a/src/test/compile-fail/kindck-send-object1.rs
+++ b/src/test/compile-fail/kindck-send-object1.rs
@@ -21,13 +21,13 @@ fn test51<'a>() {
     //~^ ERROR the trait `core::kinds::Send` is not implemented
 }
 fn test52<'a>() {
-    assert_send::<&'a Dummy+Send>();
+    assert_send::<&'a (Dummy+Send)>();
     //~^ ERROR does not fulfill the required lifetime
 }
 
 // ...unless they are properly bounded
 fn test60() {
-    assert_send::<&'static Dummy+Send>();
+    assert_send::<&'static (Dummy+Send)>();
 }
 fn test61() {
     assert_send::<Box<Dummy+Send>>();
diff --git a/src/test/compile-fail/kindck-send-object2.rs b/src/test/compile-fail/kindck-send-object2.rs
index d46c6e68c05..ea8c2628306 100644
--- a/src/test/compile-fail/kindck-send-object2.rs
+++ b/src/test/compile-fail/kindck-send-object2.rs
@@ -23,7 +23,7 @@ fn test53() {
 
 // ...unless they are properly bounded
 fn test60() {
-    assert_send::<&'static Dummy+Send>();
+    assert_send::<&'static (Dummy+Send)>();
 }
 fn test61() {
     assert_send::<Box<Dummy+Send>>();
diff --git a/src/test/compile-fail/region-object-lifetime-1.rs b/src/test/compile-fail/region-object-lifetime-1.rs
index 01daeb628ef..4758ce71fff 100644
--- a/src/test/compile-fail/region-object-lifetime-1.rs
+++ b/src/test/compile-fail/region-object-lifetime-1.rs
@@ -28,14 +28,14 @@ fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a Foo) -> &'b () {
 
 // Borrowed receiver with two distinct lifetimes, but we know that
 // 'b:'a, hence &'a () is permitted.
-fn borrowed_receiver_related_lifetimes<'a,'b>(x: &'a Foo+'b) -> &'a () {
+fn borrowed_receiver_related_lifetimes<'a,'b>(x: &'a (Foo+'b)) -> &'a () {
     x.borrowed()
 }
 
 // Here we have two distinct lifetimes, but we try to return a pointer
 // with the longer lifetime when (from the signature) we only know
 // that it lives as long as the shorter lifetime. Therefore, error.
-fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a Foo+'b) -> &'b () {
+fn borrowed_receiver_related_lifetimes2<'a,'b>(x: &'a (Foo+'b)) -> &'b () {
     x.borrowed() //~ ERROR cannot infer
 }
 
diff --git a/src/test/compile-fail/regions-bounded-by-send.rs b/src/test/compile-fail/regions-bounded-by-send.rs
index 182b40ceaae..660a9be4f63 100644
--- a/src/test/compile-fail/regions-bounded-by-send.rs
+++ b/src/test/compile-fail/regions-bounded-by-send.rs
@@ -57,12 +57,12 @@ fn box_with_region_not_ok<'a>() {
 // objects with insufficient bounds no ok
 
 fn object_with_random_bound_not_ok<'a>() {
-    assert_send::<&'a Dummy+'a>();
+    assert_send::<&'a (Dummy+'a)>();
     //~^ ERROR not implemented
 }
 
 fn object_with_send_bound_not_ok<'a>() {
-    assert_send::<&'a Dummy+Send>();
+    assert_send::<&'a (Dummy+Send)>();
     //~^ ERROR does not fulfill
 }
 
diff --git a/src/test/compile-fail/regions-close-object-into-object.rs b/src/test/compile-fail/regions-close-object-into-object.rs
index 835c55c9bd1..48945868bd3 100644
--- a/src/test/compile-fail/regions-close-object-into-object.rs
+++ b/src/test/compile-fail/regions-close-object-into-object.rs
@@ -10,7 +10,7 @@
 
 
 trait A<T> {}
-struct B<'a, T>(&'a A<T>+'a);
+struct B<'a, T>(&'a (A<T>+'a));
 
 trait X {}
 impl<'a, T> X for B<'a, T> {}
diff --git a/src/test/compile-fail/regions-trait-variance.rs b/src/test/compile-fail/regions-trait-variance.rs
index 3ceb4e3fef6..4e31a41c4e0 100644
--- a/src/test/compile-fail/regions-trait-variance.rs
+++ b/src/test/compile-fail/regions-trait-variance.rs
@@ -31,7 +31,7 @@ impl Drop for B {
 }
 
 struct A<'r> {
-    p: &'r X+'r
+    p: &'r (X+'r)
 }
 
 fn make_a(p:&X) -> A {
diff --git a/src/test/compile-fail/trait-bounds-not-on-impl.rs b/src/test/compile-fail/trait-bounds-not-on-impl.rs
index 38c78144601..a034352c4a6 100644
--- a/src/test/compile-fail/trait-bounds-not-on-impl.rs
+++ b/src/test/compile-fail/trait-bounds-not-on-impl.rs
@@ -13,7 +13,7 @@ trait Foo {
 
 struct Bar;
 
-impl Foo + Owned for Bar { //~ ERROR bounded traits are only valid in type position
+impl Foo + Owned for Bar { //~ ERROR not a trait
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/trait-bounds-not-on-struct.rs b/src/test/compile-fail/trait-bounds-not-on-struct.rs
index 0a5909ff2ef..081efa429c3 100644
--- a/src/test/compile-fail/trait-bounds-not-on-struct.rs
+++ b/src/test/compile-fail/trait-bounds-not-on-struct.rs
@@ -11,6 +11,6 @@
 
 struct Foo;
 
-fn foo(_x: Box<Foo + Send>) { } //~ ERROR kind bounds can only be used on trait types
+fn foo(_x: Box<Foo + Send>) { } //~ ERROR expected a reference to a trait
 
 fn main() { }
diff --git a/src/test/compile-fail/trait-bounds-sugar.rs b/src/test/compile-fail/trait-bounds-sugar.rs
index 7ed8db4fcd2..4da496621d1 100644
--- a/src/test/compile-fail/trait-bounds-sugar.rs
+++ b/src/test/compile-fail/trait-bounds-sugar.rs
@@ -16,14 +16,14 @@ trait Foo {}
 fn a(_x: Box<Foo+Send>) {
 }
 
-fn b(_x: &'static Foo+'static) {
+fn b(_x: &'static (Foo+'static)) {
 }
 
 fn c(x: Box<Foo+Sync>) {
     a(x); //~ ERROR mismatched types
 }
 
-fn d(x: &'static Foo+Sync) {
+fn d(x: &'static (Foo+Sync)) {
     b(x); //~ ERROR cannot infer
     //~^ ERROR mismatched types
 }
diff --git a/src/test/run-pass/colorful-write-macros.rs b/src/test/run-pass/colorful-write-macros.rs
index 75b8e391331..bbb049eb960 100644
--- a/src/test/run-pass/colorful-write-macros.rs
+++ b/src/test/run-pass/colorful-write-macros.rs
@@ -18,7 +18,7 @@ use std::fmt;
 use std::fmt::FormatWriter;
 
 struct Foo<'a> {
-    writer: &'a mut Writer+'a,
+    writer: &'a mut (Writer+'a),
     other: &'a str,
 }
 
diff --git a/src/test/run-pass/dst-index.rs b/src/test/run-pass/dst-index.rs
index 266f9bcba5f..eaf7131e1d8 100644
--- a/src/test/run-pass/dst-index.rs
+++ b/src/test/run-pass/dst-index.rs
@@ -25,7 +25,7 @@ impl Index<uint, str> for S {
 struct T;
 
 impl Index<uint, Show + 'static> for T {
-    fn index<'a>(&'a self, idx: &uint) -> &'a Show + 'static {
+    fn index<'a>(&'a self, idx: &uint) -> &'a (Show + 'static) {
         static x: uint = 42;
         &x
     }
diff --git a/src/test/run-pass/issue-10902.rs b/src/test/run-pass/issue-10902.rs
index 84d71e1ef5d..324a1701b2f 100644
--- a/src/test/run-pass/issue-10902.rs
+++ b/src/test/run-pass/issue-10902.rs
@@ -10,7 +10,7 @@
 
 pub mod two_tuple {
     pub trait T {}
-    pub struct P<'a>(&'a T + 'a, &'a T + 'a);
+    pub struct P<'a>(&'a (T + 'a), &'a (T + 'a));
     pub fn f<'a>(car: &'a T, cdr: &'a T) -> P<'a> {
         P(car, cdr)
     }
@@ -18,7 +18,7 @@ pub mod two_tuple {
 
 pub mod two_fields {
     pub trait T {}
-    pub struct P<'a> { car: &'a T + 'a, cdr: &'a T + 'a }
+    pub struct P<'a> { car: &'a (T + 'a), cdr: &'a (T + 'a) }
     pub fn f<'a>(car: &'a T, cdr: &'a T) -> P<'a> {
         P{ car: car, cdr: cdr }
     }
diff --git a/src/test/run-pass/issue-11205.rs b/src/test/run-pass/issue-11205.rs
index 89224e1fb12..ea138311f19 100644
--- a/src/test/run-pass/issue-11205.rs
+++ b/src/test/run-pass/issue-11205.rs
@@ -49,7 +49,7 @@ fn main() {
     foog(x, &[box 1i]);
 
     struct T<'a> {
-        t: [&'a Foo+'a, ..2]
+        t: [&'a (Foo+'a), ..2]
     }
     let _n = T {
         t: [&1i, &2i]
@@ -64,7 +64,7 @@ fn main() {
     };
 
     struct F<'b> {
-        t: &'b [&'b Foo+'b]
+        t: &'b [&'b (Foo+'b)]
     }
     let _n = F {
         t: &[&1i, &2i]
diff --git a/src/test/run-pass/issue-14901.rs b/src/test/run-pass/issue-14901.rs
index 647bbfbd65d..e41754fd1b9 100644
--- a/src/test/run-pass/issue-14901.rs
+++ b/src/test/run-pass/issue-14901.rs
@@ -11,7 +11,7 @@
 use std::io::Reader;
 
 enum Wrapper<'a> {
-    WrapReader(&'a Reader + 'a)
+    WrapReader(&'a (Reader + 'a))
 }
 
 trait Wrap<'a> {
diff --git a/src/test/run-pass/issue-14958.rs b/src/test/run-pass/issue-14958.rs
index 7f3321e0b3e..1ffd349a653 100644
--- a/src/test/run-pass/issue-14958.rs
+++ b/src/test/run-pass/issue-14958.rs
@@ -14,7 +14,7 @@ trait Foo {}
 
 struct Bar;
 
-impl<'a> std::ops::Fn<(&'a Foo+'a,), ()> for Bar {
+impl<'a> std::ops::Fn<(&'a (Foo+'a),), ()> for Bar {
     extern "rust-call" fn call(&self, _: (&'a Foo,)) {}
 }
 
diff --git a/src/test/run-pass/issue-14959.rs b/src/test/run-pass/issue-14959.rs
index 6cc5ab4d6cb..99472bb3610 100644
--- a/src/test/run-pass/issue-14959.rs
+++ b/src/test/run-pass/issue-14959.rs
@@ -33,8 +33,8 @@ impl Alloy {
     }
 }
 
-impl<'a, 'b> Fn<(&'b mut Response+'b,),()> for SendFile<'a> {
-    extern "rust-call" fn call(&self, (_res,): (&'b mut Response+'b,)) {}
+impl<'a, 'b> Fn<(&'b mut (Response+'b),),()> for SendFile<'a> {
+    extern "rust-call" fn call(&self, (_res,): (&'b mut (Response+'b),)) {}
 }
 
 impl<Rq: Request, Rs: Response> Ingot<Rq, Rs> for HelloWorld {
diff --git a/src/test/run-pass/issue-5708.rs b/src/test/run-pass/issue-5708.rs
index 9c728005b6f..61ae273aef5 100644
--- a/src/test/run-pass/issue-5708.rs
+++ b/src/test/run-pass/issue-5708.rs
@@ -29,7 +29,7 @@ impl Inner for int {
 }
 
 struct Outer<'a> {
-    inner: &'a Inner+'a
+    inner: &'a (Inner+'a)
 }
 
 impl<'a> Outer<'a> {
@@ -51,7 +51,7 @@ pub fn main() {
 pub trait MyTrait<T> { }
 
 pub struct MyContainer<'a, T> {
-    foos: Vec<&'a MyTrait<T>+'a> ,
+    foos: Vec<&'a (MyTrait<T>+'a)> ,
 }
 
 impl<'a, T> MyContainer<'a, T> {
diff --git a/src/test/run-pass/issue-8249.rs b/src/test/run-pass/issue-8249.rs
index dae5db11b0a..44f07def531 100644
--- a/src/test/run-pass/issue-8249.rs
+++ b/src/test/run-pass/issue-8249.rs
@@ -13,7 +13,7 @@ struct B;
 impl A for B {}
 
 struct C<'a> {
-    foo: &'a mut A+'a,
+    foo: &'a mut (A+'a),
 }
 
 fn foo(a: &mut A) {
diff --git a/src/test/run-pass/issue-9719.rs b/src/test/run-pass/issue-9719.rs
index ebb9b20ec25..4c6b9a3aaa0 100644
--- a/src/test/run-pass/issue-9719.rs
+++ b/src/test/run-pass/issue-9719.rs
@@ -16,7 +16,7 @@ mod a {
     pub trait X {}
     impl X for int {}
 
-    pub struct Z<'a>(Enum<&'a X+'a>);
+    pub struct Z<'a>(Enum<&'a (X+'a)>);
     fn foo() { let x = 42i; let z = Z(Enum::A(&x as &X)); let _ = z; }
 }
 
@@ -24,7 +24,7 @@ mod b {
     trait X {}
     impl X for int {}
     struct Y<'a>{
-        x:Option<&'a X+'a>,
+        x:Option<&'a (X+'a)>,
     }
 
     fn bar() {
@@ -36,7 +36,7 @@ mod b {
 mod c {
     pub trait X { fn f(&self); }
     impl X for int { fn f(&self) {} }
-    pub struct Z<'a>(Option<&'a X+'a>);
+    pub struct Z<'a>(Option<&'a (X+'a)>);
     fn main() { let x = 42i; let z = Z(Some(&x as &X)); let _ = z; }
 }
 
diff --git a/src/test/run-pass/parameterized-trait-with-bounds.rs b/src/test/run-pass/parameterized-trait-with-bounds.rs
index 339c9e3c490..840e58848a7 100644
--- a/src/test/run-pass/parameterized-trait-with-bounds.rs
+++ b/src/test/run-pass/parameterized-trait-with-bounds.rs
@@ -19,7 +19,7 @@ mod foo {
     pub trait D<'a, T> {}
 }
 
-fn foo1<T>(_: &A<T> + Send) {}
+fn foo1<T>(_: &(A<T> + Send)) {}
 fn foo2<T>(_: Box<A<T> + Send + Sync>) {}
 fn foo3<T>(_: Box<B<int, uint> + 'static>) {}
 fn foo4<'a, T>(_: Box<C<'a, T> + 'static + Send>) {}
diff --git a/src/test/run-pass/regions-early-bound-trait-param.rs b/src/test/run-pass/regions-early-bound-trait-param.rs
index faf371e8826..907f610ff25 100644
--- a/src/test/run-pass/regions-early-bound-trait-param.rs
+++ b/src/test/run-pass/regions-early-bound-trait-param.rs
@@ -30,7 +30,7 @@ fn object_invoke1<'d>(x: &'d Trait<'d>) -> (int, int) {
 }
 
 struct Struct1<'e> {
-    f: &'e Trait<'e>+'e
+    f: &'e (Trait<'e>+'e)
 }
 
 fn field_invoke1<'f, 'g>(x: &'g Struct1<'f>) -> (int,int) {
@@ -40,7 +40,7 @@ fn field_invoke1<'f, 'g>(x: &'g Struct1<'f>) -> (int,int) {
 }
 
 struct Struct2<'h, 'i> {
-    f: &'h Trait<'i>+'h
+    f: &'h (Trait<'i>+'h)
 }
 
 fn object_invoke2<'j, 'k>(x: &'k Trait<'j>) -> int {