We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33b55ac commit d080532Copy full SHA for d080532
compiler/rustc_metadata/src/rmeta/encoder.rs
@@ -787,8 +787,7 @@ fn should_encode_attr(
787
} else if attr.doc_str().is_some() {
788
// We keep all public doc comments because they might be "imported" into downstream crates
789
// if they use `#[doc(inline)]` to copy an item's documentation into their own.
790
- *is_def_id_public
791
- .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))
792
} else if attr.has_name(sym::doc) {
793
// If this is a `doc` attribute, and it's marked `inline` (as in `#[doc(inline)]`), we can
794
// remove it. It won't be inlinable in downstream crates.
0 commit comments