Require &Crate instead of @Crate
This help enable some later refactorings.
This commit is contained in:
parent
9883a6250b
commit
22ef7e72f4
|
@ -135,7 +135,7 @@ pub type LintDict = HashMap<&'static str, LintSpec>;
|
|||
enum AttributedNode<'self> {
|
||||
Item(@ast::item),
|
||||
Method(&'self ast::method),
|
||||
Crate(@ast::Crate),
|
||||
Crate(&'self ast::Crate),
|
||||
}
|
||||
|
||||
#[deriving(Eq)]
|
||||
|
@ -1565,7 +1565,7 @@ impl Visitor<@mut Context> for LintCheckVisitor {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn check_crate(tcx: ty::ctxt, crate: @ast::Crate) {
|
||||
pub fn check_crate(tcx: ty::ctxt, crate: &ast::Crate) {
|
||||
let cx = @mut Context {
|
||||
dict: @get_lint_dict(),
|
||||
curr: SmallIntMap::new(),
|
||||
|
|
|
@ -268,7 +268,7 @@ impl ReachableContext {
|
|||
|
||||
// Step 1: Mark all public symbols, and add all public symbols that might
|
||||
// be inlined to a worklist.
|
||||
fn mark_public_symbols(&self, crate: @Crate) {
|
||||
fn mark_public_symbols(&self, crate: &Crate) {
|
||||
let reachable_symbols = self.reachable_symbols;
|
||||
let worklist = self.worklist;
|
||||
|
||||
|
@ -429,7 +429,7 @@ impl ReachableContext {
|
|||
|
||||
pub fn find_reachable(tcx: ty::ctxt,
|
||||
method_map: typeck::method_map,
|
||||
crate: @Crate)
|
||||
crate: &Crate)
|
||||
-> @mut HashSet<NodeId> {
|
||||
// XXX(pcwalton): We only need to mark symbols that are exported. But this
|
||||
// is more complicated than just looking at whether the symbol is `pub`,
|
||||
|
|
Loading…
Reference in New Issue