use hir;
+use std::collections::BTreeMap;
use std::collections::HashMap;
-
use syntax::ast::*;
use syntax::ptr::P;
use syntax::codemap::{respan, Spanned, Span};
use syntax::parse::token::{self, str_to_ident};
use syntax::std_inject;
use syntax::visit::{self, Visitor};
-use rustc_data_structures::fnv::FnvHashMap;
use std::cell::{Cell, RefCell};
}
struct ItemLowerer<'lcx, 'interner: 'lcx> {
- items: FnvHashMap<NodeId, hir::Item>,
+ items: BTreeMap<NodeId, hir::Item>,
lctx: &'lcx LoweringContext<'interner>,
}
pub fn lower_crate(lctx: &LoweringContext, c: &Crate) -> hir::Crate {
let items = {
- let mut item_lowerer = ItemLowerer { items: FnvHashMap(), lctx: lctx };
+ let mut item_lowerer = ItemLowerer { items: BTreeMap::new(), lctx: lctx };
visit::walk_crate(&mut item_lowerer, c);
item_lowerer.items
};