-
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
Functions with an ABI set may be given the same symbol names. #26201
Comments
Triage: the error message as of 1.3 stable is: |
As @leodasvacas said, this no longer ICEs, so that label can be removed, though the diagnostic could be improved. |
This is also similar to #28870. |
Code like this should compile. |
I just discovered an easy workaround for this problem: make the function generic. Monomorphization uses a different code path for generating mangled names that isn't affected by this bug. So this macro causes mangled name conflicts when used multiple times within the same function:
But this macro is equivalent and works fine:
If someone is interested in fixing this bug: this is the stack trace that produces the colliding symbol name:
|
We now use the generic <DUMMY> hack to avoid duplicate extern "C" symbols. See rust-lang/rust#26201. py_module_initializer!() calls now need to manually concatenate the module name with the prefixes "init" and "PyInit_".
As of last night's nightly, this no longer ICEs. |
Specifically, if you have multiple inline functions with the same name, but in different scopes:
This results in an ICE:
The text was updated successfully, but these errors were encountered: