2020-03-03 20:58:52 -06:00
|
|
|
error[E0409]: variable `a` is bound inconsistently across alternatives separated by `|`
|
2020-11-21 16:05:17 -06:00
|
|
|
--> $DIR/inconsistent-modes.rs:6:26
|
2019-09-01 16:24:07 -05:00
|
|
|
|
|
2021-02-12 18:04:37 -06:00
|
|
|
LL | let (Ok(a) | Err(ref a)): Result<&u8, u8> = Ok(&0);
|
|
|
|
| - ^ bound in different ways
|
|
|
|
| |
|
|
|
|
| first binding
|
2019-09-01 16:24:07 -05:00
|
|
|
|
2020-03-03 20:58:52 -06:00
|
|
|
error[E0409]: variable `a` is bound inconsistently across alternatives separated by `|`
|
2020-11-21 16:05:17 -06:00
|
|
|
--> $DIR/inconsistent-modes.rs:8:30
|
2019-09-01 16:24:07 -05:00
|
|
|
|
|
2021-02-12 18:04:37 -06:00
|
|
|
LL | let (Ok(ref mut a) | Err(a)): Result<u8, &mut u8> = Ok(0);
|
|
|
|
| - ^ bound in different ways
|
|
|
|
| |
|
|
|
|
| first binding
|
2019-09-01 16:24:07 -05:00
|
|
|
|
2020-03-03 20:58:52 -06:00
|
|
|
error[E0409]: variable `a` is bound inconsistently across alternatives separated by `|`
|
2020-11-21 16:05:17 -06:00
|
|
|
--> $DIR/inconsistent-modes.rs:10:34
|
2019-09-01 16:24:07 -05:00
|
|
|
|
|
2021-02-12 18:04:37 -06:00
|
|
|
LL | let (Ok(ref a) | Err(ref mut a)): Result<&u8, &mut u8> = Ok(&0);
|
|
|
|
| - first binding ^ bound in different ways
|
2019-09-01 16:24:07 -05:00
|
|
|
|
2020-03-03 20:58:52 -06:00
|
|
|
error[E0409]: variable `a` is bound inconsistently across alternatives separated by `|`
|
2020-11-21 16:05:17 -06:00
|
|
|
--> $DIR/inconsistent-modes.rs:13:40
|
2019-09-01 16:24:07 -05:00
|
|
|
|
|
2021-02-12 18:04:37 -06:00
|
|
|
LL | let (Ok((ref a, b)) | Err((ref mut a, ref b))) = Ok((0, &0));
|
|
|
|
| - first binding ^ bound in different ways
|
2019-09-01 16:24:07 -05:00
|
|
|
|
2020-03-03 20:58:52 -06:00
|
|
|
error[E0409]: variable `b` is bound inconsistently across alternatives separated by `|`
|
2020-11-21 16:05:17 -06:00
|
|
|
--> $DIR/inconsistent-modes.rs:13:47
|
2019-09-01 16:24:07 -05:00
|
|
|
|
|
2021-02-12 18:04:37 -06:00
|
|
|
LL | let (Ok((ref a, b)) | Err((ref mut a, ref b))) = Ok((0, &0));
|
|
|
|
| - first binding ^ bound in different ways
|
2019-09-01 16:24:07 -05:00
|
|
|
|
2020-03-03 20:58:52 -06:00
|
|
|
error[E0409]: variable `a` is bound inconsistently across alternatives separated by `|`
|
2020-11-21 16:05:17 -06:00
|
|
|
--> $DIR/inconsistent-modes.rs:19:39
|
2019-09-01 16:24:07 -05:00
|
|
|
|
|
2021-02-12 18:04:37 -06:00
|
|
|
LL | let (Ok(Ok(a) | Err(a)) | Err(ref a)) = Err(0);
|
|
|
|
| - ^ bound in different ways
|
|
|
|
| |
|
|
|
|
| first binding
|
2019-09-01 16:24:07 -05:00
|
|
|
|
2020-03-03 20:58:52 -06:00
|
|
|
error[E0409]: variable `a` is bound inconsistently across alternatives separated by `|`
|
2020-11-21 16:05:17 -06:00
|
|
|
--> $DIR/inconsistent-modes.rs:23:34
|
2019-09-01 16:24:07 -05:00
|
|
|
|
|
2021-02-12 18:04:37 -06:00
|
|
|
LL | let (Ok([Ok((Ok(ref a) | Err(a),)) | Err(a)]) | Err(a)) = Err(&1);
|
|
|
|
| - ^ bound in different ways
|
|
|
|
| |
|
|
|
|
| first binding
|
2019-09-01 16:24:07 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2020-11-21 16:05:17 -06:00
|
|
|
--> $DIR/inconsistent-modes.rs:10:26
|
2019-09-01 16:24:07 -05:00
|
|
|
|
|
2021-02-12 18:04:37 -06:00
|
|
|
LL | let (Ok(ref a) | Err(ref mut a)): Result<&u8, &mut u8> = Ok(&0);
|
|
|
|
| ----- ^^^^^^^^^ -------------------- expected due to this
|
|
|
|
| | |
|
|
|
|
| | types differ in mutability
|
|
|
|
| first introduced with type `&&u8` here
|
2019-09-01 16:24:07 -05:00
|
|
|
|
|
2022-04-17 14:00:32 -05:00
|
|
|
= note: expected reference `&&u8`
|
|
|
|
found mutable reference `&mut &mut u8`
|
2020-02-24 22:30:43 -06:00
|
|
|
= note: a binding must have the same type in all alternatives
|
2019-09-01 16:24:07 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2020-11-21 16:05:17 -06:00
|
|
|
--> $DIR/inconsistent-modes.rs:13:32
|
2019-09-01 16:24:07 -05:00
|
|
|
|
|
2021-02-12 18:04:37 -06:00
|
|
|
LL | let (Ok((ref a, b)) | Err((ref mut a, ref b))) = Ok((0, &0));
|
2021-12-15 17:16:21 -06:00
|
|
|
| ----- ^^^^^^^^^ ----------- this expression has type `Result<({integer}, &{integer}), (_, _)>`
|
|
|
|
| | |
|
|
|
|
| | types differ in mutability
|
2021-02-12 18:04:37 -06:00
|
|
|
| first introduced with type `&{integer}` here
|
2019-09-01 16:24:07 -05:00
|
|
|
|
|
2022-04-17 14:00:32 -05:00
|
|
|
= note: expected reference `&{integer}`
|
|
|
|
found mutable reference `&mut _`
|
2020-02-24 22:30:43 -06:00
|
|
|
= note: a binding must have the same type in all alternatives
|
2019-09-01 16:24:07 -05: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`.
|