]> git.lizzy.rs Git - rust.git/commitdiff
Moved tests back to compile-test if they don't work on ui.
authorDavid Wood <david@davidtw.co>
Thu, 9 Aug 2018 16:11:35 +0000 (18:11 +0200)
committerDavid Wood <david@davidtw.co>
Tue, 14 Aug 2018 09:12:11 +0000 (11:12 +0200)
src/test/compile-fail/coerce-unsafe-to-closure.rs [new file with mode: 0644]
src/test/compile-fail/issue-46209-private-enum-variant-reexport.rs [new file with mode: 0644]
src/test/compile-fail/meta-expected-error-wrong-rev.rs [new file with mode: 0644]
src/test/ui/coercion/coerce-unsafe-to-closure.rs [deleted file]
src/test/ui/coercion/coerce-unsafe-to-closure.stderr [deleted file]
src/test/ui/invalid-module-declaration/invalid-module-declaration.rs
src/test/ui/issues/issue-46209-private-enum-variant-reexport.rs [deleted file]
src/test/ui/issues/issue-46209-private-enum-variant-reexport.stderr [deleted file]
src/test/ui/meta-expected-error-wrong-rev.a.stderr [deleted file]
src/test/ui/meta-expected-error-wrong-rev.rs [deleted file]

diff --git a/src/test/compile-fail/coerce-unsafe-to-closure.rs b/src/test/compile-fail/coerce-unsafe-to-closure.rs
new file mode 100644 (file)
index 0000000..90cbbf2
--- /dev/null
@@ -0,0 +1,14 @@
+// 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
+}
diff --git a/src/test/compile-fail/issue-46209-private-enum-variant-reexport.rs b/src/test/compile-fail/issue-46209-private-enum-variant-reexport.rs
new file mode 100644 (file)
index 0000000..f5a20dd
--- /dev/null
@@ -0,0 +1,51 @@
+// 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() {}
diff --git a/src/test/compile-fail/meta-expected-error-wrong-rev.rs b/src/test/compile-fail/meta-expected-error-wrong-rev.rs
new file mode 100644 (file)
index 0000000..8869e95
--- /dev/null
@@ -0,0 +1,26 @@
+// 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() { }
diff --git a/src/test/ui/coercion/coerce-unsafe-to-closure.rs b/src/test/ui/coercion/coerce-unsafe-to-closure.rs
deleted file mode 100644 (file)
index 90cbbf2..0000000
+++ /dev/null
@@ -1,14 +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.
-
-fn main() {
-    let x: Option<&[u8]> = Some("foo").map(std::mem::transmute);
-    //~^ ERROR E0277
-}
diff --git a/src/test/ui/coercion/coerce-unsafe-to-closure.stderr b/src/test/ui/coercion/coerce-unsafe-to-closure.stderr
deleted file mode 100644 (file)
index bf355b4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-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`.
index 18ca5d09798bcb198fad5483cdb00cab58067da4..c0a10fe3e60fe2afc19ec0869d0e980b2362f79b 100644 (file)
@@ -11,9 +11,6 @@
 // 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;
 }
diff --git a/src/test/ui/issues/issue-46209-private-enum-variant-reexport.rs b/src/test/ui/issues/issue-46209-private-enum-variant-reexport.rs
deleted file mode 100644 (file)
index f5a20dd..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-// 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() {}
diff --git a/src/test/ui/issues/issue-46209-private-enum-variant-reexport.stderr b/src/test/ui/issues/issue-46209-private-enum-variant-reexport.stderr
deleted file mode 100644 (file)
index 9e5abde..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-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
-
diff --git a/src/test/ui/meta-expected-error-wrong-rev.a.stderr b/src/test/ui/meta-expected-error-wrong-rev.a.stderr
deleted file mode 100644 (file)
index c3c3918..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-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`.
diff --git a/src/test/ui/meta-expected-error-wrong-rev.rs b/src/test/ui/meta-expected-error-wrong-rev.rs
deleted file mode 100644 (file)
index 8869e95..0000000
+++ /dev/null
@@ -1,26 +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.
-
-// 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() { }