diff --git a/src/librustc/infer/error_reporting/different_lifetimes.rs b/src/librustc/infer/error_reporting/different_lifetimes.rs index 5ae5568ff711..ee30db262551 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 014b0c1e80e7..54657e76e970 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, b: &'b MyBox) -> &'b MyBox { - a //~ ERROR E0312 + a //~ ERROR lifetime mismatch } fn load2<'a>(ss: &MyBox) -> MyBox { 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 311433b828c3..cb9a1edf1ddf 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 a187ed3160b2..8af6acc62c43 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 67574f422a32..c09de0c33af7 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 1ea2a4ff8ad4..1409b2161330 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 316b76c64607..cae45023e26b 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