From ae92bd095c16c3aa14b986b089a1ded8df4c8369 Mon Sep 17 00:00:00 2001 From: gaurikholkar Date: Thu, 15 Jun 2017 13:53:49 -0700 Subject: [PATCH] Interchange ^ and - --- src/librustc/infer/error_reporting/named_anon_conflict.rs | 4 ++-- .../ex1-return-one-existing-name-if-else-2.stderr | 6 +++--- .../ex1-return-one-existing-name-if-else-3.stderr | 6 +++--- .../ex1-return-one-existing-name-if-else.stderr | 6 +++--- .../ui/lifetime-errors/ex2a-push-one-existing-name-2.stderr | 6 +++--- .../ui/lifetime-errors/ex2a-push-one-existing-name.stderr | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/librustc/infer/error_reporting/named_anon_conflict.rs b/src/librustc/infer/error_reporting/named_anon_conflict.rs index d48cb398ec2..77af2216910 100644 --- a/src/librustc/infer/error_reporting/named_anon_conflict.rs +++ b/src/librustc/infer/error_reporting/named_anon_conflict.rs @@ -88,7 +88,7 @@ pub fn report_named_anon_conflict(&self, error: &RegionResolutionError<'tcx>) -> if let Some(simple_name) = var.pat.simple_name() { struct_span_err!(self.tcx.sess, - var.pat.span, + span, E0611, "explicit lifetime required in the type of `{}`", simple_name) @@ -101,7 +101,7 @@ pub fn report_named_anon_conflict(&self, error: &RegionResolutionError<'tcx>) -> } else { struct_span_err!(self.tcx.sess, - var.pat.span, + span, E0611, "explicit lifetime required in parameter type") .span_label(var.pat.span, diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr index a04a9461eb4..ada7af8c1e4 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr @@ -1,10 +1,10 @@ error[E0611]: explicit lifetime required in the type of `x` - --> $DIR/ex1-return-one-existing-name-if-else-2.rs:11:12 + --> $DIR/ex1-return-one-existing-name-if-else-2.rs:12:16 | 11 | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { - | ^ consider changing the type of `x` to `&'a i32` + | - consider changing the type of `x` to `&'a i32` 12 | if x > y { x } else { y } - | - lifetime `'a` required + | ^ lifetime `'a` required error: aborting due to previous error(s) diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr index 143021cbbdd..58aab711394 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr @@ -1,10 +1,10 @@ error[E0611]: explicit lifetime required in parameter type - --> $DIR/ex1-return-one-existing-name-if-else-3.rs:11:12 + --> $DIR/ex1-return-one-existing-name-if-else-3.rs:12:27 | 11 | fn foo<'a>((x, y): (&'a i32, &i32)) -> &'a i32 { - | ^^^^^^ consider changing type to `(&'a i32, &'a i32)` + | ------ consider changing type to `(&'a i32, &'a i32)` 12 | if x > y { x } else { y } - | - lifetime `'a` required + | ^ lifetime `'a` required error: aborting due to previous error(s) diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr index 84f166dfa30..837fa141bf1 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr @@ -1,10 +1,10 @@ error[E0611]: explicit lifetime required in the type of `y` - --> $DIR/ex1-return-one-existing-name-if-else.rs:11:24 + --> $DIR/ex1-return-one-existing-name-if-else.rs:12:27 | 11 | fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 { - | ^ consider changing the type of `y` to `&'a i32` + | - consider changing the type of `y` to `&'a i32` 12 | if x > y { x } else { y } - | - lifetime `'a` required + | ^ lifetime `'a` required error: aborting due to previous error(s) diff --git a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-2.stderr b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-2.stderr index 61e97dc2bcd..a16dac672ae 100644 --- a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-2.stderr +++ b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-2.stderr @@ -1,10 +1,10 @@ error[E0611]: explicit lifetime required in the type of `x` - --> $DIR/ex2a-push-one-existing-name-2.rs:15:12 + --> $DIR/ex2a-push-one-existing-name-2.rs:16:12 | 15 | fn foo<'a>(x: Ref, y: &mut Vec>) { - | ^ consider changing the type of `x` to `Ref<'a, i32>` + | - consider changing the type of `x` to `Ref<'a, i32>` 16 | y.push(x); - | - lifetime `'a` required + | ^ lifetime `'a` required error: aborting due to previous error(s) diff --git a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr index 51d86a1f964..537090aa67d 100644 --- a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr +++ b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr @@ -1,10 +1,10 @@ error[E0611]: explicit lifetime required in the type of `y` - --> $DIR/ex2a-push-one-existing-name.rs:15:39 + --> $DIR/ex2a-push-one-existing-name.rs:16:12 | 15 | fn foo<'a>(x: &mut Vec>, y: Ref) { - | ^ consider changing the type of `y` to `Ref<'a, i32>` + | - consider changing the type of `y` to `Ref<'a, i32>` 16 | x.push(y); - | - lifetime `'a` required + | ^ lifetime `'a` required error: aborting due to previous error(s)