]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/use_self.rs
Rustup to https://github.com/rust-lang/rust/pull/60740
[rust.git] / clippy_lints / src / use_self.rs
index 1a0a3474d88b274b34a4ebbc7d6f50a75f04231b..c6ada386f2aa0820d8229e33614786a45945fde1 100644 (file)
@@ -8,7 +8,7 @@
 use rustc::ty::{DefIdTree, Ty};
 use rustc::{declare_lint_pass, declare_tool_lint};
 use rustc_errors::Applicability;
-use syntax_pos::symbol::keywords::SelfUpper;
+use syntax_pos::symbol::kw;
 
 use crate::utils::span_lint_and_sugg;
 
@@ -220,7 +220,7 @@ struct UseSelfVisitor<'a, 'tcx: 'a> {
 
 impl<'a, 'tcx> Visitor<'tcx> for UseSelfVisitor<'a, 'tcx> {
     fn visit_path(&mut self, path: &'tcx Path, _id: HirId) {
-        if path.segments.last().expect(SEGMENTS_MSG).ident.name != SelfUpper.name() {
+        if path.segments.last().expect(SEGMENTS_MSG).ident.name != kw::SelfUpper {
             if self.item_path.res == path.res {
                 span_use_self_lint(self.cx, path);
             } else if let Res::Def(DefKind::Ctor(def::CtorOf::Struct, CtorKind::Fn), ctor_did) = path.res {