Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSymbol names for monomorphized trait impls are not stable across crates #32948
Comments
This comment has been minimized.
This comment has been minimized.
|
I think that calling |
This comment has been minimized.
This comment has been minimized.
|
If you look in |
This comment has been minimized.
This comment has been minimized.
|
@Kha Good catch. rust/src/librustc/ty/item_path.rs Line 221 in c9f1501 |
bluss
added
the
A-incr-comp
label
Apr 15, 2016
This comment has been minimized.
This comment has been minimized.
|
@michaelwoerister ah, I see, yes, that makes sense. I guess the problem is that we don't have a way to serialize type names that is cross-crate safe. We should try to keep the "spirit" of that rule working though since it'd be nice to get those paths in the symbol names. |
This comment has been minimized.
This comment has been minimized.
|
This should be fixed by @eddyb's metadata PR. |
This comment has been minimized.
This comment has been minimized.
|
Using a global variable, interesting... well, I didn't think of that solution |
This comment has been minimized.
This comment has been minimized.
|
@Kha It's just a thread-local at least |
This comment has been minimized.
This comment has been minimized.
|
I think we can improve on the situation by moving to a scheme where we dump types in a structured, but simpler, manner than the current printing logic, and then we can even reuse parts of C++ mangling schemes to get smaller symbols and cleaner |
This comment has been minimized.
This comment has been minimized.
|
@eddyb yes, please! |
This comment has been minimized.
This comment has been minimized.
|
This should be fixed since #33602 landed. |
michaelwoerister
added
the
E-needstest
label
Jun 28, 2016
nikomatsakis
added this to the
Incremental compilation alpha milestone
Jul 23, 2016
nikomatsakis
removed this from the
Incremental compilation alpha milestone
Aug 9, 2016
This comment has been minimized.
This comment has been minimized.
|
Removing from milestone since this is just needs-test now. |
This comment has been minimized.
This comment has been minimized.
|
Fixed by #36832. |
Kha commentedApr 14, 2016
In the spirit of #32554:
crate
A:crate
B:A.ll:B.ll:IOW,
Auses the encoding of<Bar as Foo>::foo, whileBuses<A::Bar as A::Foo>::foo. The issue seems to be that while symbol names correctly usectxt::absolute_item_path_str, that function indirectly callsctxt::item_path_strvia e.g.TraitRef'sDisplayimplementation.cc @nikomatsakis @michaelwoerister