Skip to content

Commit 26a2f85

Browse files
committed
Fix the fallout
1 parent f3f27a5 commit 26a2f85

File tree

13 files changed

+27
-50
lines changed

13 files changed

+27
-50
lines changed

src/libcollections/btree/node.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub struct Node<K, V> {
7878
_capacity: usize,
7979
}
8080

81-
struct NodeSlice<'a, K: 'a, V: 'a> {
81+
pub struct NodeSlice<'a, K: 'a, V: 'a> {
8282
keys: &'a [K],
8383
vals: &'a [V],
8484
pub edges: &'a [Node<K, V>],
@@ -87,7 +87,7 @@ struct NodeSlice<'a, K: 'a, V: 'a> {
8787
has_edges: bool,
8888
}
8989

90-
struct MutNodeSlice<'a, K: 'a, V: 'a> {
90+
pub struct MutNodeSlice<'a, K: 'a, V: 'a> {
9191
keys: &'a [K],
9292
vals: &'a mut [V],
9393
pub edges: &'a mut [Node<K, V>],
@@ -1344,7 +1344,7 @@ fn min_load_from_capacity(cap: usize) -> usize {
13441344
/// A trait for pairs of `Iterator`s, one over edges and the other over key/value pairs. This is
13451345
/// necessary, as the `MoveTraversalImpl` needs to have a destructor that deallocates the `Node`,
13461346
/// and a pair of `Iterator`s would require two independent destructors.
1347-
trait TraversalImpl {
1347+
pub trait TraversalImpl {
13481348
type Item;
13491349
type Edge;
13501350

@@ -1358,7 +1358,7 @@ trait TraversalImpl {
13581358
/// A `TraversalImpl` that actually is backed by two iterators. This works in the non-moving case,
13591359
/// as no deallocation needs to be done.
13601360
#[derive(Clone)]
1361-
struct ElemsAndEdges<Elems, Edges>(Elems, Edges);
1361+
pub struct ElemsAndEdges<Elems, Edges>(Elems, Edges);
13621362

13631363
impl<K, V, E, Elems: DoubleEndedIterator, Edges: DoubleEndedIterator>
13641364
TraversalImpl for ElemsAndEdges<Elems, Edges>
@@ -1375,7 +1375,7 @@ impl<K, V, E, Elems: DoubleEndedIterator, Edges: DoubleEndedIterator>
13751375
}
13761376

13771377
/// A `TraversalImpl` taking a `Node` by value.
1378-
struct MoveTraversalImpl<K, V> {
1378+
pub struct MoveTraversalImpl<K, V> {
13791379
keys: RawItems<K>,
13801380
vals: RawItems<V>,
13811381
edges: RawItems<Node<K, V>>,
@@ -1436,7 +1436,7 @@ impl<K, V> Drop for MoveTraversalImpl<K, V> {
14361436

14371437
/// An abstraction over all the different kinds of traversals a node supports
14381438
#[derive(Clone)]
1439-
struct AbsTraversal<Impl> {
1439+
pub struct AbsTraversal<Impl> {
14401440
inner: Impl,
14411441
head_is_edge: bool,
14421442
tail_is_edge: bool,

src/librustc_mir/build/matches/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ struct ArmBlocks {
209209
}
210210

211211
#[derive(Clone, Debug)]
212-
struct Candidate<'pat, 'tcx:'pat> {
212+
pub struct Candidate<'pat, 'tcx:'pat> {
213213
// all of these must be satisfied...
214214
match_pairs: Vec<MatchPair<'pat, 'tcx>>,
215215

@@ -235,7 +235,7 @@ struct Binding<'tcx> {
235235
}
236236

237237
#[derive(Clone, Debug)]
238-
struct MatchPair<'pat, 'tcx:'pat> {
238+
pub struct MatchPair<'pat, 'tcx:'pat> {
239239
// this lvalue...
240240
lvalue: Lvalue<'tcx>,
241241

@@ -278,7 +278,7 @@ enum TestKind<'tcx> {
278278
}
279279

280280
#[derive(Debug)]
281-
struct Test<'tcx> {
281+
pub struct Test<'tcx> {
282282
span: Span,
283283
kind: TestKind<'tcx>,
284284
}

src/librustc_mir/build/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use rustc_front::hir;
1818
use syntax::ast;
1919
use syntax::codemap::Span;
2020

21-
struct Builder<'a, 'tcx: 'a> {
21+
pub struct Builder<'a, 'tcx: 'a> {
2222
hir: Cx<'a, 'tcx>,
2323
cfg: CFG<'tcx>,
2424
scopes: Vec<scope::Scope<'tcx>>,
@@ -40,7 +40,7 @@ struct CFG<'tcx> {
4040
// convenient.
4141

4242
#[must_use] // if you don't use one of these results, you're leaving a dangling edge
43-
struct BlockAnd<T>(BasicBlock, T);
43+
pub struct BlockAnd<T>(BasicBlock, T);
4444

4545
trait BlockAndExtension {
4646
fn and<T>(self, v: T) -> BlockAnd<T>;

src/librustc_trans/back/msvc/registry.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use std::os::windows::prelude::*;
1414
use std::ptr;
1515
use libc::{c_void, c_long};
1616

17-
type DWORD = u32;
17+
pub type DWORD = u32;
1818
type LPCWSTR = *const u16;
1919
type LONG = c_long;
2020
type LPDWORD = *mut DWORD;
@@ -34,7 +34,7 @@ const SYNCHRONIZE: REGSAM = 0x00100000;
3434
const REG_SZ: DWORD = 1;
3535
const ERROR_SUCCESS: i32 = 0;
3636

37-
enum __HKEY__ {}
37+
pub enum __HKEY__ {}
3838
pub type HKEY = *mut __HKEY__;
3939
pub type PHKEY = *mut HKEY;
4040
pub type REGSAM = DWORD;

src/librustc_trans/trans/debuginfo/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl FunctionDebugContext {
145145
}
146146
}
147147

148-
struct FunctionDebugContextData {
148+
pub struct FunctionDebugContextData {
149149
scope_map: RefCell<NodeMap<DIScope>>,
150150
fn_metadata: DISubprogram,
151151
argument_counter: Cell<usize>,

src/libstd/collections/hash/table.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ pub enum BucketState<K, V, M> {
123123
// A GapThenFull encapsulates the state of two consecutive buckets at once.
124124
// The first bucket, called the gap, is known to be empty.
125125
// The second bucket is full.
126-
struct GapThenFull<K, V, M> {
126+
pub struct GapThenFull<K, V, M> {
127127
gap: EmptyBucket<K, V, ()>,
128128
full: FullBucket<K, V, M>,
129129
}

src/test/auxiliary/issue-2526.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use std::marker;
1515

16-
struct arc_destruct<T: Sync> {
16+
pub struct arc_destruct<T: Sync> {
1717
_data: isize,
1818
_marker: marker::PhantomData<T>
1919
}
@@ -37,7 +37,7 @@ fn init() -> arc_destruct<context_res> {
3737
arc(context_res())
3838
}
3939

40-
struct context_res {
40+
pub struct context_res {
4141
ctx : isize,
4242
}
4343

src/test/compile-fail/lint-dead-code-1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct UsedStruct1 {
4949
}
5050
struct UsedStruct2(isize);
5151
struct UsedStruct3;
52-
struct UsedStruct4;
52+
pub struct UsedStruct4;
5353
// this struct is never used directly, but its method is, so we don't want
5454
// to warn it
5555
struct SemiUsedStruct;

src/test/compile-fail/lint-visible-private-types.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl Public<Private<isize>> {
3232
pub fn a(&self) -> Private<isize> { panic!() }
3333
fn b(&self) -> Private<isize> { panic!() }
3434

35-
pub fn c() -> Private<isize> { panic!() } //~ ERROR private type in exported type signature
35+
pub fn c() -> Private<isize> { panic!() }
3636
fn d() -> Private<isize> { panic!() }
3737
}
3838
impl Public<isize> {
@@ -75,8 +75,8 @@ pub trait PubTrait {
7575
}
7676

7777
impl PubTrait for Public<isize> {
78-
fn bar(&self) -> Private<isize> { panic!() }
79-
fn baz() -> Private<isize> { panic!() }
78+
fn bar(&self) -> Private<isize> { panic!() } //~ ERROR private type in exported type signature
79+
fn baz() -> Private<isize> { panic!() } //~ ERROR private type in exported type signature
8080
}
8181
impl PubTrait for Public<Private<isize>> {
8282
fn bar(&self) -> Private<isize> { panic!() }
@@ -108,7 +108,7 @@ pub trait ParamTrait<T> {
108108
fn foo() -> T;
109109
}
110110

111-
impl ParamTrait<Private<isize>> //~ ERROR private type in exported type signature
111+
impl ParamTrait<Private<isize>>
112112
for Public<isize> {
113113
fn foo() -> Private<isize> { panic!() }
114114
}

src/test/debuginfo/type-names.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ use self::Enum1::{Variant1, Variant2};
182182
use std::marker::PhantomData;
183183
use std::ptr;
184184

185-
struct Struct1;
185+
pub struct Struct1;
186186
struct GenericStruct<T1, T2>(PhantomData<(T1,T2)>);
187187

188188
enum Enum1 {

src/test/run-pass/default_ty_param_struct_and_type_alias.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
use std::marker::PhantomData;
1515

16-
struct DeterministicHasher;
17-
struct RandomHasher;
16+
pub struct DeterministicHasher;
17+
pub struct RandomHasher;
1818

1919

20-
struct MyHashMap<K, V, H=DeterministicHasher> {
20+
pub struct MyHashMap<K, V, H=DeterministicHasher> {
2121
data: PhantomData<(K, V, H)>
2222
}
2323

src/test/run-pass/issue-28983.rs

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

11-
trait Test { type T; }
11+
pub trait Test { type T; }
1212

1313
impl Test for u32 {
1414
type T = i32;

src/test/run-pass/visible-private-types-feature-gate.rs

-23
This file was deleted.

0 commit comments

Comments
 (0)