]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/lint/levels.rs
Move Lint to rustc_session
[rust.git] / src / librustc / lint / levels.rs
index 27bf9649324b4730f560049bd814ca2b43bd40b6..ca246994e5c8433da1f70c0aab54315fef1d1ed5 100644 (file)
@@ -93,7 +93,7 @@ fn get_lint_level(&self,
 
         // If `level` is none then we actually assume the default level for this
         // lint.
-        let mut level = level.unwrap_or_else(|| lint.default_level(sess));
+        let mut level = level.unwrap_or_else(|| lint.default_level(sess.edition()));
 
         // If we're about to issue a warning, check at the last minute for any
         // directives against the warnings "lint". If, for example, there's an
@@ -232,13 +232,13 @@ pub fn push(&mut self, attrs: &[ast::Attribute], store: &LintStore) -> BuilderPu
                             // don't have any lint names (`#[level(reason = "foo")]`)
                             if let ast::LitKind::Str(rationale, _) = name_value.kind {
                                 if !self.sess.features_untracked().lint_reasons {
-                                    feature_gate::emit_feature_err(
+                                    feature_gate::feature_err(
                                         &self.sess.parse_sess,
                                         sym::lint_reasons,
                                         item.span,
-                                        feature_gate::GateIssue::Language,
                                         "lint reasons are experimental"
-                                    );
+                                    )
+                                    .emit();
                                 }
                                 reason = Some(rationale);
                             } else {