parent_def_id -> parent
This commit is contained in:
parent
dcbd3aefa2
commit
8eadbfd35b
@ -5,6 +5,7 @@
|
||||
use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintContext, LintPass};
|
||||
use rustc::ty;
|
||||
use rustc::{declare_tool_lint, lint_array};
|
||||
use rustc::ty::DefIdTree;
|
||||
use rustc_errors::Applicability;
|
||||
use syntax_pos::symbol::keywords::SelfUpper;
|
||||
|
||||
@ -233,7 +234,7 @@ fn visit_path(&mut self, path: &'tcx Path, _id: HirId) {
|
||||
if self.item_path.def == path.def {
|
||||
span_use_self_lint(self.cx, path);
|
||||
} else if let Def::StructCtor(ctor_did, CtorKind::Fn) = path.def {
|
||||
if self.item_path.def.opt_def_id() == self.cx.tcx.parent_def_id(ctor_did) {
|
||||
if self.item_path.def.opt_def_id() == self.cx.tcx.parent(ctor_did) {
|
||||
span_use_self_lint(self.cx, path);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user