about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2020-01-24 21:04:17 +0100
committerOliver Scherer <github35764891676564198441@oli-obk.de>2020-01-25 13:19:21 +0100
commitae31436ac739d2fe9fdb45fec1364db6007bd359 (patch)
treec4fc18e2bc7030d2b4ee1d034b80ab9f13f28e87 /src
parent80a65bcaf2f2b8a5c659b21b32b42bc300338a0e (diff)
downloadrust-ae31436ac739d2fe9fdb45fec1364db6007bd359.tar.gz
rust-ae31436ac739d2fe9fdb45fec1364db6007bd359.zip
Don't use spaces before type ascription like colons
Diffstat (limited to 'src')
-rw-r--r--src/librustc/ty/print/pretty.rs6
-rw-r--r--src/test/ui/error-codes/e0119/complex-impl.stderr2
-rw-r--r--src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs3
-rw-r--r--src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.stderr2
-rw-r--r--src/test/ui/reject-specialized-drops-8142.rs6
-rw-r--r--src/test/ui/reject-specialized-drops-8142.stderr6
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/cross-crate.stderr2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/enum.stderr6
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/explicit-dyn.stderr2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/explicit-enum.stderr2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/explicit-projection.stderr2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/explicit-struct.stderr2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/explicit-union.stderr2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/infer-static.stderr2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/nested-enum.stderr2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/nested-regions.stderr6
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/nested-structs.stderr2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/nested-union.stderr2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/projection.stderr2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/reference.stderr2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/self-dyn.stderr2
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/self-structs.stderr2
-rw-r--r--src/test/ui/trivial-bounds/trivial-bounds-lint.stderr6
23 files changed, 35 insertions, 36 deletions
diff --git a/src/librustc/ty/print/pretty.rs b/src/librustc/ty/print/pretty.rs
index 7dd3c8f4a72..db539f9195c 100644
--- a/src/librustc/ty/print/pretty.rs
+++ b/src/librustc/ty/print/pretty.rs
@@ -889,7 +889,7 @@ pub trait PrettyPrinter<'tcx>:
                 // fallback
                 p!(write("{:?}", ct.val));
                 if print_ty {
-                    p!(write(" : "), print(ct.ty));
+                    p!(write(": "), print(ct.ty));
                 }
             }
         };
@@ -1009,7 +1009,7 @@ pub trait PrettyPrinter<'tcx>:
                     // fallback
                     p!(write("{:?}", ct));
                     if print_ty {
-                        p!(write(" : "), print(ty));
+                        p!(write(": "), print(ty));
                     }
                 }
             }
@@ -1610,7 +1610,7 @@ where
     type Error = P::Error;
     fn print(&self, mut cx: P) -> Result<Self::Output, Self::Error> {
         define_scoped_cx!(cx);
-        p!(print(self.0), write(" : "), print(self.1));
+        p!(print(self.0), write(": "), print(self.1));
         Ok(cx)
     }
 }
diff --git a/src/test/ui/error-codes/e0119/complex-impl.stderr b/src/test/ui/error-codes/e0119/complex-impl.stderr
index 0c18a1fbd1f..2cc09e8b147 100644
--- a/src/test/ui/error-codes/e0119/complex-impl.stderr
+++ b/src/test/ui/error-codes/e0119/complex-impl.stderr
@@ -6,7 +6,7 @@ LL | impl<R> External for (Q, R) {}
    |
    = note: conflicting implementation in crate `complex_impl_support`:
            - impl<'a, 'b, 'c, T, U, V, W> complex_impl_support::External for (T, complex_impl_support::M<'a, 'b, 'c, std::boxed::Box<U>, V, W>)
-             where <U as std::ops::FnOnce<(T,)>>::Output == V, <V as std::iter::Iterator>::Item == T, 'b : 'a, T : 'a, U: std::ops::FnOnce<(T,)>, U : 'static, V: std::iter::Iterator, V: std::clone::Clone, W: std::ops::Add, <W as std::ops::Add>::Output: std::marker::Copy;
+             where <U as std::ops::FnOnce<(T,)>>::Output == V, <V as std::iter::Iterator>::Item == T, 'b: 'a, T: 'a, U: std::ops::FnOnce<(T,)>, U: 'static, V: std::iter::Iterator, V: std::clone::Clone, W: std::ops::Add, <W as std::ops::Add>::Output: std::marker::Copy;
 
 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
   --> $DIR/complex-impl.rs:9:1
