diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-11-21 17:39:15 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-12-18 04:12:31 +0300 |
| commit | 26a2f852beae15235e7d3c4c5751ffe8e9459817 (patch) | |
| tree | 9d5ede80534b4d6bb061618d9fdbb2f5c2d79f15 /src/test | |
| parent | f3f27a5c6483d9e2bb3c872a3b05291a6e1d9cb3 (diff) | |
Fix the fallout
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/auxiliary/issue-2526.rs | 4 | ||||
| -rw-r--r-- | src/test/compile-fail/lint-dead-code-1.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/lint-visible-private-types.rs | 8 | ||||
| -rw-r--r-- | src/test/debuginfo/type-names.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/default_ty_param_struct_and_type_alias.rs | 6 | ||||
| -rw-r--r-- | src/test/run-pass/issue-28983.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/visible-private-types-feature-gate.rs | 23 |
7 files changed, 12 insertions, 35 deletions
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() {} |
