]> git.lizzy.rs Git - rust.git/commitdiff
Moved problematic tests on x86_64-pc-windows-gnu back to compile-fail.
authorDavid Wood <david@davidtw.co>
Mon, 13 Aug 2018 22:38:05 +0000 (00:38 +0200)
committerDavid Wood <david@davidtw.co>
Tue, 14 Aug 2018 09:12:12 +0000 (11:12 +0200)
src/test/compile-fail/auxiliary/some-panic-impl.rs [new file with mode: 0644]
src/test/compile-fail/auxiliary/weak-lang-items.rs [new file with mode: 0644]
src/test/compile-fail/panic-implementation-missing.rs [new file with mode: 0644]
src/test/compile-fail/panic-implementation-twice.rs [new file with mode: 0644]
src/test/compile-fail/weak-lang-item.rs [new file with mode: 0644]
src/test/ui/panic-implementation/panic-implementation-missing.rs [deleted file]
src/test/ui/panic-implementation/panic-implementation-missing.stderr [deleted file]
src/test/ui/panic-implementation/panic-implementation-twice.rs [deleted file]
src/test/ui/panic-implementation/panic-implementation-twice.stderr [deleted file]
src/test/ui/weak-lang-item.rs [deleted file]
src/test/ui/weak-lang-item.stderr [deleted file]

diff --git a/src/test/compile-fail/auxiliary/some-panic-impl.rs b/src/test/compile-fail/auxiliary/some-panic-impl.rs
new file mode 100644 (file)
index 0000000..db16ac3
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2018 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.
+
+// no-prefer-dynamic
+
+#![crate_type = "rlib"]
+#![feature(panic_implementation)]
+#![no_std]
+
+use core::panic::PanicInfo;
+
+#[panic_implementation]
+fn panic(info: &PanicInfo) -> ! {
+    loop {}
+}
diff --git a/src/test/compile-fail/auxiliary/weak-lang-items.rs b/src/test/compile-fail/auxiliary/weak-lang-items.rs
new file mode 100644 (file)
index 0000000..6434e62
--- /dev/null
@@ -0,0 +1,32 @@
+// 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.
+
+// no-prefer-dynamic
+
+// This aux-file will require the eh_personality function to be codegen'd, but
+// it hasn't been defined just yet. Make sure we don't explode.
+
+#![no_std]
+#![crate_type = "rlib"]
+
+struct A;
+
+impl core::ops::Drop for A {
+    fn drop(&mut self) {}
+}
+
+pub fn foo() {
+    let _a = A;
+    panic!("wut");
+}
+
+mod std {
+    pub use core::{option, fmt};
+}
diff --git a/src/test/compile-fail/panic-implementation-missing.rs b/src/test/compile-fail/panic-implementation-missing.rs
new file mode 100644 (file)
index 0000000..b11081a
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2018 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.
+
+// error-pattern: `#[panic_implementation]` function required, but not found
+
+#![feature(lang_items)]
+#![no_main]
+#![no_std]
+
+#[lang = "eh_personality"]
+fn eh() {}
diff --git a/src/test/compile-fail/panic-implementation-twice.rs b/src/test/compile-fail/panic-implementation-twice.rs
new file mode 100644 (file)
index 0000000..78dc545
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2018 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.
+
+// aux-build:some-panic-impl.rs
+
+#![feature(panic_implementation)]
+#![feature(lang_items)]
+#![no_std]
+#![no_main]
+
+extern crate some_panic_impl;
+
+use core::panic::PanicInfo;
+
+#[panic_implementation]
+fn panic(info: &PanicInfo) -> ! {
+    //~^ error duplicate lang item found: `panic_impl`
+    loop {}
+}
+
+#[lang = "eh_personality"]
+fn eh() {}
diff --git a/src/test/compile-fail/weak-lang-item.rs b/src/test/compile-fail/weak-lang-item.rs
new file mode 100644 (file)
index 0000000..42972c4
--- /dev/null
@@ -0,0 +1,21 @@
+// 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.
+
+// aux-build:weak-lang-items.rs
+// error-pattern: `#[panic_implementation]` function required, but not found
+// error-pattern: language item required, but not found: `eh_personality`
+// ignore-wasm32-bare compiled with panic=abort, personality not required
+
+#![no_std]
+
+extern crate core;
+extern crate weak_lang_items;
+
+fn main() {}
diff --git a/src/test/ui/panic-implementation/panic-implementation-missing.rs b/src/test/ui/panic-implementation/panic-implementation-missing.rs
deleted file mode 100644 (file)
index b11081a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2018 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.
-
-// error-pattern: `#[panic_implementation]` function required, but not found
-
-#![feature(lang_items)]
-#![no_main]
-#![no_std]
-
-#[lang = "eh_personality"]
-fn eh() {}
diff --git a/src/test/ui/panic-implementation/panic-implementation-missing.stderr b/src/test/ui/panic-implementation/panic-implementation-missing.stderr
deleted file mode 100644 (file)
index e813338..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-error: `#[panic_implementation]` function required, but not found
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/panic-implementation/panic-implementation-twice.rs b/src/test/ui/panic-implementation/panic-implementation-twice.rs
deleted file mode 100644 (file)
index 78dc545..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2018 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.
-
-// aux-build:some-panic-impl.rs
-
-#![feature(panic_implementation)]
-#![feature(lang_items)]
-#![no_std]
-#![no_main]
-
-extern crate some_panic_impl;
-
-use core::panic::PanicInfo;
-
-#[panic_implementation]
-fn panic(info: &PanicInfo) -> ! {
-    //~^ error duplicate lang item found: `panic_impl`
-    loop {}
-}
-
-#[lang = "eh_personality"]
-fn eh() {}
diff --git a/src/test/ui/panic-implementation/panic-implementation-twice.stderr b/src/test/ui/panic-implementation/panic-implementation-twice.stderr
deleted file mode 100644 (file)
index 3cb6ebe..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0152]: duplicate lang item found: `panic_impl`.
-  --> $DIR/panic-implementation-twice.rs:23:1
-   |
-LL | / fn panic(info: &PanicInfo) -> ! {
-LL | |     //~^ error duplicate lang item found: `panic_impl`
-LL | |     loop {}
-LL | | }
-   | |_^
-   |
-   = note: first defined in crate `some_panic_impl`.
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0152`.
diff --git a/src/test/ui/weak-lang-item.rs b/src/test/ui/weak-lang-item.rs
deleted file mode 100644 (file)
index 42972c4..0000000
+++ /dev/null
@@ -1,21 +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.
-
-// aux-build:weak-lang-items.rs
-// error-pattern: `#[panic_implementation]` function required, but not found
-// error-pattern: language item required, but not found: `eh_personality`
-// ignore-wasm32-bare compiled with panic=abort, personality not required
-
-#![no_std]
-
-extern crate core;
-extern crate weak_lang_items;
-
-fn main() {}
diff --git a/src/test/ui/weak-lang-item.stderr b/src/test/ui/weak-lang-item.stderr
deleted file mode 100644 (file)
index e85b777..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0259]: the name `core` is defined multiple times
-  --> $DIR/weak-lang-item.rs:18:1
-   |
-LL | extern crate core;
-   | ^^^^^^^^^^^^^^^^^^ `core` reimported here
-   |
-   = note: `core` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
-   |
-LL | extern crate core as other_core;
-   |
-
-error: `#[panic_implementation]` function required, but not found
-
-error: language item required, but not found: `eh_personality`
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0259`.