Closed
Description
Code
fn main() {
let peb: *const PEB;
unsafe { std::arch::asm!("mov {0}, fs:[0x30]", out(reg) peb); }
}
Current output
error[E0412]: cannot find type `PEB` in this scope
--> src/main.rs:2:18
|
2 | let peb: *const PEB;
| ^^^ not found in this scope
error: arguments for inline assembly must be copyable
--> src/main.rs:3:49
|
3 | std::arch::asm!("mov {0}, fs:[0x30]", out(reg) peb);
| ^^^
|
= note: `*const [type error]` does not implement the Copy trait
For more information about this error, try `rustc --explain E0412`.
Desired output
Probably just omit the second error; no `Copy` error is given when moving an unknown type normally.
Rationale and extra context
No response
Other cases
No response
Anything else?
Happens on 1.73.0-nightly (2023-07-16 0e8e857b11f60a785aea)
, as well as several earlier versions.