Closed
Description
Code
fn main() {
let a = 10;
let mut b;
unsafe {
std::ptr::copy_nonoverlapping(a.as_ptr(), b.as_mut_ptr(), std::mem::sizeof::<i32>());
}
}
Current output
use of deprecated module `std::intrinsics`: import this function via `std::mem` instead
Desired output
Either
use of deprecated module `std::intrinsics`: import this function via `std::ptr` instead
or
this function should be added into std::mem
module.
Rationale and extra context
No response
Other cases
Rust Version
rustc 1.86.0 (872aa6e349 2025-04-01)
binary: rustc
commit-hash: 872aa6e34902620b5f406a0cbef652085a3c54b1
commit-date: 2025-04-01
host: x86_64-unknown-linux-gnu
release: 1.86.0
LLVM version: 19.1.7
Anything else?
No response