summaryrefslogtreecommitdiffstats
path: root/src/test/ui/cast/issue-84213.stderr
blob: 025970e54c84ad58abe70e07edf22c4ab3decd3a (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[E0605]: non-primitive cast: `Something` as `*const Something`
  --> $DIR/issue-84213.rs:11:33
   |
LL |     let _pointer_to_something = something as *const Something;
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast
   |
help: consider borrowing the value
   |
LL |     let _pointer_to_something = &something as *const Something;
   |                                 +

error[E0605]: non-primitive cast: `Something` as `*mut Something`
  --> $DIR/issue-84213.rs:14:37
   |
LL |     let _mut_pointer_to_something = something as *mut Something;
   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast
   |
help: consider borrowing the value
   |
LL |     let _mut_pointer_to_something = &mut something as *mut Something;
   |                                     ++++

error: aborting due to 2 previous errors

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