Skip to content

Commit 3983b87

Browse files
author
Jonathan Turner
authored
Rollup merge of #36991 - wesleywiser:fixme_1, r=arielb1
Move IdxSetBuf and BitSlice to rustc_data_structures Resolves a FIXME
2 parents 6f81f2f + 5e91c07 commit 3983b87

File tree

8 files changed

+12
-18
lines changed

8 files changed

+12
-18
lines changed

src/librustc_borrowck/borrowck/mir/dataflow/graphviz.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
1313
use syntax::ast::NodeId;
1414
use rustc::mir::repr::{BasicBlock, Mir};
15+
use rustc_data_structures::bitslice::bits_to_string;
16+
use rustc_data_structures::indexed_set::{IdxSet};
1517
use rustc_data_structures::indexed_vec::Idx;
1618

1719
use dot;
@@ -27,8 +29,6 @@ use std::path::Path;
2729

2830
use super::super::MoveDataParamEnv;
2931
use super::super::MirBorrowckCtxtPreDataflow;
30-
use bitslice::bits_to_string;
31-
use indexed_set::{IdxSet};
3232
use super::{BitDenotation, DataflowState};
3333

3434
impl<O: BitDenotation> DataflowState<O> {

src/librustc_borrowck/borrowck/mir/dataflow/impls.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
use rustc::ty::TyCtxt;
1212
use rustc::mir::repr::{self, Mir, Location};
13+
use rustc_data_structures::bitslice::BitSlice; // adds set_bit/get_bit to &[usize] bitvector rep.
14+
use rustc_data_structures::bitslice::{BitwiseOperator};
15+
use rustc_data_structures::indexed_set::{IdxSet};
1316
use rustc_data_structures::indexed_vec::Idx;
1417

1518
use super::super::gather_moves::{MoveOutIndex, MovePathIndex};
@@ -21,10 +24,6 @@ use super::super::on_lookup_result_bits;
2124

2225
use super::{BitDenotation, BlockSets, DataflowOperator};
2326

24-
use bitslice::BitSlice; // adds set_bit/get_bit to &[usize] bitvector rep.
25-
use bitslice::{BitwiseOperator};
26-
use indexed_set::{IdxSet};
27-
2827
// Dataflow analyses are built upon some interpretation of the
2928
// bitvectors attached to each basic block, represented via a
3029
// zero-sized structure.

src/librustc_borrowck/borrowck/mir/dataflow/mod.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
use rustc_data_structures::indexed_set::{IdxSet, IdxSetBuf};
1112
use rustc_data_structures::indexed_vec::Idx;
13+
use rustc_data_structures::bitslice::{bitwise, BitwiseOperator};
1214

1315
use rustc::ty::TyCtxt;
1416
use rustc::mir::repr::{self, Mir};
@@ -22,9 +24,6 @@ use std::usize;
2224
use super::MirBorrowckCtxtPreDataflow;
2325
use super::MoveDataParamEnv;
2426

25-
use bitslice::{bitwise, BitwiseOperator};
26-
use indexed_set::{IdxSet, IdxSetBuf};
27-
2827
pub use self::sanity_check::sanity_check_via_rustc_peek;
2928
pub use self::impls::{MaybeInitializedLvals, MaybeUninitializedLvals};
3029
pub use self::impls::{DefinitelyInitializedLvals, MovingOutStatements};

src/librustc_borrowck/borrowck/mir/elaborate_drops.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use indexed_set::IdxSetBuf;
1211
use super::gather_moves::{MoveData, MovePathIndex, LookupResult};
1312
use super::dataflow::{MaybeInitializedLvals, MaybeUninitializedLvals};
1413
use super::dataflow::{DataflowResults};
@@ -23,6 +22,7 @@ use rustc::mir::transform::{Pass, MirPass, MirSource};
2322
use rustc::middle::const_val::ConstVal;
2423
use rustc::middle::lang_items;
2524
use rustc::util::nodemap::FnvHashMap;
25+
use rustc_data_structures::indexed_set::IdxSetBuf;
2626
use rustc_data_structures::indexed_vec::Idx;
2727
use syntax_pos::Span;
2828

src/librustc_borrowck/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ pub use borrowck::{AnalysisData, BorrowckCtxt, ElaborateDrops};
5050
pub mod diagnostics;
5151

5252
mod borrowck;
53-
mod bitslice;
54-
mod indexed_set;
5553

5654
pub mod graphviz;
5755

src/librustc_borrowck/bitslice.rs renamed to src/librustc_data_structures/bitslice.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// FIXME: move this to `rustc_data_structures` and potentially merge
12-
// with `bitvec` there.
11+
// FIXME: merge with `bitvec`
1312

1413
use std::mem;
1514

src/librustc_borrowck/indexed_set.rs renamed to src/librustc_data_structures/indexed_set.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// FIXME: move this to `rustc_data_structures`
12-
1311
use std::fmt;
1412
use std::marker::PhantomData;
1513
use std::mem;
1614
use std::ops::{Deref, DerefMut, Range};
1715
use bitslice::{BitSlice, Word};
1816
use bitslice::{bitwise, Union, Subtract};
19-
20-
use rustc_data_structures::indexed_vec::Idx;
17+
use indexed_vec::Idx;
2118

2219
/// Represents a set (or packed family of sets), of some element type
2320
/// E, where each E is identified by some unique index type `T`.

src/librustc_data_structures/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@ extern crate serialize as rustc_serialize; // used by deriving
4141
#[cfg(unix)]
4242
extern crate libc;
4343

44+
pub mod bitslice;
4445
pub mod bitvec;
4546
pub mod graph;
4647
pub mod ivar;
48+
pub mod indexed_set;
4749
pub mod indexed_vec;
4850
pub mod obligation_forest;
4951
pub mod snapshot_map;

0 commit comments

Comments
 (0)