about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2016-02-20 22:53:29 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2016-02-20 22:53:29 +0100
commitdfe72fa4ce2c31be3ee941f6df216e3a463cf68a (patch)
treef61c3963b80e8b6eed2d29225932f2df538421dc /src/test
parenta23e4fc5116f6d7ec5e045533e89c0c14ac868e2 (diff)
downloadrust-dfe72fa4ce2c31be3ee941f6df216e3a463cf68a.tar.gz
rust-dfe72fa4ce2c31be3ee941f6df216e3a463cf68a.zip
Add test for E0152 error message improvement
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/duplicate_entry_error.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/compile-fail/duplicate_entry_error.rs b/src/test/compile-fail/duplicate_entry_error.rs
new file mode 100644
index 00000000000..d39553a7267
--- /dev/null
+++ b/src/test/compile-fail/duplicate_entry_error.rs
@@ -0,0 +1,22 @@
+// Copyright 2015 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.
+
+// Test for issue #31788
+
+// error-pattern: duplicate entry for `panic_fmt`, first definition found in `std`
+
+#![feature(lang_items)]
+
+#[lang = "panic_fmt"]
+fn panic_fmt() -> ! {
+    loop {}
+}
+
+fn main() {}
\ No newline at end of file