Skip to content

Commit

Permalink
rustup clippy build with latest rustc
Browse files Browse the repository at this point in the history
(breakage due to rust-lang@08f8fae )

Fixes rust-lang#3500
  • Loading branch information
matthiaskrgr committed Dec 6, 2018
1 parent c4ef06a commit 45cbdf4
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 45cbdf4

Please sign in to comment.