2018-09-28 15:26:53 +00:00
|
|
|
mod class_table;
|
|
|
|
mod compiler;
|
2018-09-28 15:40:20 +00:00
|
|
|
mod implementation;
|
|
|
|
|
|
|
|
use self::class_table::ClassTableQueryContext;
|
|
|
|
use self::implementation::QueryContextImpl;
|
2018-09-28 15:26:53 +00:00
|
|
|
|
2018-09-28 17:54:40 +00:00
|
|
|
#[test]
|
|
|
|
fn test() {
|
|
|
|
let query = QueryContextImpl::default();
|
|
|
|
let all_def_ids = query.all_fields().of(());
|
|
|
|
assert_eq!(
|
|
|
|
format!("{:?}", all_def_ids),
|
|
|
|
"[DefId(1), DefId(2), DefId(11), DefId(12)]"
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2018-09-28 15:26:53 +00:00
|
|
|
fn main() {
|
2018-09-28 15:40:20 +00:00
|
|
|
let query = QueryContextImpl::default();
|
|
|
|
for f in query.all_fields().of(()).iter() {
|
|
|
|
println!("{:?}", f);
|
|
|
|
}
|
2018-09-28 15:26:53 +00:00
|
|
|
}
|