File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
compiler/rustc_metadata/src/rmeta Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -787,8 +787,7 @@ fn should_encode_attr(
787
787
} else if attr.doc_str().is_some() {
788
788
// We keep all public doc comments because they might be "imported" into downstream crates
789
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())
790
+ *is_def_id_public.get_or_insert_with(|| tcx.effective_visibilities(()).is_exported(def_id))
792
791
} else if attr.has_name(sym::doc) {
793
792
// If this is a `doc` attribute, and it's marked `inline` (as in `#[doc(inline)]`), we can
794
793
// remove it. It won't be inlinable in downstream crates.
You can’t perform that action at this time.
0 commit comments