Skip to content

Commit 4ec4c4f

Browse files
review suggestion: use existing defn rather than new intern call
Co-authored-by: Vadim Petrochenkov <[email protected]>
1 parent ef03a5d commit 4ec4c4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_middle/lint.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_session::lint::{builtin, Level, Lint, LintId};
99
use rustc_session::{DiagnosticMessageId, Session};
1010
use rustc_span::hygiene::MacroKind;
1111
use rustc_span::source_map::{DesugaringKind, ExpnKind, MultiSpan};
12-
use rustc_span::{Span, Symbol, DUMMY_SP};
12+
use rustc_span::{symbol, Span, Symbol, DUMMY_SP};
1313

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

0 commit comments

Comments
 (0)