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/compile-fail | |
| parent | 170ccd615f976fc9e90a8f14ce6c373bfdf01533 (diff) | |
| download | rust-432011d1437ce046c25dde8a4db67dac63c19ed0.tar.gz rust-432011d1437ce046c25dde8a4db67dac63c19ed0.zip | |
Fallout in testing.
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/lint-dead-code-3.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/privacy1.rs | 16 |
2 files changed, 4 insertions, 14 deletions
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(); } |
