about summary refs log tree commit diff
path: root/tests/ui/suggestions/issue-102892.stderr
blob: 38f19b3321887b0986d107e23c25b336d0ebfac2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
error[E0308]: mismatched types
  --> $DIR/issue-102892.rs:16:26
   |
LL |     let (a, b): (A, B) = &**arc; // suggests putting `&**arc` here too
   |                 ------   ^^^^^^ expected `(A, B)`, found `&(A, B)`
   |                 |
   |                 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
  --> $DIR/issue-102892.rs:21:32
   |
LL |     let (a, b): ((A, B), A) = (&mut *mutation, &(**arc).0); // suggests putting `&**arc` here too
   |                                ^^^^^^^^^^^^^^ expected `(A, B)`, found `&mut (A, B)`
   |
   = 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
  --> $DIR/issue-102892.rs:21:48
   |
LL |     let (a, b): ((A, B), A) = (&mut *mutation, &(**arc).0); // suggests putting `&**arc` here too
   |                                                ^^^^^^^^^^ expected `A`, found `&A`
   |
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
   |                          +

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!
   |

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0308, E0507.
For more information about an error, try `rustc --explain E0308`.