Skip to content

Commit 2d1dec7

Browse files
committed
Move mutability checking into its own pass.
Having it in the alias pass was slightly more efficient (finding expression roots has to be done in both passes), but further muddled up the already complex alias checker. Also factors out some duplication in the mutability-checking code.
1 parent 34ae491 commit 2d1dec7

13 files changed

+292
-290
lines changed

src/comp/driver/rustc.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,10 @@ fn compile_input(sess: session::session, cfg: ast::crate_cfg, input: &istr,
165165
time(time_passes, ~"typestate checking",
166166
bind middle::tstate::ck::check_crate(ty_cx, crate));
167167
}
168-
let mut_map = time(time_passes, ~"alias checking",
169-
bind middle::alias::check_crate(ty_cx, crate));
168+
let mut_map = time(time_passes, ~"mutability checking",
169+
bind middle::mut::check_crate(ty_cx, crate));
170+
time(time_passes, ~"alias checking",
171+
bind middle::alias::check_crate(ty_cx, crate));
170172
time(time_passes, ~"kind checking",
171173
bind kind::check_crate(ty_cx, crate));
172174
if sess.get_opts().no_trans { ret; }

0 commit comments

Comments
 (0)