Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/lib.rs')
-rw-r--r--crates/hir-def/src/lib.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/hir-def/src/lib.rs b/crates/hir-def/src/lib.rs
index ca8cc1c3ea..682d169adb 100644
--- a/crates/hir-def/src/lib.rs
+++ b/crates/hir-def/src/lib.rs
@@ -108,6 +108,15 @@ use crate::{
type FxIndexMap<K, V> =
indexmap::IndexMap<K, V, std::hash::BuildHasherDefault<rustc_hash::FxHasher>>;
+/// A wrapper around two booleans, [`ImportPathConfig::prefer_no_std`] and [`ImportPathConfig::prefer_prelude`].
+#[derive(Debug, Clone, PartialEq, Eq, Hash, Copy)]
+pub struct ImportPathConfig {
+ /// If true, prefer to unconditionally use imports of the `core` and `alloc` crate
+ /// over the std.
+ pub prefer_no_std: bool,
+ /// If true, prefer import paths containing a prelude module.
+ pub prefer_prelude: bool,
+}
#[derive(Debug)]
pub struct ItemLoc<N: ItemTreeNode> {