Skip to content

Commit

Permalink
Fix the fallout
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Dec 18, 2015
1 parent f3f27a5 commit 26a2f85
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 50 deletions.
12 changes: 6 additions & 6 deletions src/libcollections/btree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>],
Expand All @@ -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>],
Expand Down Expand Up @@ -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;

Expand All @@ -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>
Expand All @@ -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>>,
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/librustc_mir/build/matches/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>,

Expand All @@ -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>,

Expand Down Expand Up @@ -278,7 +278,7 @@ enum TestKind<'tcx> {
}

#[derive(Debug)]
struct Test<'tcx> {
pub struct Test<'tcx> {
span: Span,
kind: TestKind<'tcx>,
}
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_mir/build/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>,
Expand All @@ -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>;
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_trans/back/msvc/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_trans/trans/debuginfo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl FunctionDebugContext {
}
}

struct FunctionDebugContextData {
pub struct FunctionDebugContextData {
scope_map: RefCell<NodeMap<DIScope>>,
fn_metadata: DISubprogram,
argument_counter: Cell<usize>,
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/collections/hash/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/auxiliary/issue-2526.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use std::marker;

struct arc_destruct<T: Sync> {
pub struct arc_destruct<T: Sync> {
_data: isize,
_marker: marker::PhantomData<T>
}
Expand All @@ -37,7 +37,7 @@ fn init() -> arc_destruct<context_res> {
arc(context_res())
}

struct context_res {
pub struct context_res {
ctx : isize,
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/lint-dead-code-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/test/compile-fail/lint-visible-private-types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down Expand Up @@ -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!() }
Expand Down Expand Up @@ -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!() }
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/debuginfo/type-names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions src/test/run-pass/default_ty_param_struct_and_type_alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)>
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/issue-28983.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
23 changes: 0 additions & 23 deletions src/test/run-pass/visible-private-types-feature-gate.rs

This file was deleted.

0 comments on commit 26a2f85

Please sign in to comment.