Skip to content

Commit d5023cc

Browse files
committed
Do not return abstract method declaration in goto-impl
Signed-off-by: Jonatan Waern <jonatan.waern@intel.com>
1 parent e5178c2 commit d5023cc

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

src/actions/semantic_lookup.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,18 @@ fn symbol_implementations_of_symbol<'t>(symbol: &'t SymbolRef,
252252
let mut next_iteration = vec![symbol];
253253
while let Some(next) = next_iteration.pop() {
254254
let next_lock = next.lock().unwrap();
255-
let (parent, _)= if let Some(meth_source) = next_lock.source.as_method() {
256-
meth_source
257-
} else {
258-
internal_error!("Expected method symbol source of symbol iterated over by\
259-
implementations_of_symbol, symbol is {:?}", next_lock);
260-
continue;
261-
};
262255
if !syms.contains(next) {
263-
syms.insert(next);
256+
let parent = if let Some(meth_source) = next_lock.source.as_method() {
257+
if !meth_source.1.is_abstract() {
258+
syms.insert(next);
259+
}
260+
meth_source.0
261+
} else {
262+
internal_error!("Expected method symbol source of symbol iterated over by\
263+
implementations_of_symbol, symbol is {:?}", next_lock);
264+
continue;
265+
};
266+
264267
for impl_ref in &next_lock.implementations {
265268
// Note: We only need to find the implementations of the variant of this method
266269
// under parent. Other variants are handled by finding multiple symbols at

0 commit comments

Comments
 (0)