Handle impl generics in method calls

This commit is contained in:
Florian Diebold 2019-02-16 22:06:23 +01:00
parent 2af067b391
commit 65bd9bc3a8
7 changed files with 122 additions and 77 deletions

View file

@ -9,7 +9,6 @@ use ra_syntax::{TreeArc, SyntaxNode, SourceFile, AstNode, SyntaxNodePtr, ast};
use ra_arena::{Arena, RawId, ArenaId, impl_arena_id};
use crate::{
HirDatabase,
Module,
PersistentHirDatabase,
};
@ -215,7 +214,7 @@ pub(crate) trait AstItemDef<N: AstNode>: ArenaId + Clone {
N::cast(&syntax).unwrap_or_else(|| panic!("invalid ItemLoc: {:?}", loc.raw)).to_owned();
(loc.raw.file_id, ast)
}
fn module(self, db: &impl HirDatabase) -> Module {
fn module(self, db: &impl PersistentHirDatabase) -> Module {
let int = Self::interner(db.as_ref());
let loc = int.id2loc(self);
loc.module