2022-10-12 04:07:30 -05:00
|
|
|
error[E0308]: mismatched types
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/issue-102892.rs:16:26
|
2022-10-12 04:07:30 -05:00
|
|
|
|
|
|
|
|
LL | let (a, b): (A, B) = &**arc; // suggests putting `&**arc` here too
|
2023-01-02 20:00:33 -06:00
|
|
|
| ------ ^^^^^^ expected `(A, B)`, found `&(A, B)`
|
2022-10-12 04:07:30 -05:00
|
|
|
| |
|
|
|
|
| expected due to this
|
|
|
|
|
|
|
|
|
= note: expected tuple `(A, B)`
|
|
|
|
found reference `&(A, B)`
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
|
|
|
|
LL - let (a, b): (A, B) = &**arc; // suggests putting `&**arc` here too
|
|
|
|
LL + let (a, b): (A, B) = **arc; // suggests putting `&**arc` here too
|
|
|
|
|
|
|
|
|
help: alternatively, consider changing the type annotation
|
|
|
|
|
|
|
|
|
LL | let (a, b): &(A, B) = &**arc; // suggests putting `&**arc` here too
|
|
|
|
| +
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/issue-102892.rs:21:32
|
2022-10-12 04:07:30 -05:00
|
|
|
|
|
|
|
|
LL | let (a, b): ((A, B), A) = (&mut *mutation, &(**arc).0); // suggests putting `&**arc` here too
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^^ expected `(A, B)`, found `&mut (A, B)`
|
2022-10-12 04:07:30 -05:00
|
|
|
|
|
|
|
|
= note: expected tuple `(A, B)`
|
|
|
|
found mutable reference `&mut (A, B)`
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
|
|
|
|
LL - let (a, b): ((A, B), A) = (&mut *mutation, &(**arc).0); // suggests putting `&**arc` here too
|
|
|
|
LL + let (a, b): ((A, B), A) = (*mutation, &(**arc).0); // suggests putting `&**arc` here too
|
|
|
|
|
|
|
|
|
help: alternatively, consider changing the type annotation
|
|
|
|
|
|
|
|
|
LL | let (a, b): (&mut (A, B), A) = (&mut *mutation, &(**arc).0); // suggests putting `&**arc` here too
|
|
|
|
| ++++
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2024-02-01 16:45:00 -06:00
|
|
|
--> $DIR/issue-102892.rs:21:48
|
2022-10-12 04:07:30 -05:00
|
|
|
|
|
|
|
|
LL | let (a, b): ((A, B), A) = (&mut *mutation, &(**arc).0); // suggests putting `&**arc` here too
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^ expected `A`, found `&A`
|
2022-10-12 04:07:30 -05:00
|
|
|
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
|
|
|
|
LL - let (a, b): ((A, B), A) = (&mut *mutation, &(**arc).0); // suggests putting `&**arc` here too
|
|
|
|
LL + let (a, b): ((A, B), A) = (&mut *mutation, (**arc).0); // suggests putting `&**arc` here too
|
|
|
|
|
|
|
|
|
help: alternatively, consider changing the type annotation
|
|
|
|
|
|
|
|
|
LL | let (a, b): ((A, B), &A) = (&mut *mutation, &(**arc).0); // suggests putting `&**arc` here too
|
|
|
|
| +
|
|
|
|
|
2024-03-11 16:28:16 -05:00
|
|
|
error[E0507]: cannot move out of an `Arc`
|
|
|
|
--> $DIR/issue-102892.rs:11:18
|
|
|
|
|
|
|
|
|
LL | let (a, b) = **arc; // suggests putting `&**arc` here; with that, fixed!
|
|
|
|
| - - ^^^^^
|
|
|
|
| | |
|
|
|
|
| | ...and here
|
|
|
|
| data moved here
|
|
|
|
|
|
|
|
|
= note: move occurs because these variables have types that don't implement the `Copy` trait
|
|
|
|
help: consider removing the dereference here
|
|
|
|
|
|
|
|
|
LL - let (a, b) = **arc; // suggests putting `&**arc` here; with that, fixed!
|
|
|
|
LL + let (a, b) = *arc; // suggests putting `&**arc` here; with that, fixed!
|
|
|
|
|
|
|
|
|
|
2024-02-01 16:45:00 -06:00
|
|
|
error: aborting due to 4 previous errors
|
2022-10-12 04:07:30 -05:00
|
|
|
|
2024-02-01 16:45:00 -06:00
|
|
|
Some errors have detailed explanations: E0308, E0507.
|
|
|
|
For more information about an error, try `rustc --explain E0308`.
|