Skip to content

Commit

Permalink
Use the EntryOrExit variants qualified.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger committed Nov 24, 2015
1 parent 561d088 commit 0eebc0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
8 changes: 3 additions & 5 deletions src/librustc/middle/dataflow.rs
Expand Up @@ -14,8 +14,6 @@
//! and thus uses bitvectors. Your job is simply to specify the so-called
//! GEN and KILL bits for each expression.

pub use self::EntryOrExit::*;

use middle::cfg;
use middle::cfg::CFGIndex;
use middle::ty;
Expand Down Expand Up @@ -340,7 +338,7 @@ impl<'a, 'tcx, O:DataFlowOperator> DataFlowContext<'a, 'tcx, O> {
}
let indices = get_cfg_indices(id, &self.nodeid_to_index);
for &cfgidx in indices {
if !self.each_bit_for_node(Entry, cfgidx, |i| f(i)) {
if !self.each_bit_for_node(EntryOrExit::Entry, cfgidx, |i| f(i)) {
return false;
}
}
Expand All @@ -363,8 +361,8 @@ impl<'a, 'tcx, O:DataFlowOperator> DataFlowContext<'a, 'tcx, O> {
let on_entry = &self.on_entry[start.. end];
let temp_bits;
let slice = match e {
Entry => on_entry,
Exit => {
EntryOrExit::Entry => on_entry,
EntryOrExit::Exit => {
let mut t = on_entry.to_vec();
self.apply_gen_kill(cfgidx, &mut t);
temp_bits = t;
Expand Down
5 changes: 2 additions & 3 deletions src/librustc_borrowck/graphviz.rs
Expand Up @@ -22,7 +22,6 @@ use borrowck::{BorrowckCtxt, LoanPath};
use dot;
use rustc::middle::cfg::CFGIndex;
use rustc::middle::dataflow::{DataFlowOperator, DataFlowContext, EntryOrExit};
use rustc::middle::dataflow;
use std::rc::Rc;
use std::borrow::IntoCow;

Expand Down Expand Up @@ -134,8 +133,8 @@ impl<'a, 'tcx> dot::Labeller<'a, Node<'a>, Edge<'a>> for DataflowLabeller<'a, 't
fn graph_id(&'a self) -> dot::Id<'a> { self.inner.graph_id() }
fn node_id(&'a self, n: &Node<'a>) -> dot::Id<'a> { self.inner.node_id(n) }
fn node_label(&'a self, n: &Node<'a>) -> dot::LabelText<'a> {
let prefix = self.dataflow_for(dataflow::Entry, n);
let suffix = self.dataflow_for(dataflow::Exit, n);
let prefix = self.dataflow_for(EntryOrExit::Entry, n);
let suffix = self.dataflow_for(EntryOrExit::Exit, n);
let inner_label = self.inner.node_label(n);
inner_label
.prefix_line(dot::LabelText::LabelStr(prefix.into_cow()))
Expand Down

0 comments on commit 0eebc0c

Please sign in to comment.