about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-04-11 20:20:49 +0200
committerGitHub <noreply@github.com>2024-04-11 20:20:49 +0200
commitbcdc281e5c0429450dc6122930bbde3753491f3f (patch)
tree1b4fb9abf2f4e760ee98532295a6c7533676a507 /compiler/rustc_codegen_llvm/src
parentdf7daa815f4047a1cfe24ecfbc12cfd4f40fa928 (diff)
parent5a0be6ff3dcc89a14e22c8613c86acbb0cd55b4a (diff)
downloadrust-bcdc281e5c0429450dc6122930bbde3753491f3f.tar.gz
rust-bcdc281e5c0429450dc6122930bbde3753491f3f.zip
Rollup merge of #123459 - GuillaumeGomez:fix-123435, r=notriddle
Correctly handle inlining of doc hidden foreign items

Fixes #123435.

In case a foreign item has doc(hidden) attribute, we simply merged its attributes with the re-export's, making it being removed once in the `strip_hidden` pass.

The solution was to use the same as for local reexported items: merge attributes, but not some of them (like `doc(hidden)`).

I originally checked if we could simply update `Item::is_doc_hidden` method to use `self.inline_stmt_id.is_some_and(|def_id| tcx.is_doc_hidden(def_id))` but unfortunately, it added (local) items that shouldn't be inlined. At least it unifies local and foreign items inlining, which I think is the best course of action here.

r? `@notriddle`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions