-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Symbol names for generics are not stable across crates #32554
Comments
Interesting. |
I'm going to look into this a little... |
That might be the culprit: rust/src/librustc/ty/context.rs Line 437 in 641204a
pub fn crate_disambiguator(&self, cnum: ast::CrateNum) -> token::InternedString {
if cnum == LOCAL_CRATE {
self.sess.crate_disambiguator.get().as_str()
} else {
self.sess.cstore.crate_name(cnum)
}
} One at least... |
@michaelwoerister d'oh that looks like a copy-n-paste bug... On Tue, Mar 29, 2016 at 10:46 AM, Michael Woerister <
|
It does. I'm currently in the process of writing a test case for this. |
aren't these internal symbols anyway? |
@arielb1 Not necessarily when using multiple codegen units. And even otherwise, it's nice to have the same name across all crates. In theory, for a size-optimized build we might also want to switch to linkonce_odr or weak_odr linkage, in which case we'd also need the names to be the same. |
Fix typo in TxCtxt::crate_disambiguator() and add test case. r? @nikomatsakis Fixes #32554
Fix typo in TxCtxt::crate_disambiguator() and add test case. r? @nikomatsakis Fixes #32554
Given this:
cgu.rs
a.rs
We get two different symbol names for the monomorphizations of id.
cgu.ll
a.ll
cc @nikomatsakis @michaelwoerister
The text was updated successfully, but these errors were encountered: