From 26a2f852beae15235e7d3c4c5751ffe8e9459817 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sat, 21 Nov 2015 17:39:15 +0300 Subject: Fix the fallout --- src/test/auxiliary/issue-2526.rs | 4 ++-- src/test/compile-fail/lint-dead-code-1.rs | 2 +- .../compile-fail/lint-visible-private-types.rs | 8 ++++---- src/test/debuginfo/type-names.rs | 2 +- .../default_ty_param_struct_and_type_alias.rs | 6 +++--- src/test/run-pass/issue-28983.rs | 2 +- .../run-pass/visible-private-types-feature-gate.rs | 23 ---------------------- 7 files changed, 12 insertions(+), 35 deletions(-) delete mode 100644 src/test/run-pass/visible-private-types-feature-gate.rs (limited to 'src/test') 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 { +pub struct arc_destruct { _data: isize, _marker: marker::PhantomData } @@ -37,7 +37,7 @@ fn init() -> arc_destruct { 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> { pub fn a(&self) -> Private { panic!() } fn b(&self) -> Private { panic!() } - pub fn c() -> Private { panic!() } //~ ERROR private type in exported type signature + pub fn c() -> Private { panic!() } fn d() -> Private { panic!() } } impl Public { @@ -75,8 +75,8 @@ pub trait PubTrait { } impl PubTrait for Public { - fn bar(&self) -> Private { panic!() } - fn baz() -> Private { panic!() } + fn bar(&self) -> Private { panic!() } //~ ERROR private type in exported type signature + fn baz() -> Private { panic!() } //~ ERROR private type in exported type signature } impl PubTrait for Public> { fn bar(&self) -> Private { panic!() } @@ -108,7 +108,7 @@ pub trait ParamTrait { fn foo() -> T; } -impl ParamTrait> //~ ERROR private type in exported type signature +impl ParamTrait> for Public { fn foo() -> Private { 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(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 { +pub struct MyHashMap { 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 or the MIT license -// , 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() {} -- cgit 1.4.1-3-g733a5