diff options
Diffstat (limited to 'tests/ui/cast/issue-84213.stderr')
-rw-r--r-- | tests/ui/cast/issue-84213.stderr | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/ui/cast/issue-84213.stderr b/tests/ui/cast/issue-84213.stderr new file mode 100644 index 000000000..025970e54 --- /dev/null +++ b/tests/ui/cast/issue-84213.stderr @@ -0,0 +1,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`. |