fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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