about summary refs log tree commit diff
path: root/src/librustc/hir
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2018-02-14 16:11:02 +0100
committerMichael Woerister <michaelwoerister@posteo>2018-03-05 11:05:01 +0100
commit542bc75deaaf4e84dcd7a196685bc1a1cb100d32 (patch)
treeaf895d8de41f2569ac3235ab8b244e2853dfe54c /src/librustc/hir
parente2746d870017c869b84fc56ecd63f5e4f9646c96 (diff)
downloadrust-542bc75deaaf4e84dcd7a196685bc1a1cb100d32.tar.gz
rust-542bc75deaaf4e84dcd7a196685bc1a1cb100d32.zip
Turn features() into a query.
Diffstat (limited to 'src/librustc/hir')
-rw-r--r--src/librustc/hir/lowering.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs
index fa745bf1655..877027a21a2 100644
--- a/src/librustc/hir/lowering.rs
+++ b/src/librustc/hir/lowering.rs
@@ -550,7 +550,7 @@ impl<'a> LoweringContext<'a> {
     {
         assert!(!self.is_collecting_in_band_lifetimes);
         assert!(self.lifetimes_to_define.is_empty());
-        self.is_collecting_in_band_lifetimes = self.sess.features.borrow().in_band_lifetimes;
+        self.is_collecting_in_band_lifetimes = self.sess.features_untracked().in_band_lifetimes;
 
         assert!(self.in_band_ty_params.is_empty());
 
@@ -964,7 +964,7 @@ impl<'a> LoweringContext<'a> {
                 let span = t.span;
                 match itctx {
                     ImplTraitContext::Existential => {
-                        let has_feature = self.sess.features.borrow().conservative_impl_trait;
+                        let has_feature = self.sess.features_untracked().conservative_impl_trait;
                         if !t.span.allows_unstable() && !has_feature {
                             emit_feature_err(&self.sess.parse_sess, "conservative_impl_trait",
                                              t.span, GateIssue::Language,
@@ -988,7 +988,7 @@ impl<'a> LoweringContext<'a> {
                         }, lifetimes)
                     },
                     ImplTraitContext::Universal(def_id) => {
-                        let has_feature = self.sess.features.borrow().universal_impl_trait;
+                        let has_feature = self.sess.features_untracked().universal_impl_trait;
                         if !t.span.allows_unstable() && !has_feature {
                             emit_feature_err(&self.sess.parse_sess, "universal_impl_trait",
                                              t.span, GateIssue::Language,
@@ -3713,7 +3713,7 @@ impl<'a> LoweringContext<'a> {
     }
 
     fn maybe_lint_bare_trait(&self, span: Span, id: NodeId, is_global: bool) {
-        if self.sess.features.borrow().dyn_trait {
+        if self.sess.features_untracked().dyn_trait {
             self.sess.buffer_lint_with_diagnostic(
                 builtin::BARE_TRAIT_OBJECT, id, span,
                 "trait objects without an explicit `dyn` are deprecated",