1
Fork 0

rustc: Move features from Session to GlobalCtxt

Removes two pieces of mutable state.
Follow up to #114622.
This commit is contained in:
Vadim Petrochenkov 2023-08-09 20:28:00 +08:00
parent a07bc13e14
commit 7353c96be8
30 changed files with 130 additions and 93 deletions

View file

@ -115,7 +115,7 @@ impl<'a, 'tcx> Annotator<'a, 'tcx> {
let attrs = self.tcx.hir().attrs(self.tcx.hir().local_def_id_to_hir_id(def_id));
debug!("annotate(id = {:?}, attrs = {:?})", def_id, attrs);
let depr = attr::find_deprecation(&self.tcx.sess, attrs);
let depr = attr::find_deprecation(self.tcx.sess, self.tcx.features(), attrs);
let mut is_deprecated = false;
if let Some((depr, span)) = &depr {
is_deprecated = true;