Delete "nonconstructable" enums are "noncopyable" test

This commit is contained in:
mejrs 2025-04-29 15:50:58 +02:00
parent cb31a009e3
commit 1f2b71e072
2 changed files with 0 additions and 19 deletions

View file

@ -1,10 +0,0 @@
use std::ffi::c_void;
fn main() {
let x : *const Vec<isize> = &vec![1,2,3];
let y : *const c_void = x as *const c_void;
unsafe {
let _z = (*y).clone();
//~^ ERROR no method named `clone` found
}
}

View file

@ -1,9 +0,0 @@
error[E0599]: no method named `clone` found for enum `c_void` in the current scope
--> $DIR/non-copyable-void.rs:7:23
|
LL | let _z = (*y).clone();
| ^^^^^ method not found in `c_void`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0599`.