Turn features() into a query.

This commit is contained in:
Michael Woerister 2018-02-14 16:11:02 +01:00
parent e2746d8700
commit 542bc75dea
49 changed files with 207 additions and 140 deletions

View file

@ -69,7 +69,7 @@ pub fn assert_dep_graph<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
// if the `rustc_attrs` feature is not enabled, then the
// attributes we are interested in cannot be present anyway, so
// skip the walk.
if !tcx.sess.features.borrow().rustc_attrs {
if !tcx.features().rustc_attrs {
return;
}

View file

@ -219,7 +219,7 @@ impl Assertion {
pub fn check_dirty_clean_annotations<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
// can't add `#[rustc_dirty]` etc without opting in to this feature
if !tcx.sess.features.borrow().rustc_attrs {
if !tcx.features().rustc_attrs {
return;
}