diff --git a/src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs b/src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs
index db0da40aab0..60466d0bcd0 100644
--- a/src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs
+++ b/src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs
@@ -4,9 +4,8 @@
 // FIXME(generic-associated-types) Investigate why this doesn't compile.
 
 trait Iterator {
-//~^ ERROR the requirement `for<'a> <Self as Iterator>::Item<'a> : 'a` is not satisfied
+    //~^ ERROR the requirement `for<'a> <Self as Iterator>::Item<'a>: 'a` is not satisfied
     type Item<'a>: 'a;
 }
 
-
 fn main() {}
diff --git a/src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.stderr b/src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.stderr
index 07169700f39..4dc69cdd1dc 100644
--- a/src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.stderr
+++ b/src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.stderr
@@ -1,4 +1,4 @@
-error[E0280]: the requirement `for<'a> <Self as Iterator>::Item<'a> : 'a` is not satisfied
+error[E0280]: the requirement `for<'a> <Self as Iterator>::Item<'a>: 'a` is not satisfied
   --> $DIR/issue-62326-parameter-out-of-range.rs:6:1
    |
 LL |   trait Iterator {
diff --git a/src/test/ui/reject-specialized-drops-8142.rs b/src/test/ui/reject-specialized-drops-8142.rs
index d7fec8802f0..c4671736d79 100644
--- a/src/test/ui/reject-specialized-drops-8142.rs
+++ b/src/test/ui/reject-specialized-drops-8142.rs
@@ -21,11 +21,11 @@ struct TupleStruct<T>(T);
 union Union<T: Copy> { f: T }
 
 impl<'al,'adds_bnd:'al> Drop for K<'al,'adds_bnd> {                        // REJECT
-    //~^ ERROR `Drop` impl requires `'adds_bnd : 'al`
+    //~^ ERROR `Drop` impl requires `'adds_bnd: 'al`
     fn drop(&mut self) { } }
 
 impl<'al,'adds_bnd>     Drop for L<'al,'adds_bnd> where 'adds_bnd:'al {    // REJECT
-    //~^ ERROR `Drop` impl requires `'adds_bnd : 'al`
+    //~^ ERROR `Drop` impl requires `'adds_bnd: 'al`
     fn drop(&mut self) { } }
 
 impl<'ml>               Drop for M<'ml>         { fn drop(&mut self) { } } // ACCEPT
@@ -44,7 +44,7 @@ impl<AddsBnd:Bound> Drop for Q<AddsBnd> { fn drop(&mut self) { } } // REJECT
 //~^ ERROR `Drop` impl requires `AddsBnd: Bound`
 
 impl<'rbnd,AddsRBnd:'rbnd> Drop for R<AddsRBnd> { fn drop(&mut self) { } } // REJECT
-//~^ ERROR `Drop` impl requires `AddsRBnd : 'rbnd`
+//~^ ERROR `Drop` impl requires `AddsRBnd: 'rbnd`
 
 impl<Bs:Bound>    Drop for S<Bs>          { fn drop(&mut self) { } } // ACCEPT
 
diff --git a/src/test/ui/reject-specialized-drops-8142.stderr b/src/test/ui/reject-specialized-drops-8142.stderr
index 14618df90cb..c09418de518 100644
--- a/src/test/ui/reject-specialized-drops-8142.stderr
+++ b/src/test/ui/reject-specialized-drops-8142.stderr
@@ -10,7 +10,7 @@ note: the implementor must specify the same requirement
 LL | union Union<T: Copy> { f: T }
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0367]: `Drop` impl requires `'adds_bnd : 'al` but the struct it is implemented for does not
+error[E0367]: `Drop` impl requires `'adds_bnd: 'al` but the struct it is implemented for does not
   --> $DIR/reject-specialized-drops-8142.rs:23:20
    |
 LL | impl<'al,'adds_bnd:'al> Drop for K<'al,'adds_bnd> {                        // REJECT
@@ -22,7 +22,7 @@ note: the implementor must specify the same requirement
 LL | struct K<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 }
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0367]: `Drop` impl requires `'adds_bnd : 'al` but the struct it is implemented for does not
+error[E0367]: `Drop` impl requires `'adds_bnd: 'al` but the struct it is implemented for does not
   --> $DIR/reject-specialized-drops-8142.rs:27:67
    |
 LL | impl<'al,'adds_bnd>     Drop for L<'al,'adds_bnd> where 'adds_bnd:'al {    // REJECT
@@ -73,7 +73,7 @@ note: the implementor must specify the same requirement
 LL | struct Q<Tq> { x: *const Tq }
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0367]: `Drop` impl requires `AddsRBnd : 'rbnd` but the struct it is implemented for does not
+error[E0367]: `Drop` impl requires `AddsRBnd: 'rbnd` but the struct it is implemented for does not
   --> $DIR/reject-specialized-drops-8142.rs:46:21
    |
 LL | impl<'rbnd,AddsRBnd:'rbnd> Drop for R<AddsRBnd> { fn drop(&mut self) { } } // REJECT
