You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unnecessary improper_ctypes warning for extern "Rust" #64593
I would expect this sort of warning for an extern "C" declaration, but it seems incorrect for an extern "Rust" declaration. Am I misunderstanding something, or is this a warning that is safe to disable?
Error is pub struct Error(NonZeroU32); so both this and Result are not C types.
Also the &mut [u8] is not a C type either. The main issue seems to be that the compiler checks all extern declarations as if they were extern "C", which I don't think is right (but extern "Rust" isn't documented as much as extern "C").
Activity
dhardy commentedon Sep 20, 2019
For context, see: rust-random/getrandom#109
Errorispub struct Error(NonZeroU32);so both this andResultare not C types.josephlr commentedon Sep 20, 2019
Also the
&mut [u8]is not a C type either. The main issue seems to be that the compiler checks allexterndeclarations as if they wereextern "C", which I don't think is right (butextern "Rust"isn't documented as much asextern "C").cuviper commentedon Sep 20, 2019
There are instances of this in
liballocandlibcoretoo:rust/src/liballoc/alloc.rs
Lines 243 to 247 in 9ad1e7c
rust/src/libcore/panicking.rs
Lines 73 to 78 in 9ad1e7c
Rollup merge of rust-lang#64641 - cuviper:extern-rust-ctypes, r=estebank
Rollup merge of rust-lang#64641 - cuviper:extern-rust-ctypes, r=estebank
Rollup merge of rust-lang#64641 - cuviper:extern-rust-ctypes, r=estebank