about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-11-21 17:39:15 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-12-18 04:12:31 +0300
commit26a2f852beae15235e7d3c4c5751ffe8e9459817 (patch)
tree9d5ede80534b4d6bb061618d9fdbb2f5c2d79f15 /src
parentf3f27a5c6483d9e2bb3c872a3b05291a6e1d9cb3 (diff)
Fix the fallout
Diffstat (limited to 'src')
-rw-r--r--src/libcollections/btree/node.rs12
-rw-r--r--src/librustc_mir/build/matches/mod.rs6
-rw-r--r--src/librustc_mir/build/mod.rs4
-rw-r--r--src/librustc_trans/back/msvc/registry.rs4
-rw-r--r--src/librustc_trans/trans/debuginfo/mod.rs2
-rw-r--r--src/libstd/collections/hash/table.rs2
-rw-r--r--src/test/auxiliary/issue-2526.rs4
-rw-r--r--src/test/compile-fail/lint-dead-code-1.rs2
-rw-r--r--src/test/compile-fail/lint-visible-private-types.rs8
-rw-r--r--src/test/debuginfo/type-names.rs2
-rw-r--r--src/test/run-pass/default_ty_param_struct_and_type_alias.rs6
-rw-r--r--src/test/run-pass/issue-28983.rs2
-rw-r--r--src/test/run-pass/visible-private-types-feature-gate.rs23
13 files changed, 27 insertions, 50 deletions
diff --git a/src/libcollections/btree/node.rs b/src/libcollections/btree/node.rs
index 198025536f0..e55b1597a21 100644
--- a/src/libcollections/btree/node.rs
+++ b/src/libcollections/btree/node.rs
@@ -78,7 +78,7 @@ pub struct Node<K, V> {
     _capacity: usize,
 }
 
-struct NodeSlice<'a, K: 'a, V: 'a> {
+pub struct NodeSlice<'a, K: 'a, V: 'a> {
     keys: &'a [K],
     vals: &'a [V],
     pub edges: &'a [Node<K, V>],
@@ -87,7 +87,7 @@ struct NodeSlice<'a, K: 'a, V: 'a> {
     has_edges: bool,
 }
 
-struct MutNodeSlice<'a, K: 'a, V: 'a> {
+pub struct MutNodeSlice<'a, K: 'a, V: 'a> {
     keys: &'a [K],
     vals: &'a mut [V],
     pub edges: &'a mut [Node<K, V>],
