Don't show flyimport completions in use renames
This commit is contained in:
parent
533ca584c3
commit
d7d16a7ac9
@ -1220,4 +1220,17 @@ fn function() {
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn flyimport_rename() {
|
||||
check(
|
||||
r#"
|
||||
mod module {
|
||||
pub struct Struct;
|
||||
}
|
||||
use self as Str$0;
|
||||
"#,
|
||||
expect![[r#""#]],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -383,6 +383,7 @@ pub(crate) fn is_path_disallowed(&self) -> bool {
|
||||
| ImmediateLocation::ModDeclaration(_)
|
||||
| ImmediateLocation::RecordPat(_)
|
||||
| ImmediateLocation::RecordExpr(_)
|
||||
| ImmediateLocation::Rename
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ pub(crate) enum ImmediatePrevSibling {
|
||||
pub(crate) enum ImmediateLocation {
|
||||
Use,
|
||||
UseTree,
|
||||
Rename,
|
||||
Impl,
|
||||
Trait,
|
||||
RecordField,
|
||||
@ -201,6 +202,7 @@ pub(crate) fn determine_location(
|
||||
ast::Use(_it) => ImmediateLocation::Use,
|
||||
ast::UseTree(_it) => ImmediateLocation::UseTree,
|
||||
ast::UseTreeList(_it) => ImmediateLocation::UseTree,
|
||||
ast::Rename(_it) => ImmediateLocation::Rename,
|
||||
ast::StmtList(_it) => ImmediateLocation::StmtList,
|
||||
ast::SourceFile(_it) => ImmediateLocation::ItemList,
|
||||
ast::ItemList(_it) => ImmediateLocation::ItemList,
|
||||
|
Loading…
Reference in New Issue
Block a user