2019-09-01 23:24:07 +02:00
|
|
|
error[E0409]: variable `a` is bound in inconsistent ways within the same match arm
|
2019-12-27 12:03:03 +00:00
|
|
|
--> $DIR/inconsistent-modes.rs:7:25
|
2019-09-01 23:24:07 +02:00
|
|
|
|
|
|
|
|
LL | let Ok(a) | Err(ref a): Result<&u8, u8> = Ok(&0);
|
|
|
|
| - ^ bound in different ways
|
|
|
|
| |
|
|
|
|
| first binding
|
|
|
|
|
|
|
|
error[E0409]: variable `a` is bound in inconsistent ways within the same match arm
|
2019-12-27 12:03:03 +00:00
|
|
|
--> $DIR/inconsistent-modes.rs:9:29
|
2019-09-01 23:24:07 +02:00
|
|
|
|
|
|
|
|
LL | let Ok(ref mut a) | Err(a): Result<u8, &mut u8> = Ok(0);
|
|
|
|
| - ^ bound in different ways
|
|
|
|
| |
|
|
|
|
| first binding
|
|
|
|
|
|
|
|
error[E0409]: variable `a` is bound in inconsistent ways within the same match arm
|
2019-12-27 12:03:03 +00:00
|
|
|
--> $DIR/inconsistent-modes.rs:11:33
|
2019-09-01 23:24:07 +02:00
|
|
|
|
|
|
|
|
LL | let Ok(ref a) | Err(ref mut a): Result<&u8, &mut u8> = Ok(&0);
|
|
|
|
| - first binding ^ bound in different ways
|
|
|
|
|
|
|
|
error[E0409]: variable `a` is bound in inconsistent ways within the same match arm
|
2019-12-27 12:03:03 +00:00
|
|
|
--> $DIR/inconsistent-modes.rs:14:39
|
2019-09-01 23:24:07 +02:00
|
|
|
|
|
|
|
|
LL | let Ok((ref a, b)) | Err((ref mut a, ref b)) = Ok((0, &0));
|
|
|
|
| - first binding ^ bound in different ways
|
|
|
|
|
|
|
|
error[E0409]: variable `b` is bound in inconsistent ways within the same match arm
|
2019-12-27 12:03:03 +00:00
|
|
|
--> $DIR/inconsistent-modes.rs:14:46
|
2019-09-01 23:24:07 +02:00
|
|
|
|
|
|
|
|
LL | let Ok((ref a, b)) | Err((ref mut a, ref b)) = Ok((0, &0));
|
|
|
|
| - first binding ^ bound in different ways
|
|
|
|
|
|
|
|
error[E0409]: variable `a` is bound in inconsistent ways within the same match arm
|
2019-12-27 12:03:03 +00:00
|
|
|
--> $DIR/inconsistent-modes.rs:20:38
|
2019-09-01 23:24:07 +02:00
|
|
|
|
|
|
|
|
LL | let Ok(Ok(a) | Err(a)) | Err(ref a) = Err(0);
|
|
|
|
| - ^ bound in different ways
|
|
|
|
| |
|
|
|
|
| first binding
|
|
|
|
|
|
|
|
error[E0409]: variable `a` is bound in inconsistent ways within the same match arm
|
2019-12-27 12:03:03 +00:00
|
|
|
--> $DIR/inconsistent-modes.rs:24:34
|
2019-09-01 23:24:07 +02:00
|
|
|
|
|
|
|
|
LL | let Ok([ Ok((Ok(ref a) | Err(a),)) | Err(a) ]) | Err(a) = Err(&1);
|
|
|
|
| - ^ bound in different ways
|
|
|
|
| |
|
|
|
|
| first binding
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2019-12-27 12:03:03 +00:00
|
|
|
--> $DIR/inconsistent-modes.rs:11:25
|
2019-09-01 23:24:07 +02:00
|
|
|
|
|
|
|
|
LL | let Ok(ref a) | Err(ref mut a): Result<&u8, &mut u8> = Ok(&0);
|
2020-02-25 05:30:43 +01:00
|
|
|
| ----- ^^^^^^^^^ -------------------- expected due to this
|
|
|
|
| | |
|
|
|
|
| | types differ in mutability
|
|
|
|
| first introduced with type `&&u8` here
|
2019-09-01 23:24:07 +02:00
|
|
|
|
|
|
|
|
= note: expected type `&&u8`
|
|
|
|
found type `&mut &mut u8`
|
2020-02-25 05:30:43 +01:00
|
|
|
= note: a binding must have the same type in all alternatives
|
2019-09-01 23:24:07 +02:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2019-12-27 12:03:03 +00:00
|
|
|
--> $DIR/inconsistent-modes.rs:14:31
|
2019-09-01 23:24:07 +02:00
|
|
|
|
|
|
|
|
LL | let Ok((ref a, b)) | Err((ref mut a, ref b)) = Ok((0, &0));
|
2020-02-25 05:30:43 +01:00
|
|
|
| ----- ^^^^^^^^^ ----------- this expression has type `std::result::Result<({integer}, &{integer}), (_, _)>`
|
|
|
|
| | |
|
|
|
|
| | types differ in mutability
|
|
|
|
| first introduced with type `&{integer}` here
|
2019-09-01 23:24:07 +02:00
|
|
|
|
|
|
|
|
= note: expected type `&{integer}`
|
|
|
|
found type `&mut _`
|
2020-02-25 05:30:43 +01:00
|
|
|
= note: a binding must have the same type in all alternatives
|
2019-09-01 23:24:07 +02:00
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
|
|
|
|
|
|
|
Some errors have detailed explanations: E0308, E0409.
|
|
|
|
For more information about an error, try `rustc --explain E0308`.
|