about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-09-12 17:21:53 -0400
committerNiko Matsakis <niko@alum.mit.edu>2017-09-26 11:55:53 -0400
commit9e4649ebf80679090786074c020d3d2e2c0e8a84 (patch)
treef6dba259f2ea8c85124b15226cd8f56f9e6e5d0b /src
parentd7bb575b063d10d3dcc4de5facb7453c419d3086 (diff)
remove random newlines from error messages, fix compile-fail test
That kind of formatting seems like the job of other code.
Diffstat (limited to 'src')
-rw-r--r--src/librustc/infer/error_reporting/different_lifetimes.rs8
-rw-r--r--src/test/compile-fail/object-lifetime-default-mybox.rs2
-rw-r--r--src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr3
-rw-r--r--src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr3
-rw-r--r--src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr3
-rw-r--r--src/test/ui/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr3
-rw-r--r--src/test/ui/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr3
7 files changed, 10 insertions, 15 deletions
diff --git a/src/librustc/infer/error_reporting/different_lifetimes.rs b/src/librustc/infer/error_reporting/different_lifetimes.rs
index 5ae5568ff71..ee30db26255 100644
--- a/src/librustc/infer/error_reporting/different_lifetimes.rs
+++ b/src/librustc/infer/error_reporting/different_lifetimes.rs
@@ -114,15 +114,15 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
             (Some(ret_span), _) => {
                 (ty_sub.span,
                  ret_span,
-                 format!("this parameter and the return type are declared
-                  with different lifetimes...",),
+                 format!("this parameter and the return type are declared \
+                          with different lifetimes...",),
                  format!("...but data{} is returned here", span_label_var1))
             }
             (_, Some(ret_span)) => {
                 (ty_sup.span,
                  ret_span,
-                 format!("this parameter and the return type are declared
-                  with different lifetimes...",),
+                 format!("this parameter and the return type are declared \
+                          with different lifetimes...",),
                  format!("...but data{} is returned here", span_label_var1))
             }
         };
diff --git a/src/test/compile-fail/object-lifetime-default-mybox.rs b/src/test/compile-fail/object-lifetime-default-mybox.rs
index 014b0c1e80e..54657e76e97 100644
--- a/src/test/compile-fail/object-lifetime-default-mybox.rs
+++ b/src/test/compile-fail/object-lifetime-default-mybox.rs
@@ -34,7 +34,7 @@ fn load1<'a,'b>(a: &'a MyBox<SomeTrait>,
                 b: &'b MyBox<SomeTrait>)
                 -> &'b MyBox<SomeTrait>
 {
-    a //~ ERROR E0312
+    a //~ ERROR lifetime mismatch
 }
 
 fn load2<'a>(ss: &MyBox<SomeTrait+'a>) -> MyBox<SomeTrait+'a> {
diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr
index 311433b828c..cb9a1edf1dd 100644
--- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr
+++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr
@@ -4,8 +4,7 @@ error[E0623]: lifetime mismatch
 19 |     fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 {
    |                   ----                 -------
    |                   |
-   |                   this parameter and the return type are declared
-                  with different lifetimes...
+   |                   this parameter and the return type are declared with different lifetimes...
 20 | 
 21 |         if x > y { x } else { y }
    |                    ^ ...but data from `x` is returned here
diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr
index a187ed3160b..8af6acc62c4 100644
--- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr
+++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr
@@ -4,8 +4,7 @@ error[E0623]: lifetime mismatch
 16 |   fn foo<'a>(&self, x: &'a i32) -> &i32 {
    |                        -------     ----
    |                        |
-   |                        this parameter and the return type are declared
-                  with different lifetimes...
+   |                        this parameter and the return type are declared with different lifetimes...
 17 | 
 18 |     x
    |     ^ ...but data from `x` is returned here
diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr
index 67574f422a3..c09de0c33af 100644
--- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr
+++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr
@@ -4,8 +4,7 @@ error[E0623]: lifetime mismatch
 16 |     fn foo<'a>(&self, x: &'a Foo) -> &'a Foo {
    |                -----                 -------
    |                |
-   |                this parameter and the return type are declared
-                  with different lifetimes...
+   |                this parameter and the return type are declared with different lifetimes...
 17 | 
 18 |         if true { x } else { self }
    |                              ^^^^ ...but data from `self` is returned here
diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr
index 1ea2a4ff8ad..1409b216133 100644
--- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr
+++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr
@@ -4,8 +4,7 @@ error[E0623]: lifetime mismatch
 16 |   fn foo<'a>(&self, x: &i32) -> &i32 {
    |                        ----     ----
    |                        |
-   |                        this parameter and the return type are declared
-                  with different lifetimes...
+   |                        this parameter and the return type are declared with different lifetimes...
 17 |     x
    |     ^ ...but data from `x` is returned here
 
diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr
index 316b76c6460..cae45023e26 100644
--- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr
+++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr
@@ -4,8 +4,7 @@ error[E0623]: lifetime mismatch
 16 |     fn foo<'a>(&self, x: &Foo) -> &Foo {
    |                          ----     ----
    |                          |
-   |                          this parameter and the return type are declared
-                  with different lifetimes...
+   |                          this parameter and the return type are declared with different lifetimes...
 17 |         if true { x } else { self }
    |                   ^ ...but data from `x` is returned here