mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-13 00:40:22 +00:00
cd5622c6de
Use `Query.set(db, key, value)` to set. Not sure about this.
23 lines
491 B
Rust
23 lines
491 B
Rust
mod class_table;
|
|
mod compiler;
|
|
mod implementation;
|
|
|
|
use self::class_table::ClassTableDatabase;
|
|
use self::implementation::DatabaseImpl;
|
|
|
|
#[test]
|
|
fn test() {
|
|
let query = DatabaseImpl::default();
|
|
let all_def_ids = query.all_fields(());
|
|
assert_eq!(
|
|
format!("{:?}", all_def_ids),
|
|
"[DefId(1), DefId(2), DefId(11), DefId(12)]"
|
|
);
|
|
}
|
|
|
|
fn main() {
|
|
let query = DatabaseImpl::default();
|
|
for f in query.all_fields(()).iter() {
|
|
println!("{:?}", f);
|
|
}
|
|
}
|