1 error[E0605]: non-primitive cast: `Something` as `*const Something`
2 --> $DIR/issue-84213.rs:11:33
4 LL | let _pointer_to_something = something as *const Something;
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast
7 help: consider borrowing the value
9 LL | let _pointer_to_something = &something as *const Something;
12 error[E0605]: non-primitive cast: `Something` as `*mut Something`
13 --> $DIR/issue-84213.rs:14:37
15 LL | let _mut_pointer_to_something = something as *mut Something;
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast
18 help: consider borrowing the value
20 LL | let _mut_pointer_to_something = &mut something as *mut Something;
23 error: aborting due to 2 previous errors
25 For more information about this error, try `rustc --explain E0605`.