diff --git a/src/test/ui/rfc-2093-infer-outlives/cross-crate.stderr b/src/test/ui/rfc-2093-infer-outlives/cross-crate.stderr
index 3368e35d304..1da8e648251 100644
--- a/src/test/ui/rfc-2093-infer-outlives/cross-crate.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/cross-crate.stderr
@@ -6,7 +6,7 @@ LL | |     bar: std::slice::IterMut<'a, T>
 LL | | }
    | |_^
    |
-   = note: T : 'a
+   = note: T: 'a
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/enum.stderr b/src/test/ui/rfc-2093-infer-outlives/enum.stderr
index dd56c1f79c7..868ca2c4587 100644
--- a/src/test/ui/rfc-2093-infer-outlives/enum.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/enum.stderr
@@ -6,7 +6,7 @@ LL | |     One(Bar<'a, T>)
 LL | | }
    | |_^
    |
-   = note: T : 'a
+   = note: T: 'a
 
 error: rustc_outlives
   --> $DIR/enum.rs:13:1
@@ -16,7 +16,7 @@ LL | |     field2: &'b U
 LL | | }
    | |_^
    |
-   = note: U : 'b
+   = note: U: 'b
 
 error: rustc_outlives
   --> $DIR/enum.rs:19:1
@@ -26,7 +26,7 @@ LL | |     One(&'c Yang<K>)
 LL | | }
    | |_^
    |
-   = note: K : 'c
+   = note: K: 'c
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-dyn.stderr b/src/test/ui/rfc-2093-infer-outlives/explicit-dyn.stderr
index c87ef6c391b..adb718ad794 100644
--- a/src/test/ui/rfc-2093-infer-outlives/explicit-dyn.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/explicit-dyn.stderr
@@ -7,7 +7,7 @@ LL | |     foo: Box<dyn Trait<'a, A>>
 LL | | }
    | |_^
    |
-   = note: A : 'a
+   = note: A: 'a
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-enum.stderr b/src/test/ui/rfc-2093-infer-outlives/explicit-enum.stderr
index 611df047cff..062f5d5e9a7 100644
--- a/src/test/ui/rfc-2093-infer-outlives/explicit-enum.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/explicit-enum.stderr
@@ -6,7 +6,7 @@ LL | |     One(Bar<'a, U>)
 LL | | }
    | |_^
    |
-   = note: U : 'a
+   = note: U: 'a
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-projection.stderr b/src/test/ui/rfc-2093-infer-outlives/explicit-projection.stderr
index 8e9b158ab7c..a85aa3d7565 100644
--- a/src/test/ui/rfc-2093-infer-outlives/explicit-projection.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/explicit-projection.stderr
@@ -7,7 +7,7 @@ LL | |     foo: <A as Trait<'a, B>>::Type
 LL | | }
    | |_^
    |
-   = note: B : 'a
+   = note: B: 'a
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-struct.stderr b/src/test/ui/rfc-2093-infer-outlives/explicit-struct.stderr
index cbff2b777fe..309c54bb449 100644
--- a/src/test/ui/rfc-2093-infer-outlives/explicit-struct.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/explicit-struct.stderr
@@ -6,7 +6,7 @@ LL | |     bar: Bar<'b, U>
 LL | | }
    | |_^
    |
-   = note: U : 'b
+   = note: U: 'b
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-union.stderr b/src/test/ui/rfc-2093-infer-outlives/explicit-union.stderr
index 8aa246e8bfe..47c283faf50 100644
--- a/src/test/ui/rfc-2093-infer-outlives/explicit-union.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/explicit-union.stderr
@@ -6,7 +6,7 @@ LL | |     bar: Bar<'b, U>
 LL | | }
    | |_^
    |
-   = note: U : 'b
+   = note: U: 'b
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/infer-static.stderr b/src/test/ui/rfc-2093-infer-outlives/infer-static.stderr
index 106db765f7e..6fbb7cf4cb8 100644
--- a/src/test/ui/rfc-2093-infer-outlives/infer-static.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/infer-static.stderr
@@ -6,7 +6,7 @@ LL | |     bar: Bar<U>
 LL | | }
    | |_^
    |
-   = note: U : 'static
+   = note: U: 'static
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/nested-enum.stderr b/src/test/ui/rfc-2093-infer-outlives/nested-enum.stderr
index 6b143ba7eb9..10387f51b1e 100644
--- a/src/test/ui/rfc-2093-infer-outlives/nested-enum.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/nested-enum.stderr
@@ -7,7 +7,7 @@ LL | |     One(Bar<'a, T>)
 LL | | }
    | |_^
    |
