File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1193,6 +1193,14 @@ impl LinkCollector<'_, '_> {
11931193 match res {
11941194 Res :: Primitive ( _) => {
11951195 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.
11961204 verify ( kind, id) ?;
11971205 } else {
11981206 match disambiguator {
You can’t perform that action at this time.
0 commit comments