mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-29 02:52:11 +00:00
Fix import search not discarding rawness
This commit is contained in:
parent
20ff27e2ba
commit
a06606c802
8 changed files with 65 additions and 29 deletions
|
|
@ -39,8 +39,8 @@ use stdx::TupleExt;
|
|||
use syntax::{
|
||||
algo::skip_trivia_token,
|
||||
ast::{self, HasAttrs as _, HasGenericParams},
|
||||
AstNode, AstToken, Direction, SmolStr, SyntaxKind, SyntaxNode, SyntaxNodePtr, SyntaxToken,
|
||||
TextRange, TextSize,
|
||||
AstNode, AstToken, Direction, SyntaxKind, SyntaxNode, SyntaxNodePtr, SyntaxToken, TextRange,
|
||||
TextSize,
|
||||
};
|
||||
use triomphe::Arc;
|
||||
|
||||
|
|
@ -1587,14 +1587,11 @@ impl<'db> SemanticsImpl<'db> {
|
|||
pub fn resolve_mod_path_relative(
|
||||
&self,
|
||||
to: Module,
|
||||
segments: impl IntoIterator<Item = SmolStr>,
|
||||
segments: impl IntoIterator<Item = Name>,
|
||||
) -> Option<impl Iterator<Item = ItemInNs>> {
|
||||
let items = to.id.resolver(self.db.upcast()).resolve_module_path_in_items(
|
||||
self.db.upcast(),
|
||||
&ModPath::from_segments(
|
||||
hir_def::path::PathKind::Plain,
|
||||
segments.into_iter().map(|it| Name::new_root(&it)),
|
||||
),
|
||||
&ModPath::from_segments(hir_def::path::PathKind::Plain, segments),
|
||||
);
|
||||
Some(items.iter_items().map(|(item, _)| item.into()))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue