Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/base-db/src/lib.rs')
-rw-r--r--crates/base-db/src/lib.rs30
1 files changed, 7 insertions, 23 deletions
diff --git a/crates/base-db/src/lib.rs b/crates/base-db/src/lib.rs
index 57e7934367..a0a55df5f9 100644
--- a/crates/base-db/src/lib.rs
+++ b/crates/base-db/src/lib.rs
@@ -4,27 +4,27 @@
mod input;
mod change;
-pub mod fixture;
-pub mod span;
use std::panic;
use rustc_hash::FxHashSet;
-use syntax::{ast, Parse, SourceFile, TextRange, TextSize};
+use syntax::{ast, Parse, SourceFile};
use triomphe::Arc;
pub use crate::{
- change::Change,
+ change::FileChange,
input::{
CrateData, CrateDisplayName, CrateGraph, CrateId, CrateName, CrateOrigin, Dependency,
- DependencyKind, Edition, Env, LangCrateOrigin, ProcMacro, ProcMacroExpander,
- ProcMacroExpansionError, ProcMacroId, ProcMacroKind, ProcMacroLoadResult, ProcMacroPaths,
- ProcMacros, ReleaseChannel, SourceRoot, SourceRootId, TargetLayoutLoadResult,
+ DependencyKind, Edition, Env, LangCrateOrigin, ProcMacroPaths, ReleaseChannel, SourceRoot,
+ SourceRootId, TargetLayoutLoadResult,
},
};
pub use salsa::{self, Cancelled};
+pub use span::{FilePosition, FileRange};
pub use vfs::{file_set::FileSet, AnchoredPath, AnchoredPathBuf, FileId, VfsPath};
+pub use semver::{BuildMetadata, Prerelease, Version, VersionReq};
+
#[macro_export]
macro_rules! impl_intern_key {
($name:ident) => {
@@ -43,18 +43,6 @@ pub trait Upcast<T: ?Sized> {
fn upcast(&self) -> &T;
}
-#[derive(Clone, Copy, Debug)]
-pub struct FilePosition {
- pub file_id: FileId,
- pub offset: TextSize,
-}
-
-#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
-pub struct FileRange {
- pub file_id: FileId,
- pub range: TextRange,
-}
-
pub const DEFAULT_PARSE_LRU_CAP: usize = 128;
pub trait FileLoader {
@@ -74,10 +62,6 @@ pub trait SourceDatabase: FileLoader + std::fmt::Debug {
/// The crate graph.
#[salsa::input]
fn crate_graph(&self) -> Arc<CrateGraph>;
-
- /// The proc macros.
- #[salsa::input]
- fn proc_macros(&self) -> Arc<ProcMacros>;
}
fn parse(db: &dyn SourceDatabase, file_id: FileId) -> Parse<ast::SourceFile> {