mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Type the self parameter
This commit is contained in:
parent
ae9530addc
commit
111126ed3c
6 changed files with 116 additions and 9 deletions
|
@ -30,6 +30,10 @@ impl MockDatabase {
|
|||
let file_id = db.add_file(&mut source_root, "/main.rs", text);
|
||||
db.query_mut(ra_db::SourceRootQuery)
|
||||
.set(WORKSPACE, Arc::new(source_root.clone()));
|
||||
|
||||
let mut crate_graph = CrateGraph::default();
|
||||
crate_graph.add_crate_root(file_id);
|
||||
db.set_crate_graph(crate_graph);
|
||||
(db, source_root, file_id)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue