-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Linker error from symbols containing unevaluated const generics when generic_const_exprs is enabled #97186
Comments
I'd like to help tackle this but I'm not very familiar with compiler internals. Here's some logs that that might be interesting to diff. Produced with |
Output of Notably, there is a
|
@rustbot label +F-generic-const-exprs +T-compiler |
Added some debugging to rustc_symbol_mangling to look at how the hash is produced, and I noticed that SomeFoo::foo is getting hashed twice:
The first time, it is hashing an Relating this to the IR output from the same invocation - the hash with |
This seems to be more related to lazy normalization than generic_const_exprs specifically. Overriding |
Related to (probably a dupe of) #83972 |
Seems to be resolved by #100315 |
Minimal example:
(I know this snippet technically doesn't need
generic_const_exprs
, but it is needed in the code that this example was derived from. If I removegeneric_const_exprs
, this compiles and links without error.)When trying to compile this on nightly (cd282d7 2022-05-18), I get a linker error:
Meta
This may be related to #96699
I had originally tested this with other linkers (
mold
andavr-gcc
) and seen similar error messages, so it doesn't seem to be linker-specific.rustc --version --verbose
:The text was updated successfully, but these errors were encountered: