rust/tests/ui/cast/issue-84213.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
939 B
Plaintext
Raw Normal View History

2021-04-15 21:17:44 +00:00
error[E0605]: non-primitive cast: `Something` as `*const Something`
--> $DIR/issue-84213.rs:11:33
2021-04-15 21:17:44 +00:00
|
LL | let _pointer_to_something = something as *const Something;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast
|
2021-05-06 00:09:02 +00:00
help: consider borrowing the value
2021-04-15 21:17:44 +00:00
|
LL | let _pointer_to_something = &something as *const Something;
| +
2021-04-15 21:17:44 +00:00
error[E0605]: non-primitive cast: `Something` as `*mut Something`
--> $DIR/issue-84213.rs:14:37
2021-04-15 21:17:44 +00:00
|
LL | let _mut_pointer_to_something = something as *mut Something;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast
|
2021-05-06 00:09:02 +00:00
help: consider borrowing the value
2021-04-15 21:17:44 +00:00
|
LL | let _mut_pointer_to_something = &mut something as *mut Something;
| ++++
2021-04-15 21:17:44 +00:00
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0605`.