Port rustc_effective_visibility to the new attribute parser

This commit is contained in:
Jana Dönszelmann 2026-02-05 14:34:01 +01:00
parent 0a13b43612
commit 911203936b
No known key found for this signature in database
6 changed files with 46 additions and 2 deletions

View file

@ -876,7 +876,7 @@ pub struct TestReachabilityVisitor<'a, 'tcx> {
impl<'a, 'tcx> TestReachabilityVisitor<'a, 'tcx> {
fn effective_visibility_diagnostic(&self, def_id: LocalDefId) {
if self.tcx.has_attr(def_id, sym::rustc_effective_visibility) {
if find_attr!(self.tcx.get_all_attrs(def_id), AttributeKind::RustcEffectiveVisibility) {
let mut error_msg = String::new();
let span = self.tcx.def_span(def_id.to_def_id());
if let Some(effective_vis) = self.effective_visibilities.effective_vis(def_id) {