Skip to content

Commit

Permalink
Interchange ^ and -
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurikholkar committed Jun 16, 2017
1 parent ae3feec commit 8718665
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/librustc/infer/error_reporting/named_anon_conflict.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, '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)
Expand All @@ -101,7 +101,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {

} else {
struct_span_err!(self.tcx.sess,
var.pat.span,
span,
E0611,
"explicit lifetime required in parameter type")
.span_label(var.pat.span,
Expand Down
Original file line number Diff line number Diff line change
@@ -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)

Original file line number Diff line number Diff line change
@@ -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)

Original file line number Diff line number Diff line change
@@ -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)

Original file line number Diff line number Diff line change
@@ -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<i32>, y: &mut Vec<Ref<'a, i32>>) {
| ^ 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)

Original file line number Diff line number Diff line change
@@ -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<Ref<'a, i32>>, y: Ref<i32>) {
| ^ 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)

0 comments on commit 8718665

Please sign in to comment.