aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/cfg/cfg_attr-type-mismatch.stderr
blob: 366d9c74cbde942273a83543622a56d7b85c865f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
error[E0308]: mismatched types
  --> tests/ui/cfg/cfg_attr-type-mismatch.rs:20:27
   |
20 |     let _: Pin<&mut u8> = x.f; //~ ERROR E0308
   |            ------------   ^^^ expected struct `Pin`, found `&mut u8`
   |            |
   |            expected due to this
   |
   = note:         expected struct `Pin<&mut u8>`
           found mutable reference `&mut u8`

error[E0308]: mismatched types
  --> tests/ui/cfg/cfg_attr-type-mismatch.rs:24:22
   |
24 |     let _: &mut u8 = x.f; //~ ERROR E0308
   |            -------   ^^^
   |            |         |
   |            |         expected `&mut u8`, found struct `Pin`
   |            |         help: consider mutably borrowing here: `&mut x.f`
   |            expected due to this
   |
   = note: expected mutable reference `&mut u8`
                         found struct `Pin<&mut u8>`