Skip to content

Commit 33fd10d

Browse files
committed
save-analysis: fix declid of methods
1 parent 32690b5 commit 33fd10d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_trans/save/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
278278
// The qualname for a method is the trait name or name of the struct in an impl in
279279
// which the method is declared in followed by the method's name.
280280
let mut qualname = match ty::impl_of_method(&self.analysis.ty_cx,
281-
ast_util::local_def(method.id)) {
281+
ast_util::local_def(method.id)) {
282282
Some(impl_id) => match self.analysis.ty_cx.map.get(impl_id.node) {
283283
NodeItem(item) => {
284284
scope_id = item.id;
@@ -349,7 +349,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
349349
.and_then(|def_id| {
350350
if match def_id {
351351
ty::MethodTraitItemId(def_id) => {
352-
method.id != 0 && def_id.node == 0
352+
def_id.node != 0 && def_id != ast_util::local_def(method.id)
353353
}
354354
ty::TypeTraitItemId(_) => false,
355355
} {

0 commit comments

Comments
 (0)