mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
dispatch acros roots
This commit is contained in:
parent
2f2feef9af
commit
b04c14d4ad
5 changed files with 180 additions and 75 deletions
|
@ -68,6 +68,9 @@ impl AnalysisHost {
|
|||
pub fn set_crate_graph(&mut self, graph: CrateGraph) {
|
||||
self.imp.set_crate_graph(graph)
|
||||
}
|
||||
pub fn set_libraries(&mut self, libs: impl Iterator<Item=impl Iterator<Item=(FileId, String)>>) {
|
||||
self.imp.set_libraries(libs)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -114,6 +117,7 @@ pub struct Query {
|
|||
query: String,
|
||||
lowercased: String,
|
||||
only_types: bool,
|
||||
libs: bool,
|
||||
exact: bool,
|
||||
limit: usize,
|
||||
}
|
||||
|
@ -125,6 +129,7 @@ impl Query {
|
|||
query,
|
||||
lowercased,
|
||||
only_types: false,
|
||||
libs: false,
|
||||
exact: false,
|
||||
limit: usize::max_value()
|
||||
}
|
||||
|
@ -132,6 +137,9 @@ impl Query {
|
|||
pub fn only_types(&mut self) {
|
||||
self.only_types = true;
|
||||
}
|
||||
pub fn libs(&mut self) {
|
||||
self.libs = true;
|
||||
}
|
||||
pub fn exact(&mut self) {
|
||||
self.exact = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue