Closed
Description
In the spirit of #32554:
crate A
:
pub trait Foo {
fn foo<T>();
}
pub struct Bar;
impl Foo for Bar {
fn foo<T>() { }
}
pub fn bar() {
Bar::foo::<Bar>();
}
crate B
:
extern crate A;
use A::*;
fn bar2() {
Bar::foo::<Bar>();
}
A.ll
:
define internal void @"_ZN27_$LT$Bar$u20$as$u20$Foo$GT$3foo17hde2cfe0cb82f67ddE"() unnamed_addr #0 !dbg !12 {
B.ll
:
define internal void @"_ZN33_$LT$A..Bar$u20$as$u20$A..Foo$GT$3foo17he9b727db8600b5deE"() unnamed_addr #0 !dbg !13 {
IOW, A
uses the encoding of <Bar as Foo>::foo
, while B
uses <A::Bar as A::Foo>::foo
. The issue seems to be that while symbol names correctly use ctxt::absolute_item_path_str
, that function indirectly calls ctxt::item_path_str
via e.g. TraitRef
's Display
implementation.