1
Fork 0

Store do_not_recommend-ness in impl header

This commit is contained in:
Michael Goulet 2024-08-09 22:02:20 -04:00
parent 68d2e8a66e
commit ed7bdbb17b
5 changed files with 13 additions and 20 deletions

View file

@ -1699,6 +1699,8 @@ fn impl_trait_header(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<ty::ImplTrai
trait_ref: ty::EarlyBinder::bind(trait_ref),
safety: impl_.safety,
polarity: polarity_of_impl(tcx, def_id, impl_, item.span),
do_not_recommend: tcx.features().do_not_recommend
&& tcx.has_attrs_with_path(def_id, &[sym::diagnostic, sym::do_not_recommend]),
}
})
}