Skip to content

Commit

Permalink
Merge pull request #3501 from matthiaskrgr/rustup
Browse files Browse the repository at this point in the history
rustup clippy build with latest rustc
  • Loading branch information
phansch committed Dec 6, 2018
2 parents 519a6cd + 45cbdf4 commit 1df5766
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/use_self.rs
Expand Up @@ -14,7 +14,7 @@ use crate::rustc::ty;
use crate::rustc::{declare_tool_lint, lint_array};
use crate::rustc_errors::Applicability;
use crate::syntax::ast::NodeId;
use crate::syntax_pos::symbol::keywords::SelfType;
use crate::syntax_pos::symbol::keywords::SelfUpper;
use crate::utils::{in_macro, span_lint_and_sugg};
use if_chain::if_chain;

Expand Down Expand Up @@ -226,7 +226,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 self.item_path.def == path.def && path.segments.last().expect(SEGMENTS_MSG).ident.name != SelfType.name() {
if self.item_path.def == path.def && path.segments.last().expect(SEGMENTS_MSG).ident.name != SelfUpper.name() {
span_use_self_lint(self.cx, path);
}

Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/utils/mod.rs
Expand Up @@ -970,7 +970,7 @@ pub fn opt_def_id(def: Def) -> Option<DefId> {

pub fn is_self(slf: &Arg) -> bool {
if let PatKind::Binding(_, _, name, _) = slf.pat.node {
name.name == keywords::SelfValue.name()
name.name == keywords::SelfLower.name()
} else {
false
}
Expand Down

0 comments on commit 1df5766

Please sign in to comment.