mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 14:31:55 +00:00
rustc_metadata: Encode even less doc comments
This commit is contained in:
parent
33b55ac39f
commit
d0805321d5
@ -787,8 +787,7 @@ fn should_encode_attr(
|
||||
} else if attr.doc_str().is_some() {
|
||||
// We keep all public doc comments because they might be "imported" into downstream crates
|
||||
// if they use `#[doc(inline)]` to copy an item's documentation into their own.
|
||||
*is_def_id_public
|
||||
.get_or_insert_with(|| tcx.effective_visibilities(()).effective_vis(def_id).is_some())
|
||||
*is_def_id_public.get_or_insert_with(|| tcx.effective_visibilities(()).is_exported(def_id))
|
||||
} else if attr.has_name(sym::doc) {
|
||||
// If this is a `doc` attribute, and it's marked `inline` (as in `#[doc(inline)]`), we can
|
||||
// remove it. It won't be inlinable in downstream crates.
|
||||
|
Loading…
Reference in New Issue
Block a user