]> git.lizzy.rs Git - rust.git/commitdiff
Reexport PrefixKind to remove deps to hir
authorEdwin Cheng <edwin0cheng@gmail.com>
Mon, 22 Mar 2021 05:39:13 +0000 (13:39 +0800)
committerEdwin Cheng <edwin0cheng@gmail.com>
Mon, 22 Mar 2021 05:39:13 +0000 (13:39 +0800)
crates/ide_db/src/helpers/insert_use.rs
crates/rust-analyzer/src/config.rs
crates/rust-analyzer/src/to_proto.rs

index 9e0cb91c3fc2f98e385e20ca47b3ee36989dbd03..37acf95f0fd9e89b639fd731624e1f36f8018031 100644 (file)
     AstToken, InsertPosition, NodeOrToken, SyntaxElement, SyntaxNode, SyntaxToken,
 };
 
+pub use hir::PrefixKind;
+
 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
 pub struct InsertUseConfig {
     pub merge: Option<MergeBehavior>,
-    pub prefix_kind: hir::PrefixKind,
+    pub prefix_kind: PrefixKind,
     pub group: bool,
 }
 
index 8f541976ecec53cbe56038e3cf1cb03778542513..5c88c3a9b807216c826c13473f1b8d17fc44a1de 100644 (file)
 use std::{ffi::OsString, iter, path::PathBuf};
 
 use flycheck::FlycheckConfig;
-use hir::PrefixKind;
 use ide::{AssistConfig, CompletionConfig, DiagnosticsConfig, HoverConfig, InlayHintsConfig};
 use ide_db::helpers::{
-    insert_use::{InsertUseConfig, MergeBehavior},
+    insert_use::{InsertUseConfig, MergeBehavior, PrefixKind},
     SnippetCap,
 };
 use lsp_types::{ClientCapabilities, MarkupKind};
index 1ddea927880dc58d293e91356a73c0410884a0b0..c1ca7ff9b648a333441d2b5c08417863474b6e6f 100644 (file)
@@ -1073,9 +1073,11 @@ pub(crate) fn rename_error(err: RenameError) -> crate::LspError {
 mod tests {
     use std::sync::Arc;
 
-    use hir::PrefixKind;
     use ide::Analysis;
-    use ide_db::helpers::{insert_use::InsertUseConfig, SnippetCap};
+    use ide_db::helpers::{
+        insert_use::{InsertUseConfig, PrefixKind},
+        SnippetCap,
+    };
 
     use super::*;