Skip to content

Commit 1df5766

Browse files
authoredDec 6, 2018
Merge pull request rust-lang#3501 from matthiaskrgr/rustup
rustup clippy build with latest rustc
2 parents 519a6cd + 45cbdf4 commit 1df5766

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎clippy_lints/src/use_self.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::rustc::ty;
1414
use crate::rustc::{declare_tool_lint, lint_array};
1515
use crate::rustc_errors::Applicability;
1616
use crate::syntax::ast::NodeId;
17-
use crate::syntax_pos::symbol::keywords::SelfType;
17+
use crate::syntax_pos::symbol::keywords::SelfUpper;
1818
use crate::utils::{in_macro, span_lint_and_sugg};
1919
use if_chain::if_chain;
2020

@@ -226,7 +226,7 @@ struct UseSelfVisitor<'a, 'tcx: 'a> {
226226

227227
impl<'a, 'tcx> Visitor<'tcx> for UseSelfVisitor<'a, 'tcx> {
228228
fn visit_path(&mut self, path: &'tcx Path, _id: HirId) {
229-
if self.item_path.def == path.def && path.segments.last().expect(SEGMENTS_MSG).ident.name != SelfType.name() {
229+
if self.item_path.def == path.def && path.segments.last().expect(SEGMENTS_MSG).ident.name != SelfUpper.name() {
230230
span_use_self_lint(self.cx, path);
231231
}
232232

‎clippy_lints/src/utils/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ pub fn opt_def_id(def: Def) -> Option<DefId> {
970970

971971
pub fn is_self(slf: &Arg) -> bool {
972972
if let PatKind::Binding(_, _, name, _) = slf.pat.node {
973-
name.name == keywords::SelfValue.name()
973+
name.name == keywords::SelfLower.name()
974974
} else {
975975
false
976976
}

0 commit comments

Comments
 (0)