Interchange ^ and -
This commit is contained in:
parent
4bed5f0094
commit
ae92bd095c
6 changed files with 17 additions and 17 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue