De-@ ty::ctxt usage.
This commit is contained in:
parent
4fae06824c
commit
9b1fee898f
68 changed files with 741 additions and 756 deletions
|
@ -18,8 +18,8 @@ use syntax::ast_util;
|
|||
use syntax::opt_vec;
|
||||
use util::nodemap::NodeMap;
|
||||
|
||||
struct CFGBuilder {
|
||||
tcx: ty::ctxt,
|
||||
struct CFGBuilder<'a> {
|
||||
tcx: &'a ty::ctxt,
|
||||
method_map: typeck::MethodMap,
|
||||
exit_map: NodeMap<CFGIndex>,
|
||||
graph: CFGGraph,
|
||||
|
@ -32,7 +32,7 @@ struct LoopScope {
|
|||
break_index: CFGIndex, // where to go on a `break
|
||||
}
|
||||
|
||||
pub fn construct(tcx: ty::ctxt,
|
||||
pub fn construct(tcx: &ty::ctxt,
|
||||
method_map: typeck::MethodMap,
|
||||
blk: &ast::Block) -> CFG {
|
||||
let mut cfg_builder = CFGBuilder {
|
||||
|
@ -51,7 +51,7 @@ pub fn construct(tcx: ty::ctxt,
|
|||
exit: exit}
|
||||
}
|
||||
|
||||
impl CFGBuilder {
|
||||
impl<'a> CFGBuilder<'a> {
|
||||
fn block(&mut self, blk: &ast::Block, pred: CFGIndex) -> CFGIndex {
|
||||
let mut stmts_exit = pred;
|
||||
for &stmt in blk.stmts.iter() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue