From cb93cc62999eda4145a878f26e3fe912b2dcbb22 Mon Sep 17 00:00:00 2001 From: gaurikholkar Date: Sat, 29 Jul 2017 17:37:05 +0530 Subject: [PATCH] changing E0623 error message --- src/librustc/infer/error_reporting/anon_anon_conflict.rs | 4 ++-- .../ui/lifetime-errors/ex3-both-anon-regions-2.stderr | 4 ++-- .../ui/lifetime-errors/ex3-both-anon-regions-3.stderr | 4 ++-- .../ui/lifetime-errors/ex3-both-anon-regions-4.stderr | 8 ++++---- src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/librustc/infer/error_reporting/anon_anon_conflict.rs b/src/librustc/infer/error_reporting/anon_anon_conflict.rs index 1017f2bd0e6e7..2e91096881815 100644 --- a/src/librustc/infer/error_reporting/anon_anon_conflict.rs +++ b/src/librustc/infer/error_reporting/anon_anon_conflict.rs @@ -77,10 +77,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { struct_span_err!(self.tcx.sess, span, E0623, "lifetime mismatch") .span_label(ty1.span, - format!("these references must have the same lifetime")) + format!("these references are not declared with the same lifetime...")) .span_label(ty2.span, format!("")) .span_label(span, - format!("data{}flows{}here", span_label_var1, span_label_var2)) + format!("...but data{}flows{}here", span_label_var1, span_label_var2)) .emit(); } else { return false; diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-2.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-2.stderr index 8dd906afdc4e7..4c878f3c0dc03 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-2.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-2.stderr @@ -2,9 +2,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-2.rs:12:9 | 11 | fn foo((v, w): (&u8, &u8), x: &u8) { - | --- --- these references must have the same lifetime + | --- --- these references are not declared with the same lifetime... 12 | v = x; - | ^ data from `x` flows here + | ^ ...but data from `x` flows here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-3.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-3.stderr index 66c3ca45499b6..08506b8befa03 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-3.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-3.stderr @@ -2,9 +2,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-3.rs:12:9 | 11 | fn foo((v, w): (&u8, &u8), (x, y): (&u8, &u8)) { - | --- --- these references must have the same lifetime + | --- --- these references are not declared with the same lifetime... 12 | v = x; - | ^ data flows here + | ^ ...but data flows here error: aborting due to previous error diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-4.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-4.stderr index b969797b37440..9c2630fc81143 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-4.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-4.stderr @@ -4,17 +4,17 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-4.rs:12:13 | 11 | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { - | --- --- these references must have the same lifetime + | --- --- these references are not declared with the same lifetime... 12 | z.push((x,y)); - | ^ data flows into `z` here + | ^ ...but data flows into `z` here error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions-4.rs:12:15 | 11 | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { - | --- --- these references must have the same lifetime + | --- --- these references are not declared with the same lifetime... 12 | z.push((x,y)); - | ^ data flows into `z` here + | ^ ...but data flows into `z` here error: aborting due to 3 previous errors diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr index e38e2ef07ad87..a183d1fffc0b6 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions.stderr @@ -2,9 +2,9 @@ error[E0623]: lifetime mismatch --> $DIR/ex3-both-anon-regions.rs:12:12 | 11 | fn foo(x: &mut Vec<&u8>, y: &u8) { - | --- --- these references must have the same lifetime + | --- --- these references are not declared with the same lifetime... 12 | x.push(y); - | ^ data from `y` flows into `x` here + | ^ ...but data from `y` flows into `x` here error: aborting due to previous error