// 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
// 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 {