Skip to content
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

Debug implemented for __cdecl, but not for __stdcall #40158

Closed
Dushistov opened this issue Feb 28, 2017 · 2 comments
Closed

Debug implemented for __cdecl, but not for __stdcall #40158

Dushistov opened this issue Feb 28, 2017 · 2 comments
Labels
T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@Dushistov
Copy link
Contributor

rustc 1.17.0-nightly (60a0edc 2017-02-26)

Such code compiles fine:

#[repr(C)]
#[derive(Debug)]
pub struct JNINativeInterface_ {
    pub GetVersion: ::std::option::Option<unsafe extern "C" fn(env:
                                                                   *mut ::std::os::raw::c_void)
                                              -> ::std::os::raw::c_int>,
}

fn main() {
}

But if I change "C" to "stdcall" then:

error[E0277]: the trait bound unsafe extern "stdcall" fn(*mut std::os::raw::c_v oid) -> i32: std::fmt::Debug is not satisfied

@petrochenkov
Copy link
Contributor

The reason: #38848 (comment)

@steveklabnik steveklabnik added A-libs T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Mar 1, 2017
@jethrogb
Copy link
Contributor

Close this in favor of more general #40710?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants