File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1193,6 +1193,14 @@ impl LinkCollector<'_, '_> {
1193
1193
match res {
1194
1194
Res :: Primitive ( _) => {
1195
1195
if let Some ( ( kind, id) ) = self . kind_side_channel . take ( ) {
1196
+ // We're actually resolving an associated item of a primitive, so we need to
1197
+ // verify the disambiguator (if any) matches the type of the associated item.
1198
+ // This case should really follow the same flow as the `Res::Def` branch below,
1199
+ // but attempting to add a call to `clean::register_res` causes an ICE. @jyn514
1200
+ // thinks `register_res` is only needed for cross-crate re-exports, but Rust
1201
+ // doesn't allow statements like `use str::trim;`, making this a (hopefully)
1202
+ // valid omission. See https://github.com/rust-lang/rust/pull/80660#discussion_r551585677
1203
+ // for discussion on the matter.
1196
1204
verify ( kind, id) ?;
1197
1205
} else {
1198
1206
match disambiguator {
You can’t perform that action at this time.
0 commit comments