Use fragment instead of side channel for prim. assoc. items
I had the epiphany that now that fragments are "semantic" -- rather than just strings -- they fill the role that used to be handled by the side channel. I think I may be able to get rid of the other uses of the side channel using this technique too.
This commit is contained in:
parent
7e3132adb3
commit
1064003f8c
@ -1353,7 +1353,9 @@ impl LinkCollector<'_, '_> {
|
||||
|
||||
match res {
|
||||
Res::Primitive(prim) => {
|
||||
if let Some((kind, id)) = self.kind_side_channel.take() {
|
||||
if let Some(UrlFragment::Def(_, id)) = fragment {
|
||||
let kind = self.cx.tcx.def_kind(id);
|
||||
|
||||
// We're actually resolving an associated item of a primitive, so we need to
|
||||
// verify the disambiguator (if any) matches the type of the associated item.
|
||||
// This case should really follow the same flow as the `Res::Def` branch below,
|
||||
|
Loading…
x
Reference in New Issue
Block a user