Skip to content

Commit 22ef7e7

Browse files
committed
Require &Crate instead of @crate
This help enable some later refactorings.
1 parent 9883a62 commit 22ef7e7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/librustc/middle/lint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pub type LintDict = HashMap<&'static str, LintSpec>;
135135
enum AttributedNode<'self> {
136136
Item(@ast::item),
137137
Method(&'self ast::method),
138-
Crate(@ast::Crate),
138+
Crate(&'self ast::Crate),
139139
}
140140

141141
#[deriving(Eq)]
@@ -1565,7 +1565,7 @@ impl Visitor<@mut Context> for LintCheckVisitor {
15651565
}
15661566
}
15671567

1568-
pub fn check_crate(tcx: ty::ctxt, crate: @ast::Crate) {
1568+
pub fn check_crate(tcx: ty::ctxt, crate: &ast::Crate) {
15691569
let cx = @mut Context {
15701570
dict: @get_lint_dict(),
15711571
curr: SmallIntMap::new(),

src/librustc/middle/reachable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ impl ReachableContext {
268268

269269
// Step 1: Mark all public symbols, and add all public symbols that might
270270
// be inlined to a worklist.
271-
fn mark_public_symbols(&self, crate: @Crate) {
271+
fn mark_public_symbols(&self, crate: &Crate) {
272272
let reachable_symbols = self.reachable_symbols;
273273
let worklist = self.worklist;
274274

@@ -429,7 +429,7 @@ impl ReachableContext {
429429

430430
pub fn find_reachable(tcx: ty::ctxt,
431431
method_map: typeck::method_map,
432-
crate: @Crate)
432+
crate: &Crate)
433433
-> @mut HashSet<NodeId> {
434434
// XXX(pcwalton): We only need to mark symbols that are exported. But this
435435
// is more complicated than just looking at whether the symbol is `pub`,

0 commit comments

Comments
 (0)