]> git.lizzy.rs Git - rust.git/blob - src/test/ui/cast/issue-84213.stderr
Auto merge of #97191 - wesleywiser:main_thread_name, r=ChrisDenton
[rust.git] / src / test / ui / cast / issue-84213.stderr
1 error[E0605]: non-primitive cast: `Something` as `*const Something`
2   --> $DIR/issue-84213.rs:11:33
3    |
4 LL |     let _pointer_to_something = something as *const Something;
5    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast
6    |
7 help: consider borrowing the value
8    |
9 LL |     let _pointer_to_something = &something as *const Something;
10    |                                 +
11
12 error[E0605]: non-primitive cast: `Something` as `*mut Something`
13   --> $DIR/issue-84213.rs:14:37
14    |
15 LL |     let _mut_pointer_to_something = something as *mut Something;
16    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast
17    |
18 help: consider borrowing the value
19    |
20 LL |     let _mut_pointer_to_something = &mut something as *mut Something;
21    |                                     ++++
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0605`.