Skip to content

Commit 8718665

Browse files
committed
Interchange ^ and -
1 parent ae3feec commit 8718665

6 files changed

+17
-17
lines changed

src/librustc/infer/error_reporting/named_anon_conflict.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
8888

8989
if let Some(simple_name) = var.pat.simple_name() {
9090
struct_span_err!(self.tcx.sess,
91-
var.pat.span,
91+
span,
9292
E0611,
9393
"explicit lifetime required in the type of `{}`",
9494
simple_name)
@@ -101,7 +101,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
101101

102102
} else {
103103
struct_span_err!(self.tcx.sess,
104-
var.pat.span,
104+
span,
105105
E0611,
106106
"explicit lifetime required in parameter type")
107107
.span_label(var.pat.span,
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
error[E0611]: explicit lifetime required in the type of `x`
2-
--> $DIR/ex1-return-one-existing-name-if-else-2.rs:11:12
2+
--> $DIR/ex1-return-one-existing-name-if-else-2.rs:12:16
33
|
44
11 | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 {
5-
| ^ consider changing the type of `x` to `&'a i32`
5+
| - consider changing the type of `x` to `&'a i32`
66
12 | if x > y { x } else { y }
7-
| - lifetime `'a` required
7+
| ^ lifetime `'a` required
88

99
error: aborting due to previous error(s)
1010

Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
error[E0611]: explicit lifetime required in parameter type
2-
--> $DIR/ex1-return-one-existing-name-if-else-3.rs:11:12
2+
--> $DIR/ex1-return-one-existing-name-if-else-3.rs:12:27
33
|
44
11 | fn foo<'a>((x, y): (&'a i32, &i32)) -> &'a i32 {
5-
| ^^^^^^ consider changing type to `(&'a i32, &'a i32)`
5+
| ------ consider changing type to `(&'a i32, &'a i32)`
66
12 | if x > y { x } else { y }
7-
| - lifetime `'a` required
7+
| ^ lifetime `'a` required
88

99
error: aborting due to previous error(s)
1010

Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
error[E0611]: explicit lifetime required in the type of `y`
2-
--> $DIR/ex1-return-one-existing-name-if-else.rs:11:24
2+
--> $DIR/ex1-return-one-existing-name-if-else.rs:12:27
33
|
44
11 | fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 {
5-
| ^ consider changing the type of `y` to `&'a i32`
5+
| - consider changing the type of `y` to `&'a i32`
66
12 | if x > y { x } else { y }
7-
| - lifetime `'a` required
7+
| ^ lifetime `'a` required
88

99
error: aborting due to previous error(s)
1010

Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
error[E0611]: explicit lifetime required in the type of `x`
2-
--> $DIR/ex2a-push-one-existing-name-2.rs:15:12
2+
--> $DIR/ex2a-push-one-existing-name-2.rs:16:12
33
|
44
15 | fn foo<'a>(x: Ref<i32>, y: &mut Vec<Ref<'a, i32>>) {
5-
| ^ consider changing the type of `x` to `Ref<'a, i32>`
5+
| - consider changing the type of `x` to `Ref<'a, i32>`
66
16 | y.push(x);
7-
| - lifetime `'a` required
7+
| ^ lifetime `'a` required
88

99
error: aborting due to previous error(s)
1010

Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
error[E0611]: explicit lifetime required in the type of `y`
2-
--> $DIR/ex2a-push-one-existing-name.rs:15:39
2+
--> $DIR/ex2a-push-one-existing-name.rs:16:12
33
|
44
15 | fn foo<'a>(x: &mut Vec<Ref<'a, i32>>, y: Ref<i32>) {
5-
| ^ consider changing the type of `y` to `Ref<'a, i32>`
5+
| - consider changing the type of `y` to `Ref<'a, i32>`
66
16 | x.push(y);
7-
| - lifetime `'a` required
7+
| ^ lifetime `'a` required
88

99
error: aborting due to previous error(s)
1010

0 commit comments

Comments
 (0)