--- /dev/null
+// 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.
+
+fn main() {
+ let x: Option<&[u8]> = Some("foo").map(std::mem::transmute);
+ //~^ ERROR E0277
+}
--- /dev/null
+// Copyright 2017 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.
+
+#![feature(crate_visibility_modifier)]
+
+mod rank {
+ pub use self::Professor::*;
+ //~^ ERROR enum is private and its variants cannot be re-exported
+ pub use self::Lieutenant::{JuniorGrade, Full};
+ //~^ ERROR variant `JuniorGrade` is private and cannot be re-exported
+ //~| ERROR variant `Full` is private and cannot be re-exported
+ pub use self::PettyOfficer::*;
+ //~^ ERROR enum is private and its variants cannot be re-exported
+ pub use self::Crewman::*;
+ //~^ ERROR enum is private and its variants cannot be re-exported
+
+ enum Professor {
+ Adjunct,
+ Assistant,
+ Associate,
+ Full
+ }
+
+ enum Lieutenant {
+ JuniorGrade,
+ Full,
+ }
+
+ pub(in rank) enum PettyOfficer {
+ SecondClass,
+ FirstClass,
+ Chief,
+ MasterChief
+ }
+
+ crate enum Crewman {
+ Recruit,
+ Apprentice,
+ Full
+ }
+
+}
+
+fn main() {}
--- /dev/null
+// 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.
+
+// ignore-compare-mode-nll
+
+// revisions: a
+// should-fail
+
+// This is a "meta-test" of the compilertest framework itself. In
+// particular, it includes the right error message, but the message
+// targets the wrong revision, so we expect the execution to fail.
+// See also `meta-expected-error-correct-rev.rs`.
+
+#[cfg(a)]
+fn foo() {
+ let x: u32 = 22_usize; //[b]~ ERROR mismatched types
+}
+
+fn main() { }
+++ /dev/null
-// 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.
-
-fn main() {
- let x: Option<&[u8]> = Some("foo").map(std::mem::transmute);
- //~^ ERROR E0277
-}
+++ /dev/null
-error[E0277]: the trait bound `unsafe extern "rust-intrinsic" fn(_) -> _ {std::mem::transmute::<_, _>}: std::ops::FnOnce<(&str,)>` is not satisfied
- --> $DIR/coerce-unsafe-to-closure.rs:12:40
- |
-LL | let x: Option<&[u8]> = Some("foo").map(std::mem::transmute);
- | ^^^ the trait `std::ops::FnOnce<(&str,)>` is not implemented for `unsafe extern "rust-intrinsic" fn(_) -> _ {std::mem::transmute::<_, _>}`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
// ignore-tidy-linelength
// ignore-windows
-// error-pattern: cannot declare a new module at this location
-// error-pattern: maybe move this module
-
mod auxiliary {
mod foo;
}
+++ /dev/null
-// Copyright 2017 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.
-
-#![feature(crate_visibility_modifier)]
-
-mod rank {
- pub use self::Professor::*;
- //~^ ERROR enum is private and its variants cannot be re-exported
- pub use self::Lieutenant::{JuniorGrade, Full};
- //~^ ERROR variant `JuniorGrade` is private and cannot be re-exported
- //~| ERROR variant `Full` is private and cannot be re-exported
- pub use self::PettyOfficer::*;
- //~^ ERROR enum is private and its variants cannot be re-exported
- pub use self::Crewman::*;
- //~^ ERROR enum is private and its variants cannot be re-exported
-
- enum Professor {
- Adjunct,
- Assistant,
- Associate,
- Full
- }
-
- enum Lieutenant {
- JuniorGrade,
- Full,
- }
-
- pub(in rank) enum PettyOfficer {
- SecondClass,
- FirstClass,
- Chief,
- MasterChief
- }
-
- crate enum Crewman {
- Recruit,
- Apprentice,
- Full
- }
-
-}
-
-fn main() {}
+++ /dev/null
-error: enum is private and its variants cannot be re-exported
- --> $DIR/issue-46209-private-enum-variant-reexport.rs:19:13
- |
-LL | pub use self::PettyOfficer::*;
- | ^^^^^^^^^^^^^^^^^^^^^
-...
-LL | pub(in rank) enum PettyOfficer {
- | ------------------------------ help: consider making the enum public: `pub enum PettyOfficer`
-
-error: enum is private and its variants cannot be re-exported
- --> $DIR/issue-46209-private-enum-variant-reexport.rs:21:13
- |
-LL | pub use self::Crewman::*;
- | ^^^^^^^^^^^^^^^^
-...
-LL | crate enum Crewman {
- | ------------------ help: consider making the enum public: `pub enum Crewman`
-
-error: enum is private and its variants cannot be re-exported
- --> $DIR/issue-46209-private-enum-variant-reexport.rs:14:13
- |
-LL | pub use self::Professor::*;
- | ^^^^^^^^^^^^^^^^^^
-...
-LL | enum Professor {
- | -------------- help: consider making the enum public: `pub enum Professor`
-
-error: variant `JuniorGrade` is private and cannot be re-exported
- --> $DIR/issue-46209-private-enum-variant-reexport.rs:16:32
- |
-LL | pub use self::Lieutenant::{JuniorGrade, Full};
- | ^^^^^^^^^^^
-...
-LL | enum Lieutenant {
- | --------------- help: consider making the enum public: `pub enum Lieutenant`
-
-error: variant `Full` is private and cannot be re-exported
- --> $DIR/issue-46209-private-enum-variant-reexport.rs:16:45
- |
-LL | pub use self::Lieutenant::{JuniorGrade, Full};
- | ^^^^
-
-error: aborting due to 5 previous errors
-
+++ /dev/null
-error[E0308]: mismatched types
- --> $DIR/meta-expected-error-wrong-rev.rs:23:18
- |
-LL | let x: u32 = 22_usize; //[b]~ ERROR mismatched types
- | ^^^^^^^^ expected u32, found usize
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
+++ /dev/null
-// 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.
-
-// ignore-compare-mode-nll
-
-// revisions: a
-// should-fail
-
-// This is a "meta-test" of the compilertest framework itself. In
-// particular, it includes the right error message, but the message
-// targets the wrong revision, so we expect the execution to fail.
-// See also `meta-expected-error-correct-rev.rs`.
-
-#[cfg(a)]
-fn foo() {
- let x: u32 = 22_usize; //[b]~ ERROR mismatched types
-}
-
-fn main() { }