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

Additional incorrect clashing_extern_decl warning for #[repr(transparent)] non-zero types #75739

Closed
jumbatm opened this issue Aug 20, 2020 · 1 comment · Fixed by #75885
Closed
Assignees

Comments

@jumbatm
Copy link
Contributor

jumbatm commented Aug 20, 2020

It seems that there is a case still not being fixed, when #[repr(transparent)] is used with non-zero types.

mod a {
    use std::num::NonZeroUsize;
    extern "C" {
        fn a() -> NonZeroUsize;
    }
}

mod b {
    #[repr(transparent)]
    struct X(NonZeroUsize);
    use std::num::NonZeroUsize;
    extern "C" {
        fn a() -> X;
    }
}

Originally posted by @nbdd0121 in #73735 (comment)

@jumbatm
Copy link
Contributor Author

jumbatm commented Aug 20, 2020

@rustbot claim

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Aug 27, 2020
…declarations-transparent-nonzero, r=lcnr

Fix another clashing_extern_declarations false positive.

Fixes rust-lang#75739.

Fix another clashing_extern_declarations false positive, this time for transparent newtype with a non-zero member.

r? @lcnr
pietroalbini added a commit to pietroalbini/rust that referenced this issue Aug 28, 2020
…declarations-transparent-nonzero, r=lcnr

Fix another clashing_extern_declarations false positive.

Fixes rust-lang#75739.

Fix another clashing_extern_declarations false positive, this time for transparent newtype with a non-zero member.

r? @lcnr
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Aug 29, 2020
…declarations-transparent-nonzero, r=lcnr

Fix another clashing_extern_declarations false positive.

Fixes rust-lang#75739.

Fix another clashing_extern_declarations false positive, this time for transparent newtype with a non-zero member.

r? @lcnr
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Aug 29, 2020
…declarations-transparent-nonzero, r=lcnr

Fix another clashing_extern_declarations false positive.

Fixes rust-lang#75739.

Fix another clashing_extern_declarations false positive, this time for transparent newtype with a non-zero member.

r? @lcnr
@bors bors closed this as completed in 5511e73 Aug 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant