-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
pub use
in a cdylib crate does not re-export unused pub extern "C"
functions
#97714
Comments
I can't repro this on macOS with:
You should probably specify your versions etc |
I've reproduced it on two different linux environments (rust version has been added to the original report). |
This was at least supposedly fixed: #50007 Though there the symbol itself was reexported. |
Ok, I can confirm that this issue appears to be fixed when testing with rustc 1.63.0-nightly (4e725ba 2022-06-04). Hoping this will make it into a stable release sooner than later. |
Perhaps the issue description isn't exactly correct, but here's the gist:
Expected behavior: when a cdylib crate contains
pub use foo;
then anypub extern "C"
functions withinfoo
should be present in the generated dynamic library. This appears currently to not be the case.To reproduce:
(using cargo 1.61.0 (a028ae4 2022-04-29) and rustc 1.61.0 (fe5b13d 2022-05-18) on Linux, using stable-x86_64-unknown-linux-gnu toolchain)
Set up a folder-structure (with the shown file content) as follows:
Results:
The text was updated successfully, but these errors were encountered: