-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline asm: *const [type error]
does not implement the Copy trait
#113788
Comments
Just needs someone to suppress this error if the type |
@rustbot assign |
@rustbot claim |
@rustbot claim |
@Kyuuhachi @compiler-errors With that said, I have potentially setup the necessary pre-requisites and compiler infrastructure in my local machine, also re confirmed by using the Like any other contribution, I figured that in Until now, I have found the following // Check that the type implements Copy. The only case where this can
// possibly fail is for SIMD types which don't #[derive(Copy)].
if !ty.is_copy_modulo_regions(self.tcx, self.param_env) {
let msg = "arguments for inline assembly must be copyable";
let mut err = self.tcx.sess.struct_span_err(expr.span, msg);
err.note(format!("`{ty}` does not implement the Copy trait"));
err.emit();
} Would be great if one could point out any points I may have missed out! |
@rustbot claim |
Code
Current output
Desired output
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.The text was updated successfully, but these errors were encountered: