diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2015-03-16 09:00:41 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2015-03-16 11:03:54 +1300 |
| commit | 432011d1437ce046c25dde8a4db67dac63c19ed0 (patch) | |
| tree | a58820426c5f3e925c3cdb0d11faf4d408ee37c4 /src/test | |
| parent | 170ccd615f976fc9e90a8f14ce6c373bfdf01533 (diff) | |
| download | rust-432011d1437ce046c25dde8a4db67dac63c19ed0.tar.gz rust-432011d1437ce046c25dde8a4db67dac63c19ed0.zip | |
Fallout in testing.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/auxiliary/privacy_reexport.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/lint-dead-code-3.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/privacy1.rs | 16 | ||||
| -rw-r--r-- | src/test/run-pass/issue-16597.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/issue-20823.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/issue-5950.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/test-fn-signature-verification-for-explicit-return-type.rs | 4 | ||||
| -rw-r--r-- | src/test/run-pass/test-should-fail-good-message.rs | 4 |
8 files changed, 12 insertions, 22 deletions
diff --git a/src/test/auxiliary/privacy_reexport.rs b/src/test/auxiliary/privacy_reexport.rs index 266903169c7..e60dbb290b0 100644 --- a/src/test/auxiliary/privacy_reexport.rs +++ b/src/test/auxiliary/privacy_reexport.rs @@ -10,6 +10,6 @@ pub use foo as bar; -mod foo { +pub mod foo { pub fn frob() {} } diff --git a/src/test/compile-fail/lint-dead-code-3.rs b/src/test/compile-fail/lint-dead-code-3.rs index f60c39ba020..13ee3f16361 100644 --- a/src/test/compile-fail/lint-dead-code-3.rs +++ b/src/test/compile-fail/lint-dead-code-3.rs @@ -19,7 +19,7 @@ extern crate libc; pub use extern_foo as x; extern { - fn extern_foo(); + pub fn extern_foo(); } struct Foo; //~ ERROR: struct is never used diff --git a/src/test/compile-fail/privacy1.rs b/src/test/compile-fail/privacy1.rs index 1ae79adbad7..67dccb4c93e 100644 --- a/src/test/compile-fail/privacy1.rs +++ b/src/test/compile-fail/privacy1.rs @@ -27,10 +27,6 @@ mod bar { // can't publicly re-export private items pub use self::baz::{foo, bar}; - //~^ ERROR: function `bar` is private - - pub use self::private::ppriv; - //~^ ERROR: function `ppriv` is private pub struct A; impl A { @@ -61,10 +57,8 @@ mod bar { fn bar2(&self) {} } - // both of these are re-exported by `bar`, but only one should be - // validly re-exported pub fn foo() {} - fn bar() {} + pub fn bar() {} } extern { @@ -92,10 +86,6 @@ mod bar { pub fn gpub() {} fn gpriv() {} } - - mod private { - fn ppriv() {} - } } pub fn gpub() {} @@ -142,13 +132,13 @@ mod foo { ::bar::baz::foo(); //~ ERROR: function `foo` is inaccessible //~^ NOTE: module `baz` is private - ::bar::baz::bar(); //~ ERROR: function `bar` is private + ::bar::baz::bar(); //~ ERROR: function `bar` is inaccessible } fn test2() { use bar::baz::{foo, bar}; //~^ ERROR: function `foo` is inaccessible - //~^^ ERROR: function `bar` is private + //~^^ ERROR: function `bar` is inaccessible foo(); bar(); } diff --git a/src/test/run-pass/issue-16597.rs b/src/test/run-pass/issue-16597.rs index 72e948e613b..d074095dbde 100644 --- a/src/test/run-pass/issue-16597.rs +++ b/src/test/run-pass/issue-16597.rs @@ -15,5 +15,5 @@ mod test { use super::*; #[test] - fn test(){} + pub fn test(){} } diff --git a/src/test/run-pass/issue-20823.rs b/src/test/run-pass/issue-20823.rs index 561b6195476..c297998b649 100644 --- a/src/test/run-pass/issue-20823.rs +++ b/src/test/run-pass/issue-20823.rs @@ -14,4 +14,4 @@ #![deny(unstable)] #[test] -fn foo() {} +pub fn foo() {} diff --git a/src/test/run-pass/issue-5950.rs b/src/test/run-pass/issue-5950.rs index c9413258e0f..88bbba44bbe 100644 --- a/src/test/run-pass/issue-5950.rs +++ b/src/test/run-pass/issue-5950.rs @@ -11,6 +11,6 @@ pub use local as local_alias; -mod local { } +pub mod local { } pub fn main() {} diff --git a/src/test/run-pass/test-fn-signature-verification-for-explicit-return-type.rs b/src/test/run-pass/test-fn-signature-verification-for-explicit-return-type.rs index 7c99c968e35..f7985efbc31 100644 --- a/src/test/run-pass/test-fn-signature-verification-for-explicit-return-type.rs +++ b/src/test/run-pass/test-fn-signature-verification-for-explicit-return-type.rs @@ -13,8 +13,8 @@ extern crate test; #[bench] -fn bench_explicit_return_type(_: &mut ::test::Bencher) -> () {} +pub fn bench_explicit_return_type(_: &mut ::test::Bencher) -> () {} #[test] -fn test_explicit_return_type() -> () {} +pub fn test_explicit_return_type() -> () {} diff --git a/src/test/run-pass/test-should-fail-good-message.rs b/src/test/run-pass/test-should-fail-good-message.rs index b8e05b4d35a..94d20f703a0 100644 --- a/src/test/run-pass/test-should-fail-good-message.rs +++ b/src/test/run-pass/test-should-fail-good-message.rs @@ -13,13 +13,13 @@ #[test] #[should_panic(expected = "foo")] -fn test_foo() { +pub fn test_foo() { panic!("foo bar") } #[test] #[should_panic(expected = "foo")] -fn test_foo_dynamic() { +pub fn test_foo_dynamic() { panic!("{} bar", "foo") } |
