mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 14:31:55 +00:00
Fix the fallout
This commit is contained in:
parent
f3f27a5c64
commit
26a2f852be
@ -78,7 +78,7 @@ pub struct Node<K, V> {
|
|||||||
_capacity: usize,
|
_capacity: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct NodeSlice<'a, K: 'a, V: 'a> {
|
pub struct NodeSlice<'a, K: 'a, V: 'a> {
|
||||||
keys: &'a [K],
|
keys: &'a [K],
|
||||||
vals: &'a [V],
|
vals: &'a [V],
|
||||||
pub edges: &'a [Node<K, V>],
|
pub edges: &'a [Node<K, V>],
|
||||||
@ -87,7 +87,7 @@ struct NodeSlice<'a, K: 'a, V: 'a> {
|
|||||||
has_edges: bool,
|
has_edges: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct MutNodeSlice<'a, K: 'a, V: 'a> {
|
pub struct MutNodeSlice<'a, K: 'a, V: 'a> {
|
||||||
keys: &'a [K],
|
keys: &'a [K],
|
||||||
vals: &'a mut [V],
|
vals: &'a mut [V],
|
||||||
pub edges: &'a mut [Node<K, 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
|
/// 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`,
|
/// necessary, as the `MoveTraversalImpl` needs to have a destructor that deallocates the `Node`,
|
||||||
/// and a pair of `Iterator`s would require two independent destructors.
|
/// and a pair of `Iterator`s would require two independent destructors.
|
||||||
trait TraversalImpl {
|
pub trait TraversalImpl {
|
||||||
type Item;
|
type Item;
|
||||||
type Edge;
|
type Edge;
|
||||||
|
|
||||||
@ -1358,7 +1358,7 @@ trait TraversalImpl {
|
|||||||
/// A `TraversalImpl` that actually is backed by two iterators. This works in the non-moving case,
|
/// A `TraversalImpl` that actually is backed by two iterators. This works in the non-moving case,
|
||||||
/// as no deallocation needs to be done.
|
/// as no deallocation needs to be done.
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct ElemsAndEdges<Elems, Edges>(Elems, Edges);
|
pub struct ElemsAndEdges<Elems, Edges>(Elems, Edges);
|
||||||
|
|
||||||
impl<K, V, E, Elems: DoubleEndedIterator, Edges: DoubleEndedIterator>
|
impl<K, V, E, Elems: DoubleEndedIterator, Edges: DoubleEndedIterator>
|
||||||
TraversalImpl for ElemsAndEdges<Elems, Edges>
|
TraversalImpl for ElemsAndEdges<Elems, Edges>
|
||||||
@ -1375,7 +1375,7 @@ impl<K, V, E, Elems: DoubleEndedIterator, Edges: DoubleEndedIterator>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// A `TraversalImpl` taking a `Node` by value.
|
/// A `TraversalImpl` taking a `Node` by value.
|
||||||
struct MoveTraversalImpl<K, V> {
|
pub struct MoveTraversalImpl<K, V> {
|
||||||
keys: RawItems<K>,
|
keys: RawItems<K>,
|
||||||
vals: RawItems<V>,
|
vals: RawItems<V>,
|
||||||
edges: RawItems<Node<K, 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
|
/// An abstraction over all the different kinds of traversals a node supports
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct AbsTraversal<Impl> {
|
pub struct AbsTraversal<Impl> {
|
||||||
inner: Impl,
|
inner: Impl,
|
||||||
head_is_edge: bool,
|
head_is_edge: bool,
|
||||||
tail_is_edge: bool,
|
tail_is_edge: bool,
|
||||||
|
@ -209,7 +209,7 @@ struct ArmBlocks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
struct Candidate<'pat, 'tcx:'pat> {
|
pub struct Candidate<'pat, 'tcx:'pat> {
|
||||||
// all of these must be satisfied...
|
// all of these must be satisfied...
|
||||||
match_pairs: Vec<MatchPair<'pat, 'tcx>>,
|
match_pairs: Vec<MatchPair<'pat, 'tcx>>,
|
||||||
|
|
||||||
@ -235,7 +235,7 @@ struct Binding<'tcx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
struct MatchPair<'pat, 'tcx:'pat> {
|
pub struct MatchPair<'pat, 'tcx:'pat> {
|
||||||
// this lvalue...
|
// this lvalue...
|
||||||
lvalue: Lvalue<'tcx>,
|
lvalue: Lvalue<'tcx>,
|
||||||
|
|
||||||
@ -278,7 +278,7 @@ enum TestKind<'tcx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct Test<'tcx> {
|
pub struct Test<'tcx> {
|
||||||
span: Span,
|
span: Span,
|
||||||
kind: TestKind<'tcx>,
|
kind: TestKind<'tcx>,
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ use rustc_front::hir;
|
|||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::Span;
|
use syntax::codemap::Span;
|
||||||
|
|
||||||
struct Builder<'a, 'tcx: 'a> {
|
pub struct Builder<'a, 'tcx: 'a> {
|
||||||
hir: Cx<'a, 'tcx>,
|
hir: Cx<'a, 'tcx>,
|
||||||
cfg: CFG<'tcx>,
|
cfg: CFG<'tcx>,
|
||||||
scopes: Vec<scope::Scope<'tcx>>,
|
scopes: Vec<scope::Scope<'tcx>>,
|
||||||
@ -40,7 +40,7 @@ struct CFG<'tcx> {
|
|||||||
// convenient.
|
// convenient.
|
||||||
|
|
||||||
#[must_use] // if you don't use one of these results, you're leaving a dangling edge
|
#[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 {
|
trait BlockAndExtension {
|
||||||
fn and<T>(self, v: T) -> BlockAnd<T>;
|
fn and<T>(self, v: T) -> BlockAnd<T>;
|
||||||
|
@ -14,7 +14,7 @@ use std::os::windows::prelude::*;
|
|||||||
use std::ptr;
|
use std::ptr;
|
||||||
use libc::{c_void, c_long};
|
use libc::{c_void, c_long};
|
||||||
|
|
||||||
type DWORD = u32;
|
pub type DWORD = u32;
|
||||||
type LPCWSTR = *const u16;
|
type LPCWSTR = *const u16;
|
||||||
type LONG = c_long;
|
type LONG = c_long;
|
||||||
type LPDWORD = *mut DWORD;
|
type LPDWORD = *mut DWORD;
|
||||||
@ -34,7 +34,7 @@ const SYNCHRONIZE: REGSAM = 0x00100000;
|
|||||||
const REG_SZ: DWORD = 1;
|
const REG_SZ: DWORD = 1;
|
||||||
const ERROR_SUCCESS: i32 = 0;
|
const ERROR_SUCCESS: i32 = 0;
|
||||||
|
|
||||||
enum __HKEY__ {}
|
pub enum __HKEY__ {}
|
||||||
pub type HKEY = *mut __HKEY__;
|
pub type HKEY = *mut __HKEY__;
|
||||||
pub type PHKEY = *mut HKEY;
|
pub type PHKEY = *mut HKEY;
|
||||||
pub type REGSAM = DWORD;
|
pub type REGSAM = DWORD;
|
||||||
|
@ -145,7 +145,7 @@ impl FunctionDebugContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct FunctionDebugContextData {
|
pub struct FunctionDebugContextData {
|
||||||
scope_map: RefCell<NodeMap<DIScope>>,
|
scope_map: RefCell<NodeMap<DIScope>>,
|
||||||
fn_metadata: DISubprogram,
|
fn_metadata: DISubprogram,
|
||||||
argument_counter: Cell<usize>,
|
argument_counter: Cell<usize>,
|
||||||
|
@ -123,7 +123,7 @@ pub enum BucketState<K, V, M> {
|
|||||||
// A GapThenFull encapsulates the state of two consecutive buckets at once.
|
// A GapThenFull encapsulates the state of two consecutive buckets at once.
|
||||||
// The first bucket, called the gap, is known to be empty.
|
// The first bucket, called the gap, is known to be empty.
|
||||||
// The second bucket is full.
|
// The second bucket is full.
|
||||||
struct GapThenFull<K, V, M> {
|
pub struct GapThenFull<K, V, M> {
|
||||||
gap: EmptyBucket<K, V, ()>,
|
gap: EmptyBucket<K, V, ()>,
|
||||||
full: FullBucket<K, V, M>,
|
full: FullBucket<K, V, M>,
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
use std::marker;
|
use std::marker;
|
||||||
|
|
||||||
struct arc_destruct<T: Sync> {
|
pub struct arc_destruct<T: Sync> {
|
||||||
_data: isize,
|
_data: isize,
|
||||||
_marker: marker::PhantomData<T>
|
_marker: marker::PhantomData<T>
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ fn init() -> arc_destruct<context_res> {
|
|||||||
arc(context_res())
|
arc(context_res())
|
||||||
}
|
}
|
||||||
|
|
||||||
struct context_res {
|
pub struct context_res {
|
||||||
ctx : isize,
|
ctx : isize,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ struct UsedStruct1 {
|
|||||||
}
|
}
|
||||||
struct UsedStruct2(isize);
|
struct UsedStruct2(isize);
|
||||||
struct UsedStruct3;
|
struct UsedStruct3;
|
||||||
struct UsedStruct4;
|
pub struct UsedStruct4;
|
||||||
// this struct is never used directly, but its method is, so we don't want
|
// this struct is never used directly, but its method is, so we don't want
|
||||||
// to warn it
|
// to warn it
|
||||||
struct SemiUsedStruct;
|
struct SemiUsedStruct;
|
||||||
|
@ -32,7 +32,7 @@ impl Public<Private<isize>> {
|
|||||||
pub fn a(&self) -> Private<isize> { panic!() }
|
pub fn a(&self) -> Private<isize> { panic!() }
|
||||||
fn b(&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!() }
|
fn d() -> Private<isize> { panic!() }
|
||||||
}
|
}
|
||||||
impl Public<isize> {
|
impl Public<isize> {
|
||||||
@ -75,8 +75,8 @@ pub trait PubTrait {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl PubTrait for Public<isize> {
|
impl PubTrait for Public<isize> {
|
||||||
fn bar(&self) -> Private<isize> { panic!() }
|
fn bar(&self) -> Private<isize> { panic!() } //~ ERROR private type in exported type signature
|
||||||
fn baz() -> Private<isize> { panic!() }
|
fn baz() -> Private<isize> { panic!() } //~ ERROR private type in exported type signature
|
||||||
}
|
}
|
||||||
impl PubTrait for Public<Private<isize>> {
|
impl PubTrait for Public<Private<isize>> {
|
||||||
fn bar(&self) -> Private<isize> { panic!() }
|
fn bar(&self) -> Private<isize> { panic!() }
|
||||||
@ -108,7 +108,7 @@ pub trait ParamTrait<T> {
|
|||||||
fn foo() -> T;
|
fn foo() -> T;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ParamTrait<Private<isize>> //~ ERROR private type in exported type signature
|
impl ParamTrait<Private<isize>>
|
||||||
for Public<isize> {
|
for Public<isize> {
|
||||||
fn foo() -> Private<isize> { panic!() }
|
fn foo() -> Private<isize> { panic!() }
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ use self::Enum1::{Variant1, Variant2};
|
|||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
struct Struct1;
|
pub struct Struct1;
|
||||||
struct GenericStruct<T1, T2>(PhantomData<(T1,T2)>);
|
struct GenericStruct<T1, T2>(PhantomData<(T1,T2)>);
|
||||||
|
|
||||||
enum Enum1 {
|
enum Enum1 {
|
||||||
|
@ -13,11 +13,11 @@
|
|||||||
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
struct DeterministicHasher;
|
pub struct DeterministicHasher;
|
||||||
struct RandomHasher;
|
pub struct RandomHasher;
|
||||||
|
|
||||||
|
|
||||||
struct MyHashMap<K, V, H=DeterministicHasher> {
|
pub struct MyHashMap<K, V, H=DeterministicHasher> {
|
||||||
data: PhantomData<(K, V, H)>
|
data: PhantomData<(K, V, H)>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
trait Test { type T; }
|
pub trait Test { type T; }
|
||||||
|
|
||||||
impl Test for u32 {
|
impl Test for u32 {
|
||||||
type T = i32;
|
type T = i32;
|
||||||
|
@ -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() {}
|
|
Loading…
Reference in New Issue
Block a user