-   = note: T : 'a
+   = note: T: 'a
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/nested-regions.stderr b/src/test/ui/rfc-2093-infer-outlives/nested-regions.stderr
index 4d8f7b7c8c4..ffdd5542bb4 100644
--- a/src/test/ui/rfc-2093-infer-outlives/nested-regions.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/nested-regions.stderr
@@ -6,9 +6,9 @@ LL | |     x: &'a &'b T
 LL | | }
    | |_^
    |
-   = note: 'b : 'a
-   = note: T : 'a
-   = note: T : 'b
+   = note: 'b: 'a
+   = note: T: 'a
+   = note: T: 'b
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/nested-structs.stderr b/src/test/ui/rfc-2093-infer-outlives/nested-structs.stderr
index 17d7c014e10..86bcbe640e4 100644
--- a/src/test/ui/rfc-2093-infer-outlives/nested-structs.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/nested-structs.stderr
@@ -6,7 +6,7 @@ LL | |     field1: Bar<'a, T>
 LL | | }
    | |_^
    |
-   = note: T : 'a
+   = note: T: 'a
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/nested-union.stderr b/src/test/ui/rfc-2093-infer-outlives/nested-union.stderr
index a42285a56d0..e0f248fa38a 100644
--- a/src/test/ui/rfc-2093-infer-outlives/nested-union.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/nested-union.stderr
@@ -6,7 +6,7 @@ LL | |     field1: Bar<'a, T>
 LL | | }
    | |_^
    |
-   = note: T : 'a
+   = note: T: 'a
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/projection.stderr b/src/test/ui/rfc-2093-infer-outlives/projection.stderr
index 8a91c44c580..3746bab4d54 100644
--- a/src/test/ui/rfc-2093-infer-outlives/projection.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/projection.stderr
@@ -6,7 +6,7 @@ LL | |     bar: &'a T::Item
 LL | | }
    | |_^
    |
-   = note: <T as std::iter::Iterator>::Item : 'a
+   = note: <T as std::iter::Iterator>::Item: 'a
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/reference.stderr b/src/test/ui/rfc-2093-infer-outlives/reference.stderr
index adb1c4a6290..d69aaf6f849 100644
--- a/src/test/ui/rfc-2093-infer-outlives/reference.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/reference.stderr
@@ -6,7 +6,7 @@ LL | |     bar: &'a T,
 LL | | }
    | |_^
    |
-   = note: T : 'a
+   = note: T: 'a
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/self-dyn.stderr b/src/test/ui/rfc-2093-infer-outlives/self-dyn.stderr
index 0be14a6956f..77577fe0945 100644
--- a/src/test/ui/rfc-2093-infer-outlives/self-dyn.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/self-dyn.stderr
@@ -7,7 +7,7 @@ LL | |     foo: Box<dyn Trait<'a, 'b, A>>
 LL | | }
    | |_^
    |
-   = note: A : 'a
+   = note: A: 'a
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2093-infer-outlives/self-structs.stderr b/src/test/ui/rfc-2093-infer-outlives/self-structs.stderr
index b32c9743e9e..b972ad84466 100644
--- a/src/test/ui/rfc-2093-infer-outlives/self-structs.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/self-structs.stderr
@@ -6,7 +6,7 @@ LL | |     field1: dyn Bar<'a, 'b, T>
 LL | | }
    | |_^
    |
-   = note: T : 'a
+   = note: T: 'a
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr b/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr
index 2f4b2df24cd..37cf6f89d67 100644
--- a/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr
+++ b/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr
@@ -22,19 +22,19 @@ error: Trait bound i32: Z does not depend on any type or lifetime parameters
 LL | fn global_projection() where i32: Z<S = i32> {}
    |                                   ^^^^^^^^^^
 
-error: Lifetime bound i32 : 'static does not depend on any type or lifetime parameters
+error: Lifetime bound i32: 'static does not depend on any type or lifetime parameters
   --> $DIR/trivial-bounds-lint.rs:29:34
    |
 LL | fn global_lifetimes() where i32: 'static, &'static str: 'static {}
    |                                  ^^^^^^^
 
-error: Lifetime bound &'static str : 'static does not depend on any type or lifetime parameters
+error: Lifetime bound &'static str: 'static does not depend on any type or lifetime parameters
   --> $DIR/trivial-bounds-lint.rs:29:57
    |
 LL | fn global_lifetimes() where i32: 'static, &'static str: 'static {}
    |                                                         ^^^^^^^
 
-error: Lifetime bound 'static : 'static does not depend on any type or lifetime parameters
+error: Lifetime bound 'static: 'static does not depend on any type or lifetime parameters
   --> $DIR/trivial-bounds-lint.rs:35:37
    |
 LL | fn global_outlives() where 'static: 'static {}