Change:
_ => unreachable!("not yet converted"), }; <del> let mut extra_attrs = Vec::new(); </del> <ins> let mut import_attrs = Vec::new(); let mut target_attrs = Vec::new(); </ins> if let Some(import_id) = import_id && let Some(hir::Node::Item(use_node)) = cx.tcx.hir().find_by_def_id(import_id) { let is_inline = inline::load_attrs(cx, import_id.to_def_id()).lists(sym::doc).get_word_attr(sym::inline).is_some(); // Then we get all the various imports' attributes. <del> get_all_import_attributes(use_node, cx.tcx, item.owner_id.def_id, &mut extra_attrs, is_inline); add_without_unwanted_attributes(&mut extra_attrs, inline::load_attrs(cx, def_id), is_inline); </del> <ins> get_all_import_attributes(use_node, cx.tcx, item.owner_id.def_id, &mut import_attrs, is_inline); add_without_unwanted_attributes(&mut target_attrs, inline::load_attrs(cx, def_id), is_inline); </ins> } else { // We only keep the item's attributes. <del> extra_attrs.extend_from_slice(inline::load_attrs(cx, def_id)); </del> <ins> target_attrs.extend_from_slice(inline::load_attrs(cx, def_id)); </ins> } <del> let attrs = Attributes::from_ast(&extra_attrs); let cfg = extra_attrs.cfg(cx.tcx, &cx.cache.hidden_cfg); </del> <ins> let import_parent = import_id.map(|import_id| cx.tcx.local_parent(import_id).to_def_id()); let (attrs, cfg) =  merge_attrs(cx, import_parent, &target_attrs, Some(&import_attrs)); </ins> let mut item = Item::from_def_id_and_attrs_and_parts(def_id, Some(name), kind, Box::new(attrs), cfg);

Discussion:
Found while reducing , but the error is different (probably same root cause however) : <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details label +T-rustdoc searched nightlies: from nightly-2023-01-01 to nightly-2023-02-23 regressed nightly: nightly-2023-02-12 searched commit range: regressed commit: <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.5</summary</detailscc
being looked up: table:
cc
Duplicate of , fixed in

This looks similar to , but this wasn't fixed by <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: : <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details modify labels +A-resolve
This ICE seems to be related to intra-doc link resolution, not standard name resolution. My bad :sweat_smile: modify labels +A-intra-doc-links -A-resolve
Minimum reproduction code:
The issue is in rustdoc, it passes a wrong parent module ( instead of the root ) when requesting resolutions for .
The resolution exists in rustc tables, it's just attached to , not .
The issue is in rustdoc, it passes a wrong parent module is currently used for determining the parent module, but it's wrong for inlined items because for them represents the target item, not the item itself. It looks like can be used instead, I'm just not sure how consistently it's set.
Thanks for the information! Wanna send the fix? Otherwise I plan to do it in the next days.
Fixed in The issue turned out a bit deeper than described in

The  crate <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
probably duplicate of
This is some different issue than whitespace issues in , it's not resolved by I'll investigate in more detail in a couple of days.
Fixed in