@@ -1344,7 +1344,7 @@ fn min_load_from_capacity(cap: usize) -> usize {
 /// A trait for pairs of `Iterator`s, one over edges and the other over key/value pairs. This is
 /// necessary, as the `MoveTraversalImpl` needs to have a destructor that deallocates the `Node`,
 /// and a pair of `Iterator`s would require two independent destructors.
-trait TraversalImpl {
+pub trait TraversalImpl {
     type Item;
     type Edge;
 
@@ -1358,7 +1358,7 @@ trait TraversalImpl {
 /// A `TraversalImpl` that actually is backed by two iterators. This works in the non-moving case,
 /// as no deallocation needs to be done.
 #[derive(Clone)]
-struct ElemsAndEdges<Elems, Edges>(Elems, Edges);
+pub struct ElemsAndEdges<Elems, Edges>(Elems, Edges);
 
 impl<K, V, E, Elems: DoubleEndedIterator, Edges: DoubleEndedIterator>
         TraversalImpl for ElemsAndEdges<Elems, Edges>
@@ -1375,7 +1375,7 @@ impl<K, V, E, Elems: DoubleEndedIterator, Edges: DoubleEndedIterator>
 }
 
 /// A `TraversalImpl` taking a `Node` by value.
-struct MoveTraversalImpl<K, V> {
+pub struct MoveTraversalImpl<K, V> {
     keys: RawItems<K>,
     vals: RawItems<V>,
     edges: RawItems<Node<K, V>>,
@@ -1436,7 +1436,7 @@ impl<K, V> Drop for MoveTraversalImpl<K, V> {
 
 /// An abstraction over all the different kinds of traversals a node supports
 #[derive(Clone)]
-struct AbsTraversal<Impl> {
+pub struct AbsTraversal<Impl> {
     inner: Impl,
     head_is_edge: bool,
     tail_is_edge: bool,
diff --git a/src/librustc_mir/build/matches/mod.rs b/src/librustc_mir/build/matches/mod.rs
index f8385d58170..a02ed06ad09 100644
--- a/src/librustc_mir/build/matches/mod.rs
+++ b/src/librustc_mir/build/matches/mod.rs
@@ -209,7 +209,7 @@ struct ArmBlocks {
 }
 
 #[derive(Clone, Debug)]
-struct Candidate<'pat, 'tcx:'pat> {
+pub struct Candidate<'pat, 'tcx:'pat> {
     // all of these must be satisfied...
     match_pairs: Vec<MatchPair<'pat, 'tcx>>,
 
@@ -235,7 +235,7 @@ struct Binding<'tcx> {
 }
 
 #[derive(Clone, Debug)]
-struct MatchPair<'pat, 'tcx:'pat> {
+pub struct MatchPair<'pat, 'tcx:'pat> {
     // this lvalue...
     lvalue: Lvalue<'tcx>,
 
@@ -278,7 +278,7 @@ enum TestKind<'tcx> {
 }
 
 #[derive(Debug)]
-struct Test<'tcx> {
+pub struct Test<'tcx> {
     span: Span,
     kind: TestKind<'tcx>,
 }
diff --git a/src/librustc_mir/build/mod.rs b/src/librustc_mir/build/mod.rs
index 45368b5a68d..bd94f4e5bf2 100644
--- a/src/librustc_mir/build/mod.rs
+++ b/src/librustc_mir/build/mod.rs
@@ -18,7 +18,7 @@ use rustc_front::hir;
 use syntax::ast;
 use syntax::codemap::Span;
 
-struct Builder<'a, 'tcx: 'a> {
+pub struct Builder<'a, 'tcx: 'a> {
     hir: Cx<'a, 'tcx>,
     cfg: CFG<'tcx>,
     scopes: Vec<scope::Scope<'tcx>>,
@@ -40,7 +40,7 @@ struct CFG<'tcx> {
 // convenient.
 
 #[must_use] // if you don't use one of these results, you're leaving a dangling edge
-struct BlockAnd<T>(BasicBlock, T);
+pub struct BlockAnd<T>(BasicBlock, T);
 
 trait BlockAndExtension {
     fn and<T>(self, v: T) -> BlockAnd<T>;
diff --git a/src/librustc_trans/back/msvc/registry.rs b/src/librustc_trans/back/msvc/registry.rs
index 24179a0cccd..44b161a7575 100644
--- a/src/librustc_trans/back/msvc/registry.rs
+++ b/src/librustc_trans/back/msvc/registry.rs
@@ -14,7 +14,7 @@ use std::os::windows::prelude::*;
 use std::ptr;
 use libc::{c_void, c_long};
 
-type DWORD = u32;
+pub type DWORD = u32;
 type LPCWSTR = *const u16;
 type LONG = c_long;
 type LPDWORD = *mut DWORD;
@@ -34,7 +34,7 @@ const SYNCHRONIZE: REGSAM = 0x00100000;
 const REG_SZ: DWORD = 1;
 const ERROR_SUCCESS: i32 = 0;
 
-enum __HKEY__ {}
+pub enum __HKEY__ {}
 pub type HKEY = *mut __HKEY__;
 pub type PHKEY = *mut HKEY;
 pub type REGSAM = DWORD;
diff --git a/src/librustc_trans/trans/debuginfo/mod.rs b/src/librustc_trans/trans/debuginfo/mod.rs
index 74510de3f31..ee1d834fc8a 100644
--- a/src/librustc_trans/trans/debuginfo/mod.rs
+++ b/src/librustc_trans/trans/debuginfo/mod.rs
@@ -145,7 +145,7 @@ impl FunctionDebugContext {
     }
 }
 
-struct FunctionDebugContextData {
+pub struct FunctionDebugContextData {
     scope_map: RefCell<NodeMap<DIScope>>,
     fn_metadata: DISubprogram,
     argument_counter: Cell<usize>,
diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs
index e8796dd10b4..097968cd5a3 100644
--- a/src/libstd/collections/hash/table.rs
+++ b/src/libstd/collections/hash/table.rs
@@ -123,7 +123,7 @@ pub enum BucketState<K, V, M> {
 // A GapThenFull encapsulates the state of two consecutive buckets at once.
 // The first bucket, called the gap, is known to be empty.
 // The second bucket is full.
-struct GapThenFull<K, V, M> {
+pub struct GapThenFull<K, V, M> {
     gap: EmptyBucket<K, V, ()>,
     full: FullBucket<K, V, M>,
 }
diff --git a/src/test/auxiliary/issue-2526.rs b/src/test/auxiliary/issue-2526.rs
index e57c6dc7184..3d777d01d50 100644
--- a/src/test/auxiliary/issue-2526.rs
+++ b/src/test/auxiliary/issue-2526.rs
@@ -13,7 +13,7 @@
 
 use std::marker;
 
-struct arc_destruct<T: Sync> {
+pub struct arc_destruct<T: Sync> {
     _data: isize,
     _marker: marker::PhantomData<T>
 }
@@ -37,7 +37,7 @@ fn init() -> arc_destruct<context_res> {
     arc(context_res())
 }
 
-struct context_res {
+pub struct context_res {
     ctx : isize,
 }
 
diff --git a/src/test/compile-fail/lint-dead-code-1.rs b/src/test/compile-fail/lint-dead-code-1.rs
index 26770a1d37c..f45e80f5252 100644
--- a/src/test/compile-fail/lint-dead-code-1.rs
+++ b/src/test/compile-fail/lint-dead-code-1.rs
@@ -49,7 +49,7 @@ struct UsedStruct1 {
 }
 struct UsedStruct2(isize);
 struct UsedStruct3;
-struct UsedStruct4;
+pub struct UsedStruct4;
 // this struct is never used directly, but its method is, so we don't want
 // to warn it
 struct SemiUsedStruct;
diff --git a/src/test/compile-fail/lint-visible-private-types.rs b/src/test/compile-fail/lint-visible-private-types.rs
index d34738282eb..cf6f2c1e17c 100644
--- a/src/test/compile-fail/lint-visible-private-types.rs
+++ b/src/test/compile-fail/lint-visible-private-types.rs
@@ -32,7 +32,7 @@ impl Public<Private<isize>> {
     pub fn a(&self) -> Private<isize> { panic!() }
     fn b(&self) -> Private<isize> { panic!() }
 
-    pub fn c() -> Private<isize> { panic!() } //~ ERROR private type in exported type signature
+    pub fn c() -> Private<isize> { panic!() }
     fn d() -> Private<isize> { panic!() }
 }
 impl Public<isize> {
@@ -75,8 +75,8 @@ pub trait PubTrait {
 }
 
 impl PubTrait for Public<isize> {
-    fn bar(&self) -> Private<isize> { panic!() }
-    fn baz() -> Private<isize> { panic!() }
+    fn bar(&self) -> Private<isize> { panic!() } //~ ERROR private type in exported type signature
+    fn baz() -> Private<isize> { panic!() } //~ ERROR private type in exported type signature
 }
 impl PubTrait for Public<Private<isize>> {
     fn bar(&self) -> Private<isize> { panic!() }
@@ -108,7 +108,7 @@ pub trait ParamTrait<T> {
     fn foo() -> T;
 }
 
-impl ParamTrait<Private<isize>> //~ ERROR private type in exported type signature
+impl ParamTrait<Private<isize>>
    for Public<isize> {
     fn foo() -> Private<isize> { panic!() }
 }
diff --git a/src/test/debuginfo/type-names.rs b/src/test/debuginfo/type-names.rs
index 3db3e9d311d..a74369ed3c3 100644
--- a/src/test/debuginfo/type-names.rs
+++ b/src/test/debuginfo/type-names.rs
@@ -182,7 +182,7 @@ use self::Enum1::{Variant1, Variant2};
 use std::marker::PhantomData;
 use std::ptr;
 
-struct Struct1;
+pub struct Struct1;
 struct GenericStruct<T1, T2>(PhantomData<(T1,T2)>);
 
 enum Enum1 {
diff --git a/src/test/run-pass/default_ty_param_struct_and_type_alias.rs b/src/test/run-pass/default_ty_param_struct_and_type_alias.rs
index 6e3e60a02e5..d3bdab9082e 100644
--- a/src/test/run-pass/default_ty_param_struct_and_type_alias.rs
+++ b/src/test/run-pass/default_ty_param_struct_and_type_alias.rs
@@ -13,11 +13,11 @@
 
 use std::marker::PhantomData;
 
-struct DeterministicHasher;
-struct RandomHasher;
+pub struct DeterministicHasher;
+pub struct RandomHasher;
 
 
-struct MyHashMap<K, V, H=DeterministicHasher> {
+pub struct MyHashMap<K, V, H=DeterministicHasher> {
     data: PhantomData<(K, V, H)>
 }
 
diff --git a/src/test/run-pass/issue-28983.rs b/src/test/run-pass/issue-28983.rs
index 658e9e14ee2..f70f8768766 100644
--- a/src/test/run-pass/issue-28983.rs
+++ b/src/test/run-pass/issue-28983.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-trait Test { type T; }
+pub trait Test { type T; }
 
 impl Test for u32 {
     type T = i32;
diff --git a/src/test/run-pass/visible-private-types-feature-gate.rs b/src/test/run-pass/visible-private-types-feature-gate.rs
deleted file mode 100644
index 4aa0867ae47..00000000000
--- a/src/test/run-pass/visible-private-types-feature-gate.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// pretty-expanded FIXME #23616
-
-#![feature(visible_private_types)]
-
-trait Foo { fn dummy(&self) { } }
-
-pub trait Bar : Foo {}
-
-struct Baz;
-
-pub fn f(_: Baz) {}
-
-fn main() {}