-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Make extern "rust-intrinsic" coerce to unsafe Rust functions #12633
Comments
This was referenced Feb 28, 2014
@pcwalton would rather make it impossible to take the value of intrinsics, which makes them more different from rust functions. |
Triage: no change |
I was trying to come up with some code to reproduce this, and here's what I had: pub fn main() {
unsafe {
let copy: unsafe extern "rust-intrinsic" fn(*const i32, *mut i32, usize) = std::intrinsics::copy;
let assign: unsafe fn(*const i32, *mut i32, usize) = std::mem::transmute(copy);
}
} This currently ICEs, and I filed #34123 with a smaller reproduction. |
brson
removed
the
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
label
Jun 28, 2016
Closing in favor of #34123 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In addition to #10725, this is one of the things blocking replacing things like
cast::transmute
with intrinsics. Although they are callable like other Rust functions they cannot be assigned to normal Rust functions.@nikomatsakis Interested in what you think.
The text was updated successfully, but these errors were encountered: