Skip to content

Commit

Permalink
review suggestion: use existing defn rather than new intern call
Browse files Browse the repository at this point in the history
Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
  • Loading branch information
pnkfelix and petrochenkov committed Aug 18, 2020
1 parent ef03a5d commit 4ec4c4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc_middle/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use rustc_session::lint::{builtin, Level, Lint, LintId};
use rustc_session::{DiagnosticMessageId, Session};
use rustc_span::hygiene::MacroKind;
use rustc_span::source_map::{DesugaringKind, ExpnKind, MultiSpan};
use rustc_span::{Span, Symbol, DUMMY_SP};
use rustc_span::{symbol, Span, Symbol, DUMMY_SP};

/// How a lint level was set.
#[derive(Clone, Copy, PartialEq, Eq, HashStable)]
Expand All @@ -28,7 +28,7 @@ pub enum LintSource {
impl LintSource {
pub fn name(&self) -> Symbol {
match *self {
LintSource::Default => Symbol::intern("default"),
LintSource::Default => symbol::kw::Default,
LintSource::Node(name, _, _) => name,
LintSource::CommandLine(name) => name,
}
Expand Down

0 comments on commit 4ec4c4f

Please sign in to comment.