about summary refs log tree commit diff
path: root/tests/ui/suggestions/raw-to-ref.stderr
blob: ca358d268f018474af8df0ed46b9b301eaf09b5f (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
error[E0308]: mismatched types
  --> $DIR/raw-to-ref.rs:11:26
   |
LL |     let _: &S = unsafe { *x };
   |                          ^^ expected `&S`, found `S`
   |
help: consider borrowing here
   |
LL |     let _: &S = unsafe { &*x };
   |                          +

error[E0308]: mismatched types
  --> $DIR/raw-to-ref.rs:16:30
   |
LL |     let _: &mut S = unsafe { *x };
   |                              ^^ expected `&mut S`, found `S`
   |
help: consider mutably borrowing here
   |
LL |     let _: &mut S = unsafe { &mut *x };
   |                              ++++

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.